A comprehensive Laravel-based business management application for managing tasks, clients, invoicing, projects, and team workflows. Built with modern technologies and designed for scalability.
The fastest way to get started:
# 1. Clone the repository
git clone https://github.com/yourusername/seraph3.git
cd seraph3
# 2. Copy environment configuration
cp .env.demo .env
# 3. Start Docker containers
docker-compose up -d
# 4. Install dependencies and setup
docker-compose exec app composer install
docker-compose exec app php artisan key:generate
docker-compose exec app php artisan migrate
docker-compose exec app php artisan db:seed
# 5. Access the application
open https://localhost:8000
adminadmin123β οΈ Change these immediately after first login!
Required PHP Extensions:
php-fpm, php-mysql, php-redis, php-mbstring, php-xml,
php-curl, php-zip, php-gd, php-intl, php-bcmath,
php-dom, php-ldap (optional)
See INSTALL.md for complete installation instructions.
# Clone the repository
git clone [your-repo-url]
cd seraph3
# Copy environment file
cp .env.example .env
# Start containers
docker-compose up -d
# Install dependencies (first time only)
docker-compose exec app composer install
docker-compose exec app npm install
# Generate application key (first time only)
docker-compose exec app php artisan key:generate
# Run migrations (first time only)
docker-compose exec app php artisan migrate
β οΈ IMPORTANT: We use Laravel Mix (not Gulp) for asset compilation.
# Build assets for development
docker-compose exec app npm run dev
# Watch for changes (auto-rebuild)
docker-compose exec app npm run watch
# Build optimized production assets
docker-compose exec app npm run production
npm run dev - Development buildnpm run watch - Watch mode (auto-rebuild)npm run production - Production build (minified)npm run hot - Hot module replacementModern phone system integration replacing the legacy Asterisk system.
Quick Setup:
# 1. Run migration
docker-compose exec app php artisan migrate
# 2. Configure environment
THREECX_BASE_URL=https://your-3cx-server:5001
THREECX_API_KEY=your_api_key
THREECX_DEFAULT_EXTENSION=1001
# 3. Test connection
docker-compose exec app php artisan threecx:test-connection
Features:
Documentation:
Admin Configuration:
π° Xero Accounting Integration:
π± SMS/Communication Systems:
π Active Directory/LDAP:
# Update system
sudo apt update && sudo apt upgrade -y
# Install PHP 8.3 and required extensions
sudo apt install -y software-properties-common
sudo add-apt-repository ppa:ondrej/php -y
sudo apt update
# Install PHP with all required extensions including LDAP
sudo apt install -y php8.3 php8.3-fpm php8.3-mysql php8.3-redis \
php8.3-mbstring php8.3-xml php8.3-curl php8.3-zip php8.3-gd \
php8.3-intl php8.3-bcmath php8.3-dom php8.3-ldap php8.3-cli \
php8.3-common php8.3-opcache
# Install LDAP support
sudo apt install -y libldap2-dev libnss-ldap libpam-ldap ldap-utils
# Install MySQL 9.0
sudo apt install -y mysql-server-9.0
sudo mysql_secure_installation
# Install Redis
sudo apt install -y redis-server
sudo systemctl enable redis-server
sudo systemctl start redis-server
# Install Nginx
sudo apt install -y nginx
sudo systemctl enable nginx
sudo systemctl start nginx
# Install Node.js (LTS)
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt install -y nodejs
# Install Composer
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
sudo chmod +x /usr/local/bin/composer
# Clone repository
cd /var/www
sudo git clone [your-repo-url] seraph3
cd seraph3
# Set permissions
sudo chown -R www-data:www-data /var/www/seraph3
sudo chmod -R 755 /var/www/seraph3
sudo chmod -R 775 /var/www/seraph3/storage
sudo chmod -R 775 /var/www/seraph3/bootstrap/cache
# Install PHP dependencies
sudo -u www-data composer install --optimize-autoloader --no-dev
# Install Node.js dependencies and build assets
sudo -u www-data npm install
sudo -u www-data npm run production
# Copy and configure environment file
sudo -u www-data cp .env.example .env
sudo -u www-data nano .env
# Generate application key
sudo -u www-data php artisan key:generate
# Create database
sudo mysql -u root -p
CREATE DATABASE seraph CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'seraph_user'@'localhost' IDENTIFIED BY 'secure_password';
GRANT ALL PRIVILEGES ON seraph.* TO 'seraph_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;
# Run migrations
sudo -u www-data php artisan migrate
# Cache configuration for production
sudo -u www-data php artisan config:cache
sudo -u www-data php artisan route:cache
sudo -u www-data php artisan view:cache
The LDAP extension is already installed in the setup above. Configure it in your .env:
# LDAP Configuration
LDAP_ENABLED=true
LDAP_HOST=your-ldap-server.com
LDAP_PORT=389
LDAP_BASE_DN=dc=company,dc=com
LDAP_USERNAME=cn=admin,dc=company,dc=com
LDAP_PASSWORD=ldap_password
# Create Nginx site configuration
sudo nano /etc/nginx/sites-available/seraph3
# Basic configuration example:
server {
listen 80;
server_name your-domain.com;
root /var/www/seraph3/public;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
include fastcgi_params;
}
}
# Enable site
sudo ln -s /etc/nginx/sites-available/seraph3 /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx
# Install Certbot for SSL certificates
sudo apt install -y certbot python3-certbot-nginx
# Get SSL certificate (replace your-domain.com with your actual domain)
sudo certbot --nginx -d your-domain.com
# Auto-renewal (already set up by certbot)
sudo systemctl status certbot.timer
# Update application
cd /var/www/seraph3
sudo -u www-data git pull
sudo -u www-data composer install --optimize-autoloader --no-dev
sudo -u www-data npm run production
sudo -u www-data php artisan migrate
sudo -u www-data php artisan config:cache
sudo -u www-data php artisan route:cache
sudo -u www-data php artisan view:cache
# Restart services
sudo systemctl restart php8.3-fpm
sudo systemctl reload nginx
# Start all services
docker-compose up -d
# Stop all services
docker-compose down
# Restart specific service
docker-compose restart app
# View logs
docker-compose logs app
docker-compose logs nginx
# Execute commands in container
docker-compose exec app bash
docker-compose exec app php artisan tinker
# Run migrations
docker-compose exec app php artisan migrate
# Rollback migrations
docker-compose exec app php artisan migrate:rollback
# Seed database
docker-compose exec app php artisan db:seed
# Fresh migration with seed
docker-compose exec app php artisan migrate:fresh --seed
# Clear all caches
docker-compose exec app php artisan optimize:clear
# Clear specific caches
docker-compose exec app php artisan cache:clear
docker-compose exec app php artisan config:clear
docker-compose exec app php artisan route:clear
docker-compose exec app php artisan view:clear
# Cache for production
docker-compose exec app php artisan config:cache
docker-compose exec app php artisan route:cache
docker-compose exec app php artisan view:cache
Laravel Mix configuration is in webpack.mix.js. It handles:
// webpack.mix.js
mix.scripts(vendorFiles, 'public/js/vendor.js')
.scripts(appFiles, 'public/js/app.js')
.sass('resources/assets/scss/main.scss', 'public/css/main.css')
.options({
processCssUrls: false,
postCss: [require('autoprefixer')]
})
.version(); // Add versioning for cache busting
public/
βββ css/
β βββ main.css # Compiled SCSS
β βββ main.css.gz # Gzipped version
βββ js/
β βββ vendor.js # Third-party libraries
β βββ app.js # Application code
β βββ *.js.gz # Gzipped versions
βββ mix-manifest.json # Asset versioning map
| Service | Container | Port | Purpose |
|---|---|---|---|
| Laravel | app | 9000 | PHP-FPM Application |
| Nginx | nginx | 8000 (HTTPS) | Web Server |
| MySQL | mysql | 3306 | Database |
| Redis | redis | 6379 | Cache/Sessions |
| Adminer | adminer | 8080 | Database Admin |
502 Bad Gateway:
# Check if PHP-FPM is running
docker-compose exec app ps aux | grep php-fpm
# Restart containers
docker-compose restart app nginx
Assets not loading:
# Rebuild assets
docker-compose exec app npm run production
# Clear browser cache or check versioned URLs in mix-manifest.json
Permission issues:
# Method 1: Fix via Docker container
docker-compose exec app chmod -R 775 storage bootstrap/cache
# Method 2: Fix on host (Linux/WSL2)
sudo ./fix-host-permissions.sh
# Method 3: Quick host fix
sudo chown -R 33:33 storage bootstrap/cache
sudo chmod -R 775 storage bootstrap/cache
# Method 4: Windows/WSL2 specific
# Use separate Docker volumes for writable directories (already configured)
docker-compose down
docker-compose up -d
Docker permission errors (chmod issues):
The Docker configuration has been updated to handle permission issues better:
If you still have permission issues, the container will now:
Database connection issues:
# Check container connectivity
docker-compose exec app php artisan tinker
# Test: DB::connection()->getPdo();
Production Checklist:
APP_DEBUG=false in .envnpm run productionconfig:cache, route:cache, view:cache)composer install --optimize-autoloader)# Enable debug logging
docker-compose exec app php artisan log:clear
docker-compose exec app tail -f storage/logs/laravel.log
gulp --productionnpm run productionMake sure to update your CI/CD pipelines and deployment scripts accordingly.
We welcome contributions! Hereβs how you can help:
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)Development Guidelines:
This project is licensed under the MIT License - see the LICENSE file for details.
Built with amazing open-source technologies:
If you discover any security-related issues, please email [email protected] instead of using the issue tracker.
Made with β€οΈ for business management