A dynamic, full-stack platform designed to streamline large-scale event participation and management.
Successfully deployed for 2,000+ participants across 45+ events, ensuring high performance and scalability.
FAROUCHE is a multi-service web application with a public-facing frontend, a separate admin dashboard, and independent backend services communicating over HTTP.
graph TD
%% Clients
subgraph Clients ["Users"]
U["π€ Public User (Browser)"]
A["π‘οΈ Admin (Browser)"]
end
%% Frontend Layer
subgraph Frontends ["Frontend Services"]
FE["Frontend (Next.js)"]
AF["Admin Frontend (Next.js)"]
end
%% Backend Layer
subgraph Backends ["Backend Services"]
BE["Main Backend (Express)"]
GB["Gallery Backend (Express)"]
ES["Email Service (Node.js)"]
end
%% Infrastructure & DBs
subgraph Infra ["Infrastructure"]
DB1[("MongoDB Atlas (Main)")]
DB2[("MongoDB Atlas (Gallery)")]
end
%% Third-Party Services
subgraph External ["External Services"]
GM["Gmail SMTP"]
CL["Cloudinary CDN"]
end
%% Routing & Connections
U -->|":3000"| FE
A -->|":3001"| AF
FE -->|"HTTP :4000"| BE
AF -->|"HTTP :4000"| BE
AF -->|"HTTP :4001"| GB
BE -->|"HTTP :5001"| ES
BE -->|"CRUD"| DB1
GB -->|"CRUD"| DB2
ES -->|"Send via SMTP"| GM
BE -->|"Upload Media"| CL
GB -->|"Upload Media"| CL
| # | Service | Port | Tech | Purpose |
|---|---|---|---|---|
| 1 | frontend |
3000 | Next.js 14 | Public website β events, registrations, gallery, results |
| 2 | adminfrontend |
3001 | Next.js 14 | Admin dashboard β CRUD, attendance, emails, roles |
| 3 | backend |
4000 | Express + Node | Main API β auth, events, registrations, results, admin management |
| 4 | gallerybackend |
4001 | Express + Node | Gallery API β image upload, compress, store |
| 5 | email-service |
5001 | Node.js + Express | HTTP email microservice β sends emails via Gmail SMTP |
sequenceDiagram
participant Admin
participant Backend
participant EmailService
participant Gmail
Admin->>Backend: POST /admin/email { eventId, subject, message }
Backend->>Backend: Fetch target registrations from MongoDB
Backend->>EmailService: POST /api/send-email { type, payload }
Backend-->>Admin: 200 OK β "N jobs sent"
EmailService->>Gmail: sendMail via Nodemailer
Gmail-->>EmailService: Delivered
Job types:
registration_confirm: Triggered when a user registers for an event.admin_bulk: Triggered when an admin sends a custom email from the dashboard.
graph LR
A["Admin uploads image"] -->|multipart/form-data| M["Multer v1\n(diskStorage β tmp/)"]
M --> S["Sharp\n(resize 1920px, JPEG 60%)"]
S --> C["Cloudinary SDK\nuploadOnCloudinary()"]
C -->|URL| DB["MongoDB\n(image field)"]
(Note: Gallery backend uses Sharp compression, Main backend uploads directly to Cloudinary)
graph LR
SA["π‘ Super Admin"]
MA["π£ Main Admin"]
VA["βͺ Viewer (default)"]
SA -->|"Can do everything +\nassign roles + view audit log"| ALL
MA -->|"Events, Results,\nAttendance, Emails"| WRITE
VA -->|"Read-only dashboard"| READ
| Permission | Viewer | Admin | Super Admin |
|---|---|---|---|
| View events, registrations, results | β | β | β |
| Add / Edit / Delete events & results | β | β | β |
| Mark attendance & Send bulk email | β | β | β |
| Admin management & Audit log | β | β | β |
-
Full-Stack Development & Deployment
Led the end-to-end development of a robust platform, deployed on DigitalOcean and AWS with scalable infrastructure. -
Real-Time Dashboards
Integrated Google Sheets API for instant updates and analytics of registrations, results, and event status. -
Efficient Media Handling
Used Cloudinary for fast, reliable, and optimized image & media management. -
Asynchronous Email Delivery
Implemented an HTTP-based email microservice with Gmail SMTP, handling high email volume reliably (reduced email failures by 80%).
- Frontend: Next.js 15, TailwindCSS, Framer Motion
- Backend: Node.js, Express.js
- Database: MongoDB Atlas, Mongoose
- Email: Nodemailer, Gmail SMTP
- Media: Cloudinary, Multer, Sharp
- Integration: Google Sheets API, Nodemailer
- DevOps: Docker, Docker Compose, Nginx, Let's Encrypt
- Deployment: AWS EC2, Vercel (Admin Frontend)
The project is fully Dockerized (excluding Admin Frontend, which runs on Vercel).
| Service | Container | Port |
|---|---|---|
| Frontend | farouche-frontend |
3000 |
| Backend | farouche-backend |
4000 |
| Gallery Backend | farouche-gallery-backend |
4001 |
| Email Service | farouche-email-service |
5001 |
# 1. Set up .env files (see .env.example for reference)
# - backend/.env
# - email-service/.env
# - gallerybackend/.env
# 2. Build all images
docker compose build
# 3. Start all services
docker compose up -d
# 4. Check status
docker compose ps
# 5. View logs
docker compose logs -fgit pull origin main
docker compose build
docker compose up -d- Launch an EC2 instance (Ubuntu 24.04,
t3.medium) - Install Docker & Docker Compose
- Clone the repo and set up
.envfiles - Run
docker compose build && docker compose up -d - Set up Nginx as a reverse proxy for
farouche.in - Enable SSL with Let's Encrypt / Certbot
See
.env.exampleat the project root for all required environment variables.
# Terminal 1 β Email Service (Port 5001)
cd email-service
npm run dev
# Terminal 2 β Main Backend (Port 4000)
cd backend
npm run dev
# Terminal 3 β Gallery Backend (Port 4001)
cd gallerybackend
npm run dev
# Terminal 4 β Public Frontend (Port 3000)
cd frontend
npm run dev
# Terminal 5 β Admin Frontend (Port 3001)
cd adminfrontend
npm run devMONGO_URI(MongoDB Atlas)JWT_SECRET&ADMIN_SECRET_KEY(Backend Auth)CLOUDINARY_CLOUD_NAME,CLOUDINARY_API_KEY,CLOUDINARY_API_SECRETEMAIL_SERVICE_URL(Default:http://localhost:5001/api/send-email)EMAIL_USER&EMAIL_PASS(Gmail App Password)
Contributions and feature requests are welcome. Please open an issue or submit a pull request.