A full-stack event management platform where organizers create events and attendees discover & book tickets.
| Layer | Technology |
|---|---|
| Frontend | Next.js 14, TypeScript |
| Backend | Express, TypeScript |
| Database | MongoDB |
| Auth | JWT + bcrypt |
| Architecture | Layered (Controller → Service → Repository) |
├── client/ # Next.js frontend
│ └── src/
│ ├── app/ # Pages (Home, Events, Auth, Dashboard, Bookings)
│ ├── components/ # Navbar, Footer, EventCard
│ ├── lib/ # API client
│ └── types/ # TypeScript interfaces
├── server/ # Express backend
│ └── src/
│ ├── config/ # Database singleton
│ ├── controllers/
│ ├── interfaces/ # IPaymentGateway abstraction
│ ├── middleware/ # Auth + RBAC
│ ├── models/ # Mongoose schemas (User, Event, Booking, Review)
│ ├── repositories/
│ ├── routes/
│ └── services/
├── idea.md # Project concept document
└── *Diagram.* # UML diagrams (Class, ER, Sequence, Use Case)
- Inheritance:
User←Attendee/Organizer/Admin;Event←OnlineEvent/VenueEvent - Abstraction:
IPaymentGatewayinterface withMockPaymentGatewayimplementation - Factory:
TicketFactorycreates VIP / General tickets - Singleton:
Databaseconnection
- Node.js ≥ 18
- MongoDB running locally (or a MongoDB Atlas URI)
cd server
npm install
cp .env.example .env # Then edit .env with your values
npm run dev # Starts on http://localhost:5001cd client
npm install
npm run dev # Starts on http://localhost:3000- Push code to GitHub
- Create a new Project on Vercel
- Set root directory to
server - Add environment variables in settings:
MONGODB_URI= your MongoDB Atlas connection stringJWT_SECRET= a strong random stringJWT_EXPIRES_IN=7dCORS_ORIGIN= your Vercel frontend URL
- Deploy (Vercel will use
vercel.jsonto deploy it as a Serverless API)
- Import the GitHub repo on Vercel
- Set root directory to
client - Add environment variable:
NEXT_PUBLIC_API_URL=https://your-backend-url.onrender.com/api
- Deploy
| Method | Endpoint | Auth | Description |
|---|---|---|---|
| POST | /api/auth/register |
No | Register user |
| POST | /api/auth/login |
No | Login |
| GET | /api/events |
No | List events |
| GET | /api/events/:id |
No | Event detail |
| POST | /api/events |
Organizer | Create event |
| PUT | /api/events/:id |
Organizer | Update event |
| DELETE | /api/events/:id |
Organizer | Delete event |
| POST | /api/bookings |
Attendee | Book ticket |
| GET | /api/bookings/my |
User | My bookings |
| POST | /api/reviews |
User | Leave review |
| GET | /api/health |
No | Health check |