Skip to content

ShaadiMart Backend is a production-ready Laravel REST API powering a modern matrimony platform. Features real-time chat with WebSockets, secure authentication, profile management, and local file storage. Built with Laravel 10, MySQL, Redis, and Laravel Reverb for scalable performance.

Notifications You must be signed in to change notification settings

Sabbirbracu/bmc_backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

68 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ShaadiMart Backend API

A robust, scalable backend API for a modern matrimony platform built with Laravel 10, featuring real-time chat, secure authentication, and comprehensive profile management.

Laravel PHP MySQL Redis WebSocket

πŸš€ Live API

Base URL: https://api.shaadimartbd.com

API Status Documentation

πŸ“‹ Project Overview

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.

🎯 Key Achievements

  • 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

πŸ— System Architecture

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

πŸ›  Tech Stack

Core Framework

  • Laravel 10 - PHP Framework
  • PHP 8.2+ - Programming Language
  • Composer - Dependency Management

Database & Caching

  • MySQL 8.0 - Primary Database
  • Redis - Caching & Session Storage
  • Eloquent ORM - Database Abstraction

Real-time Features

  • Laravel Reverb - WebSocket Server
  • Laravel Echo - WebSocket Client
  • Redis Pub/Sub - Message Broadcasting

Security & Authentication

  • Laravel Sanctum - API Token Authentication
  • CORS - Cross-Origin Resource Sharing
  • Request Validation - Input Sanitization

File Storage

  • AWS S3 - Cloud Storage
  • Local Storage - Development Storage
  • Image Intervention - Image Processing

πŸ“Š API Features

πŸ” Authentication System

  • JWT-like token authentication with Laravel Sanctum
  • Secure password hashing with bcrypt
  • Token expiration and refresh mechanisms
  • Role-based access control (RBAC)

πŸ’¬ Real-time Chat

  • WebSocket-based real-time messaging
  • Private channel subscriptions
  • Message broadcasting to multiple clients
  • Online/offline user status tracking

πŸ‘€ User Management

  • User registration with email verification
  • Profile creation and management
  • Subscription plan integration
  • Account security features

πŸ“Έ Media Management

  • Multiple profile picture uploads
  • Plan-based upload limitations
  • Image optimization and validation
  • Primary picture selection

πŸ’° Subscription System

  • Tiered subscription plans (Basic, Premium)
  • Feature-based access control
  • Plan upgrade/downgrade functionality
  • Usage tracking and limitations

πŸ”§ Installation & Setup

Prerequisites

  • PHP 8.2 or higher
  • Composer 2.0+
  • MySQL 8.0+
  • Redis Server
  • Node.js (for Reverb)

Installation Steps

  1. Clone the repository
git clone https://github.com/your-username/shaadimart-backend.git
cd shaadimart-backend
  1. Install PHP dependencies
composer install
  1. Environment Configuration
cp .env.example .env
php artisan key:generate
  1. 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
  1. Database Setup
php artisan migrate --seed
php artisan db:seed
  1. Start Services
# Start Laravel Reverb (WebSocket server)
php artisan reverb:start

# Start Queue Worker
php artisan queue:work

# Start Laravel Development Server
php artisan serve

πŸš€ Deployment

Production 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

πŸ“ˆ Performance Optimizations

  1. Redis caching for frequently accessed data

  2. Database indexing on foreign keys and search columns

  3. Query optimization with eager loading

  4. Queue implementation for background processing

  5. File compression for image uploads

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Workflow

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

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘¨β€πŸ’» Developer

Sabbir Ahmad

GitHub: @sabbirahmad

LinkedIn: Sabbir Ahmad[https://www.linkedin.com/in/sabbirahmad653/]

Portfolio: sabbirahmad.dev

πŸ“ž Support

For technical support or questions about this API:

About

ShaadiMart Backend is a production-ready Laravel REST API powering a modern matrimony platform. Features real-time chat with WebSockets, secure authentication, profile management, and local file storage. Built with Laravel 10, MySQL, Redis, and Laravel Reverb for scalable performance.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •