Installation
Requirements
Server Requirements
- PHP: 8.2 or higher
- Composer: Latest version
- Node.js: 18+ (for asset compilation)
- Database: MySQL 8.0+ or PostgreSQL 13+
- Redis: 6.0+ (optional, for caching)
PHP Extensions
- BCMath PHP Extension
- Ctype PHP Extension
- cURL PHP Extension
- DOM PHP Extension
- Fileinfo PHP Extension
- JSON PHP Extension
- Mbstring PHP Extension
- OpenSSL PHP Extension
- PCRE PHP Extension
- PDO PHP Extension
- Tokenizer PHP Extension
- XML PHP Extension
Installation Steps
1. Clone the Repository
bash
git clone https://github.com/RattsTechServices/zafira.git
cd zafira2. Install Dependencies
bash
composer install
npm install3. Environment Setup
bash
cp .env.example .env
php artisan key:generate4. Configure Environment
Edit your .env file with the following configurations:
Database Configuration (for Laravel Sail)
env
DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=sail
DB_PASSWORD=passwordDatabase Configuration (for Local Installation)
env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=zafira
DB_USERNAME=your_username
DB_PASSWORD=your_passwordApplication Configuration
env
APP_NAME=Zafira
APP_ENV=local
APP_DEBUG=true
APP_PORT=3300
APP_URL=http://localhost:3300
# For Laravel Sail
FORWARD_DB_PORT=3307
FORWARD_REDIS_PORT=6380Cryptography Configuration
env
CRYPTOGRAPH_STORAGE=file
CRYPTOGRAPH_NAME=zafira_cryptograph_key
ETHERSCAN_API_KEY=your_etherscan_api_key_here5. Run Migrations and Seed Database
bash
# Run migrations to create database tables
php artisan migrate
# Seed database with initial data (users, networks, wallets)
php artisan db:seed6. Build Assets
bash
npm run build7. Start the Application
Option A: Using PHP Artisan Serve
bash
php artisan serve --port=3300Option B: Using Laravel Sail (Docker)
bash
# Start all services
./vendor/bin/sail up -d
# Or use the alias (if configured)
sail up -d8. Access the Application
With PHP Artisan Serve:
- Application:
http://localhost:3300 - API Documentation: Available at
/api/documentation
With Laravel Sail:
- Application:
http://localhost:3300 - API Documentation: Available at
/api/documentation - Database:
localhost:3307(MySQL - forwarded port) - Redis:
localhost:6380(Redis - forwarded port)
Default Users
After running php artisan db:seed, the following users are created:
Root User (Super Admin)
- Email:
root@local.com - Password:
root@2025 - Role:
root(Super administrator with all permissions)
Admin User
- Email:
admin@local.com - Password:
admin@2025 - Role:
admin(Administrator with full system access)
Security Note
These are the default credentials for initial access. Please change them after first login for security.
Next Steps
- Configuration - Configure your Zafira installation
- API Overview - Learn about the API endpoints
- Webhook System - Configure webhook notifications