A gamified freelancing platform with RPG-style progression system, featuring multi-database architecture (MySQL, PostgreSQL, MongoDB), Stripe payments, and Docker orchestration.
- Multi-Database Architecture: MySQL (auth, payments), PostgreSQL (jobs, projects), MongoDB (gamification)
- Authentication: JWT-based with email verification, 2FA support, OAuth (GitHub, Google)
- Connect Economy: Virtual currency system for job applications with Stripe integration
- Payment System: Escrow-based payments with 15% platform fee, withdrawal system
- Job Marketplace: Post jobs, apply with Connects, milestone-based contracts
- 7-Level Progression: Newbie → Junior → Mid1 → Mid2 → Mid3 → Senior1 → Senior2
- XP System: Earn XP from job completion (250 XP), challenges (20-100 XP), profile completion (50 XP)
- Badge System: 15+ badges across skill, achievement, milestone, and special categories
- Challenge Platform: 20+ pre-defined challenges across Backend, Frontend, DevOps, Algorithm
- Leaderboard: Global ranking system based on XP
- Activity Feed: Public achievement showcase
- Backend: Laravel 11 (PHP 8.3), Sanctum authentication
- Frontend: React 18, vanilla CSS (cyberpunk/RPG theme)
- Databases: MySQL 8.0, PostgreSQL 16, MongoDB 7.0
- Cache/Queue: Redis 7
- Payments: Stripe API
- DevOps: Docker Compose, Nginx, Supervisor
- Docker 20.10+
- Docker Compose 2.0+
- Git
- 4GB RAM minimum (8GB recommended)
# Clone repository
git clone https://github.com/yourusername/datasynchub.git
cd datasynchub
# Copy environment file
cp .env.example .env
# Edit .env with your configuration
nano .env
# Run setup script
chmod +x scripts/setup.sh
./scripts/setup.sh# Build containers
docker-compose build
# Start all services
docker-compose up -d
# Install dependencies
docker-compose exec php composer install
# Generate application key
docker-compose exec php php artisan key:generate
# Run migrations
docker-compose exec php php artisan migrate
# Seed database
docker-compose exec php php artisan db:seed
# Create storage symlink
docker-compose exec php php artisan storage:link- API: http://localhost:8000
- MailHog UI: http://localhost:8025 (email testing)
- MySQL: localhost:3306
- PostgreSQL: localhost:5432
- MongoDB: localhost:27017
- Redis: localhost:6379
# View all available commands
make help
# Start services
make up
# View logs
make logs
# Access PHP container
make shell
# Run migrations
make migrate
# Seed database
make seed
# Run tests
make test
# Fresh install with seed
make fresh
# Stop services
make downdatasynchub/
├── app/
│ ├── Console/
│ │ └── Commands/ # Artisan commands
│ ├── Events/ # Domain events
│ ├── Http/
│ │ ├── Controllers/
│ │ │ └── Api/ # API controllers
│ │ ├── Middleware/ # Custom middleware
│ │ ├── Requests/ # Form request validation
│ │ └── Resources/ # API resources
│ ├── Jobs/ # Queue jobs
│ ├── Listeners/ # Event listeners
│ ├── Models/
│ │ └── MongoDB/ # MongoDB models
│ ├── Notifications/ # Email notifications
│ ├── Providers/ # Service providers
│ └── Services/ # Business logic services
├── config/ # Configuration files
├── database/
│ ├── factories/ # Model factories
│ ├── migrations/ # Database migrations
│ └── seeders/ # Database seeders
├── docker/
│ ├── nginx/ # Nginx configuration
│ ├── php/ # PHP-FPM configuration
│ ├── mysql/ # MySQL configuration
│ ├── postgres/ # PostgreSQL configuration
│ ├── mongodb/ # MongoDB configuration
│ └── redis/ # Redis configuration
├── routes/
│ └── api.php # API routes
├── scripts/ # Helper scripts
├── storage/ # File storage
├── tests/ # PHPUnit tests
├── docker-compose.yml # Docker orchestration
├── Makefile # Helper commands
└── README.md
users- User accounts and profileswallets- Connect and cash balancesconnect_transactions- Connect purchase/usage historypayments- Payment recordswithdrawals- Freelancer withdrawal requestsescrow_transactions- Job payment escrow
skills- Skill taxonomychallenges- Platform challengesbadges- Badge definitions- Will be extended in future modules with jobs/projects
xp_logs- XP transaction historyuser_badges- User badge awardsuser_levels- User level progressionchallenge_submissions- Challenge submissionsactivity_feed- User activity timeline
# Application
APP_NAME="DataSyncHub"
APP_ENV=local
APP_URL=http://localhost:8000
FRONTEND_URL=http://localhost:3000
# MySQL
DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=datasync_mysql
DB_USERNAME=datasync_user
DB_PASSWORD=datasync_secret
DB_ROOT_PASSWORD=root_secret
# PostgreSQL
PGSQL_HOST=postgres
PGSQL_PORT=5432
PGSQL_DATABASE=datasync_pgsql
PGSQL_USERNAME=datasync_user
PGSQL_PASSWORD=datasync_secret
# MongoDB
MONGO_HOST=mongodb
MONGO_PORT=27017
MONGO_DATABASE=datasync_mongo
MONGO_USERNAME=datasync_user
MONGO_PASSWORD=datasync_secret
# Redis
REDIS_HOST=redis
REDIS_PORT=6379
# Stripe
STRIPE_KEY=your_stripe_publishable_key
STRIPE_SECRET=your_stripe_secret_key
STRIPE_WEBHOOK_SECRET=your_webhook_secret
# Mail
MAIL_MAILER=smtp
MAIL_HOST=mailhog
MAIL_PORT=1025# Run all tests
make test
# Run tests with coverage
make test-coverage
# Run specific test suite
docker-compose exec php php artisan test --filter=AuthTest
# Run tests in parallel
docker-compose exec php php artisan test --parallelPOST /api/auth/register
Content-Type: application/json
{
"name": "John Doe",
"email": "john@example.com",
"password": "Password123!",
"password_confirmation": "Password123!",
"role": "freelancer"
}POST /api/auth/login
Content-Type: application/json
{
"email": "john@example.com",
"password": "Password123!",
"remember": true
}GET /api/auth/me
Authorization: Bearer {token}GET /api/wallet
Authorization: Bearer {token}GET /api/wallet/connect-history?limit=50&offset=0
Authorization: Bearer {token}GET /api/connect-packagesPOST /api/payments/connect-purchase
Authorization: Bearer {token}
Content-Type: application/json
{
"package_id": 1
}POST /api/payments/confirm-purchase
Authorization: Bearer {token}
Content-Type: application/json
{
"payment_intent_id": "pi_xxxxx"
}GET /api/gamification/stats
Authorization: Bearer {token}GET /api/gamification/badges
Authorization: Bearer {token}GET /api/gamification/leaderboard?limit=100
Authorization: Bearer {token}GET /api/challenges?category=backend&difficulty=mediumPOST /api/challenges/submit
Authorization: Bearer {token}
Content-Type: application/json
{
"challenge_id": 1,
"submission_url": "https://github.com/user/repo",
"notes": "Completed with React and TypeScript"
}GET /api/challenges/my-submissions?status=pending
Authorization: Bearer {token}# Run backup script
chmod +x scripts/backup.sh
./scripts/backup.sh
# Backups saved to ./backups/chmod +x scripts/check-databases.sh
./scripts/check-databases.shmake clearmake optimizemake stats# Check Docker status
docker ps -a
# View logs
make logs
# Restart services
make restart# Check database connectivity
./scripts/check-databases.sh
# Restart database containers
docker-compose restart mysql postgres mongodb# Fix storage permissions
docker-compose exec php chmod -R 777 storage bootstrap/cache# Restart queue worker
make queue-restart
# View queue logs
make logs-queue- Set
APP_ENV=productionin.env - Set
APP_DEBUG=false - Generate strong
APP_KEY - Configure production database credentials
- Set up SSL certificates
- Configure proper CORS settings
- Set up monitoring (Sentry, New Relic)
- Configure backup strategy
- Set up CI/CD pipeline
- Configure queue workers with Supervisor
- Set up Redis password
- Configure rate limiting
- Set up firewall rules
- Enable database backups
- Configure email service (SendGrid/SES)
- Set up file storage (S3/Spaces)
- User authentication & profiles
- Connect economy with Stripe
- Wallet system
- XP & level progression
- Challenge system
- Badge awards
- Activity feed
- Multi-database architecture
- Job posting & marketplace
- Job applications with Connect deduction
- Contract & milestone system
- Escrow payment flow
- Messaging system
- Review & rating system
- Advanced search with filters
- Notification system
- Real-time features (WebSockets)
- Mobile apps (React Native)
- Video call integration
- Team accounts
- API access for integrations
- Advanced analytics
- Multi-language support
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
- Follow PSR-12 coding standards
- Write tests for new features
- Update documentation
- Use meaningful commit messages
This project is licensed under the MIT License.
- Your Name - Initial work
- Laravel community
- React community
- Docker community
- All contributors
For support, email support@datasynchub.com or open an issue on GitHub.
---
## 4.11 DOCKER IGNORE
### File 125: .dockerignore
.git .gitignore .env .env.example README.md docker-compose.yml Makefile
node_modules vendor
tests .phpunit.result.cache
.idea .vscode .fleet
.DS_Store Thumbs.db
*.log storage/logs
backups
docs