A comprehensive backend system for managing CCA (Co-Curricular Activities) events, attendance, and student credits.
- Docker & Docker Compose installed
- That's it! No Node.js, PostgreSQL, or other dependencies needed locally.
# 1. Create environment file
cp env.docker.example .env
# Edit .env and set:
# - JWT_SECRET (use a strong random string)
# - POSTGRES_PASSWORD (database password)
# - SMTP credentials (for email notifications)
# 2. Start everything
make upThat's it! make up automatically:
- ✅ Builds Docker images (first time only)
- ✅ Starts PostgreSQL database
- ✅ Runs all migrations
- ✅ Starts the backend API
Time: ~2-5 minutes first time, ~10 seconds after that.
- API: http://localhost:3000
- Swagger Docs: http://localhost:3000/api-docs
- Database: localhost:5432
make help # Show all available commands
make up # Start services
make down # Stop services
make logs # View application logs
make restart # Restart services
make ps # Show container status
make migrate # Run database migrations
make shell # Open app container shell
make db-shell # Open database shell
make backup # Backup database
make clean # Remove containers and data- ✅ User & Admin authentication (JWT)
- ✅ Event management (CRUD)
- ✅ RSVP system with capacity & waitlist
- ✅ Multi-session attendance tracking
- ✅ Automatic credit calculation
Note for Closed Review: Signup is disabled by default. A database seed script is provided to create accounts manually. Use
npm run seedto generate the Admin and Student demo accounts.
- Email Notifications - Automated emails for events, RSVPs, attendance
- Event Reviews - Rating and feedback system
- Event Resources - Upload slides, videos, documents
- Event Gallery - Photo gallery for events
- Calendar Integration - iCal, Google Calendar, Outlook links
- Analytics Dashboard - Event statistics and insights
- Leaderboard - Student rankings by credits and attendance
- Announcements - Targeted announcements by department/year
- Waitlist Management - Automatic promotion when spots open
- Enhanced Sessions - Multiple sessions per event with individual credits
Once running, visit http://localhost:3000/api-docs for complete API documentation with Swagger UI.
/api/auth/*- Authentication (login, register)/api/events/*- Event management/api/rsvp/*- RSVP operations/api/attendance/*- Attendance tracking/api/reviews/*- Event reviews/api/resources/*- Event resources/api/gallery/*- Event gallery/api/announcements/*- Announcements/api/leaderboard/*- Leaderboards/api/analytics/*- Analytics/api/calendar/*- Calendar integration
make logs # Check logs for errors
make down # Stop everything
make up # Start freshmake db-shell # Connect to database
\dt # List all tables
\d "Event" # Describe Event tablemake clean # Removes all containers and data
make up # Start fresh├── src/
│ ├── controllers/ # Request handlers
│ ├── services/ # Business logic
│ ├── routes/ # API routes
│ ├── middlewares/ # Auth, validation, etc.
│ ├── types/ # TypeScript types
│ └── lib/ # Utilities (Prisma client, etc.)
├── prisma/
│ ├── schema.prisma # Database schema
│ └── migrations/ # Database migrations
├── docker-compose.yml # Docker services config
├── Dockerfile # App container config
├── Makefile # Convenient commands
└── .env # Your configuration (create from .env.example)
- Never commit
.envfile - Use strong JWT_SECRET (32+ characters)
- Use strong POSTGRES_PASSWORD
- Keep SMTP credentials secure
- In production, use proper SSL/TLS
To modify code:
- Edit files locally
- Rebuild:
make down && make up --build - Check logs:
make logs
The system includes these main models:
- User, Admin
- Event, AttendanceSession
- Rsvp, Attendance
- EventReview, EventResource, EventGallery
- Notification, Announcement
- Leaderboard, Analytics
- Tokens (User, Admin)
- Make changes
- Test locally with
make up - Ensure
npm run buildpasses - Submit PR
MIT License
Need help? Check DOCKER.md for more Docker-specific information.