Lumina is a comprehensive Training Management System designed specifically for Singapore's training providers. It streamlines the entire learning lifecycle from course creation to certification, with built-in support for Singapore's government funding schemes.
- Multi-Tenant Architecture - Support multiple training providers on a single platform
- Role-Based Access Control - Learners, Trainers, Admins, and Developers
- Course Management - Create courses, topics, subtopics, and assessments
- Class Scheduling - Manage course runs with trainers and venues
- Smart Enrollment - Automated fee calculations with funding deductions
- Payment Processing - Stripe integration for secure payments
- Singapore Funding Support - SSG, SkillsFuture Credit, PSEA, MCES, UTAP, IBF
- AI-Powered Learning - Gemini AI integration for personalized learning paths
- Progress Tracking - Monitor learner progress and assessment results
| Component | URL |
|---|---|
| Frontend | https://tertiary-tms.vercel.app |
| Backend API | https://backend-brown-gamma-63.vercel.app |
| Role | Password | |
|---|---|---|
| Admin | admin@tertiary.edu.sg |
admin123 |
| Trainer | john.smith@tertiary.edu.sg |
trainer123 |
| Learner | alice@example.com |
learner123 |
lumina/
├── src/ # React Frontend
│ ├── components/ # UI Components
│ ├── context/ # React Context (State Management)
│ ├── services/ # API Client & Services
│ ├── types.ts # TypeScript Definitions
│ └── constants.ts # Application Constants
│
├── backend/ # Node.js Backend
│ ├── src/
│ │ ├── config/ # Database, JWT, Stripe configs
│ │ ├── controllers/ # Request handlers
│ │ ├── middleware/ # Auth, RBAC, validation
│ │ ├── routes/ # API route definitions
│ │ ├── services/ # Business logic layer
│ │ └── utils/ # Fee calculator, validators
│ ├── prisma/
│ │ └── schema.prisma # Database schema
│ └── api/
│ └── index.ts # Vercel serverless entry
│
└── docs/ # MkDocs Documentation
- Node.js 18+
- PostgreSQL database (or Neon account)
- Stripe account (for payments)
- Gemini API key (for AI features)
-
Clone the repository
git clone https://github.com/alfredang/lumina.git cd lumina -
Install frontend dependencies
npm install
-
Install backend dependencies
cd backend npm install -
Configure environment variables
Create
backend/.env:# Database DATABASE_URL="postgresql://user:password@host/database?sslmode=require" # JWT JWT_ACCESS_SECRET="your-access-secret-key" JWT_REFRESH_SECRET="your-refresh-secret-key" # Stripe STRIPE_SECRET_KEY="sk_test_..." STRIPE_WEBHOOK_SECRET="whsec_..." # Server PORT=3001 NODE_ENV=development FRONTEND_URL="http://localhost:3000"
Create
.envin root:GEMINI_API_KEY="your-gemini-api-key"
-
Set up the database
cd backend npx prisma migrate dev npm run db:seed -
Start development servers
Terminal 1 (Backend):
cd backend npm run devTerminal 2 (Frontend):
npm run dev
-
Open the application
Navigate to http://localhost:3000
- Import the repository in Vercel
- Set the root directory to
/ - Add environment variable:
GEMINI_API_KEY
- Create a new Vercel project for the backend
- Set the root directory to
backend - Add environment variables:
DATABASE_URLJWT_ACCESS_SECRETJWT_REFRESH_SECRETSTRIPE_SECRET_KEYSTRIPE_WEBHOOK_SECRETFRONTEND_URL
- Create a project at neon.tech
- Copy the connection string
- Add it as
DATABASE_URLin your backend environment - Run migrations:
npx prisma migrate deploy npm run db:seed
| Endpoint | Method | Description |
|---|---|---|
/api/auth/register |
POST | Register new user |
/api/auth/login |
POST | Login and get tokens |
/api/auth/refresh |
POST | Refresh access token |
/api/auth/me |
GET | Get current user profile |
| Endpoint | Method | Description |
|---|---|---|
/api/courses |
GET | List all courses |
/api/courses/:id |
GET | Get course details |
/api/courses |
POST | Create new course (Admin) |
/api/courses/:id |
PUT | Update course (Admin) |
/api/courses/:id |
DELETE | Delete course (Admin) |
| Endpoint | Method | Description |
|---|---|---|
/api/course-runs |
GET | List all course runs |
/api/course-runs/upcoming |
GET | Get upcoming classes |
/api/course-runs/ongoing |
GET | Get ongoing classes |
/api/course-runs |
POST | Create course run |
| Endpoint | Method | Description |
|---|---|---|
/api/enrollments |
POST | Create enrollment |
/api/enrollments/:id/calculate-fees |
POST | Calculate fees with funding |
/api/enrollments/:id/progress |
PUT | Update learning progress |
| Endpoint | Method | Description |
|---|---|---|
/api/payments/create-intent |
POST | Create Stripe PaymentIntent |
/api/payments/confirm |
POST | Confirm payment |
/api/payments/webhook |
POST | Stripe webhook handler |
Lumina supports automatic calculation and integration with Singapore's training funding schemes:
| Funding | Description | Rate |
|---|---|---|
| SSG Grant | SkillsFuture Singapore subsidy | 50-70% |
| SkillsFuture Credit | Citizens 25+ individual credit | Up to $500 |
| PSEA | Post-Secondary Education Account | Variable |
| MCES | Mid-Career Enhanced Subsidy (40+) | 70% |
| UTAP | NTUC Union Training Assistance | 50% (up to $250/year) |
| IBF | Institute of Banking & Finance | Course-specific |
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.