A robust, scalable backend API for a modern matrimony platform built with Laravel 10, featuring real-time chat, secure authentication, and comprehensive profile management.
Base URL: https://api.shaadimartbd.com
ShaadiMart Backend is a comprehensive REST API powering a full-featured matrimony platform. The system handles user authentication, profile management, real-time messaging, subscription plans, and media uploads with enterprise-grade security and performance.
- Real-time chat system with WebSocket integration handling 1000+ concurrent connections
- Secure file upload system with plan-based limitations and AWS S3 integration
- Scalable architecture supporting 10,000+ registered users
- Comprehensive API documentation with Postman collection
app/
βββ Http/
β βββ Controllers/
β β βββ API/ # REST API Controllers
β β βββ Auth/ # Authentication Logic
β βββ Middleware/ # Custom Middleware
βββ Models/ # Eloquent Models
βββ Events/ # Broadcast Events
βββ Jobs/ # Queueable Jobs
βββ Services/ # Business Logic
config/
βββ auth.php # Authentication Configuration
βββ broadcasting.php # WebSocket Configuration
βββ cache.php # Redis Configuration
βββ filesystems.php # Storage Configuration
- Laravel 10 - PHP Framework
- PHP 8.2+ - Programming Language
- Composer - Dependency Management
- MySQL 8.0 - Primary Database
- Redis - Caching & Session Storage
- Eloquent ORM - Database Abstraction
- Laravel Reverb - WebSocket Server
- Laravel Echo - WebSocket Client
- Redis Pub/Sub - Message Broadcasting
- Laravel Sanctum - API Token Authentication
- CORS - Cross-Origin Resource Sharing
- Request Validation - Input Sanitization
- AWS S3 - Cloud Storage
- Local Storage - Development Storage
- Image Intervention - Image Processing
- JWT-like token authentication with Laravel Sanctum
- Secure password hashing with bcrypt
- Token expiration and refresh mechanisms
- Role-based access control (RBAC)
- WebSocket-based real-time messaging
- Private channel subscriptions
- Message broadcasting to multiple clients
- Online/offline user status tracking
- User registration with email verification
- Profile creation and management
- Subscription plan integration
- Account security features
- Multiple profile picture uploads
- Plan-based upload limitations
- Image optimization and validation
- Primary picture selection
- Tiered subscription plans (Basic, Premium)
- Feature-based access control
- Plan upgrade/downgrade functionality
- Usage tracking and limitations
- PHP 8.2 or higher
- Composer 2.0+
- MySQL 8.0+
- Redis Server
- Node.js (for Reverb)
- Clone the repository
git clone https://github.com/your-username/shaadimart-backend.git
cd shaadimart-backend- Install PHP dependencies
composer install- Environment Configuration
cp .env.example .env
php artisan key:generate- Configure Environment Variables
APP_NAME="ShaadiMart API"
APP_ENV=production
APP_DEBUG=false
APP_URL=https://api.shaadimartbd.com
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=shaadimart
DB_USERNAME=your_username
DB_PASSWORD=your_password
BROADCAST_DRIVER=reverb
CACHE_DRIVER=redis
QUEUE_CONNECTION=redis
REVERB_APP_ID=your_app_id
REVERB_APP_KEY=your_app_key
REVERB_APP_SECRET=your_app_secret
AWS_ACCESS_KEY_ID=your_aws_key
AWS_SECRET_ACCESS_KEY=your_aws_secret
AWS_BUCKET=your_bucket_name- Database Setup
php artisan migrate --seed
php artisan db:seed- Start Services
# Start Laravel Reverb (WebSocket server)
php artisan reverb:start
# Start Queue Worker
php artisan queue:work
# Start Laravel Development Server
php artisan serveProduction Setup
# Optimize for production
php artisan config:cache
php artisan route:cache
php artisan view:cache
# Run migrations
php artisan migrate --force
# Start production services
sudo systemctl start laravel-reverb
sudo systemctl start laravel-worker-
Redis caching for frequently accessed data
-
Database indexing on foreign keys and search columns
-
Query optimization with eager loading
-
Queue implementation for background processing
-
File compression for image uploads
We welcome contributions! Please see our Contributing Guide for details.
1. Fork the repository
2. Create a feature branch (git checkout -b feature/amazing-feature)
3. Commit your changes (git commit -m 'Add amazing feature')
4. Push to the branch (git push origin feature/amazing-feature)
5. Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Sabbir Ahmad
GitHub: @sabbirahmad
LinkedIn: Sabbir Ahmad[https://www.linkedin.com/in/sabbirahmad653/]
Portfolio: sabbirahmad.dev
For technical support or questions about this API:
-
π§ Email: sabbirahmad653@gmail.com
-
π Issues: GitHub Issues
-
π Documentation: API Docs