Timeframe
- Present
Github
Objective
A robust event management API leveraging MongoDB and Mongoose for scalable scheduling, RSVP, waitlists, notifications, and RBAC.
Technologies
00
JWT-based authentication with access + refresh token flow
01
Admin/organizer/attendee roles with authorization middleware
02
Event creation and management routes
03
Embedded session management inside events
04
RSVP system with statuses: going/interested/not going
05
Waitlist functionality preventing duplicates (via compound indexes)
06
Feedback and ratings on events
07
Notification system with unread/read state and optional TTL cleanup
08
Pre-hooks for password hashing and plugin-based audit logging
09
Security middlewares (helmet, rate limiting, CORS)
Backend
The backend API is structured with Express.js routing layered with middleware for authentication and RBAC. MongoDB is modeled via Mongoose, using schemas with embedded session subdocuments within events, virtuals for computed fields (e.g., total duration, session counts), compound indexes for uniqueness guarantees, and TTL indexes for token/session expiration. Authentication uses JWT access and refresh tokens.
Database
Hosting
00
Modeling complex relationships and ensuring data consistency
Used Mongoose subdocuments and references; embedded session docs within events for natural hierarchical access; used compound indexes for RSVP/waitlist uniqueness and TTL indexes for token and notification expiration.
Used Mongoose subdocuments and references; embedded session docs within events for natural hierarchical access; used compound indexes for RSVP/waitlist uniqueness and TTL indexes for token and notification expiration.
01
Securing endpoints with multiple roles and permissions
Implemented RBAC middleware to authorize based on user roles (admin/organizer/attendee), ensuring sensitive event operations are blocked from unauthorized users.
Implemented RBAC middleware to authorize based on user roles (admin/organizer/attendee), ensuring sensitive event operations are blocked from unauthorized users.
02
Tracking user actions and system history
Built a reusable audit logging plugin to capture before/after states of key operations without polluting core business logic.
Built a reusable audit logging plugin to capture before/after states of key operations without polluting core business logic.
00
Designing a NoSQL schema that balances normalization and performance
01
Leveraging Mongoose schema features like virtuals and TTL indexes
02
Building layered security with JWT, RBAC, and Express middleware
03
Implementing audit trails with Mongoose plugins
04
Structuring a scalable backend API with clear separation of concerns
00
Early schema iterations struggled with flattening nested session data — resolved by Mongoose subdocs.
01
Initial auth logic was overly simplistic — strengthened with RBAC middleware and refresh token rotation.
00
Add REST API documentation (OpenAPI/Swagger)
01
Build an admin dashboard UI (React/Vue) to visualize events, RSVPs, and analytics
02
Add social login (OAuth) and email notifications
03
Implement WebSocket notifications for real-time updates
Next Project