A comprehensive, production-ready Social Media Marketing panel built with a modern monorepo architecture.
This project uses a monorepo structure with the following organization:
smm-panel/
├── apps/
│ ├── api/ # Backend API (Node.js + Express + TypeScript)
│ └── web/ # Frontend (Next.js 15 + React 19 + TypeScript)
├── packages/
│ ├── types/ # Shared TypeScript types
│ └── config/ # Shared configuration
├── docker/ # Docker configurations
└── scripts/ # Build & deployment scripts
- 🔐 JWT Authentication - Secure user authentication
- 👥 Role-Based Access Control - USER, RESELLER, ADMIN, SUPER_ADMIN
- 💳 Service Management - 12+ social media platforms
- 📦 Order Processing - Automated order handling with drip-feed
- 💰 Payment Integration - Stripe-ready payment system
- 🎯 Admin Dashboard - Comprehensive management interface
- 📊 Mass Ordering - Bulk order processing (up to 100 orders)
- 🤝 Affiliate Program - 5% commission with auto-tracking
- 🎫 Support Tickets - Customer support system
- 📈 Analytics - User behavior and order tracking
- 🔄 API Documentation - Interactive endpoint documentation
- ⚡ Rate Limiting - Redis-based request throttling
- Node.js 18+
- PostgreSQL 12+
- Redis 6+
- npm or yarn
- Clone and install dependencies:
cd smm-panel
npm install- Set up environment variables:
cp .env.example apps/api/.env
cp .env.example apps/web/.env.localEdit the .env files with your configuration.
- Set up the database:
npm run db:generate
npm run db:migrate
npm run db:seed- Start development servers:
npm run devThis starts both frontend (http://localhost:3000) and backend (http://localhost:5000).
npm run dev # Start both apps in development
npm run dev:api # Start only backend API
npm run dev:web # Start only frontendnpm run build # Build all apps
npm run build:api # Build backend only
npm run build:web # Build frontend onlynpm run db:generate # Generate Prisma client
npm run db:migrate # Run migrations
npm run db:seed # Seed database
npm run db:studio # Open Prisma Studionpm run lint # Lint all workspaces
npm run test # Run all tests- Create
.envfile in root:
cp .env.example .env
# Edit .env with your production values- Start all services:
docker-compose -f docker/docker-compose.yml up -dThis starts:
- PostgreSQL database (port 5432)
- Redis cache (port 6379)
- Backend API (port 5000)
- Frontend web (port 3000)
- Run migrations:
docker-compose exec api npm run prisma:migrate:prod# Build API
docker build -f docker/Dockerfile.api -t smm-panel-api .
# Build Web
docker build -f docker/Dockerfile.web -t smm-panel-web .apps/api/src/
├── modules/ # Feature modules
│ ├── auth/ # Authentication
│ ├── users/ # User management
│ ├── services/ # Service catalog
│ ├── orders/ # Order processing
│ └── ...
├── common/ # Shared code
│ └── middleware/ # Express middleware
├── config/ # Configuration
├── database/ # Prisma schema & migrations
├── utils/ # Utility functions
└── types/ # TypeScript types
apps/web/src/
├── app/ # Next.js app router
│ ├── (auth)/ # Auth pages
│ ├── (dashboard)/# Dashboard pages
│ └── (admin)/ # Admin pages
├── components/ # React components
├── lib/ # Libraries & utilities
│ ├── api/ # API client
│ └── hooks/ # Custom hooks
└── types/ # TypeScript types
After seeding the database:
Admin Account:
- Email:
admin@smmpanel.com - Password:
admin123
Test User:
- Email:
user@test.com - Password:
admin123
POST /api/auth/register- User registrationPOST /api/auth/login- User loginPOST /api/auth/forgot-password- Password reset
GET /api/services- List servicesPOST /api/services- Create service (Admin)PUT /api/services/:id- Update service (Admin)
GET /api/orders- Get user ordersPOST /api/orders- Place new orderPOST /api/orders/:id/refill- Request refill
GET /api/admin/dashboard- Dashboard statsGET /api/admin/users- List usersGET /api/admin/orders- All orders
[Full API documentation available at /api/docs]
- Push to GitHub
- Connect Railway to your repo
- Add PostgreSQL & Redis add-ons
- Deploy automatically
- Frontend: Deploy to Vercel
- Backend: Deploy to Render/Railway
- Database: Supabase or Railway Postgres
- Redis: Upstash Redis
- Use Elastic Beanstalk, Cloud Run, or App Service
- RDS/Cloud SQL for PostgreSQL
- ElastiCache/MemoryStore for Redis
- Use Docker Compose
- Set up Nginx reverse proxy
- Configure SSL with Let's Encrypt
- ✅ Password hashing with bcryptjs
- ✅ JWT token authentication
- ✅ Rate limiting per IP
- ✅ Input validation
- ✅ CORS protection
- ✅ SQL injection protection (Prisma)
- ✅ XSS protection
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
MIT License - see LICENSE file for details
For detailed documentation, guides, and API references, visit the docs folder:
- Quick Start Guide - Get started in 5 minutes
- Setup Guide - Detailed installation instructions
- Database Setup - PostgreSQL configuration
- Code Review Summary - Latest security audit & fixes
- Feature Roadmap - Planned features
- Full Documentation Index - Complete documentation list
For issues and questions:
- Check the documentation
- Review existing GitHub issues
- Create a new issue with detailed information
Status: ✅ Production Ready (Last Security Audit: October 29, 2025)
Built with ❤️ using Node.js, TypeScript, Next.js, and Prisma