A comprehensive Learning Management System (LMS) and Training Management System (TMS) with AI capabilities, designed for Singapore's SkillsFuture training ecosystem.
AI-LMS-TMS is a full-stack, enterprise-grade web application that manages the complete training lifecycle - from course creation and scheduling to learner enrollment, progress tracking, assessments, and certification. Built with modern technologies and deep integration with Singapore's SkillsFuture ecosystem, it provides a seamless experience for training providers, trainers, and learners.
- AI-Powered Learning: Nemo AI agent (Claude Agent SDK) with persistent memory and tool use, SEO metadata generator, plus Gemini chatbot and GenAI authoring tools
- SSG Integration: Full SkillsFuture Singapore API support for course runs, enrolments, assessments, grants, and claims
- Multi-Role System: 6 roles with dedicated dashboards — Learner, Trainer, Admin, Developer, Finance, Training Provider
- Financial Operations: QuickBooks integration, personal/company invoice workflows, grant calculators, claim tracking, billing history
- Singapore-Ready: NRIC/FIN validation, UEN verification, WSQ/IBF course support, funding calculations
- Automation: Task Scheduler, webhooks, n8n workflows for trainer invitations, certificate generation, enrollment sync, and more
- Support System: Built-in ticket system for learner, trainer, and admin support
- Workflow Guides: Interactive documentation for all system workflows (Training, Admin, Finance)
- External API: 200+ REST endpoints including external integrations for third-party bots
- Modern Stack: Next.js 16, TypeScript, Tailwind CSS, PostgreSQL, Docker, deployed on Coolify
- Features
- User Roles
- Technology Stack
- API Documentation
- Project Structure
- Database Schema
- Getting Started
- Environment Variables
- Deployment
- Course browsing and enrollment
- Progress tracking through learning units and subtopics
- Assessment submission and grade viewing
- AI chatbot for personalized course assistance
- Certificate download upon completion
- Job search integration
- Calendar view for scheduled classes
- View assigned classes (upcoming, ongoing, completed)
- Digital attendance (eAttendance) tracking
- Assessment grading with rubric support
- Past attendance and assessment history
- Training hours tracking
- Lesson delivery guide and assessment guide
- Ed Tools — Suite of interactive educational tools:
- Ice Breaker — Fun activities to engage learners
- Pinboard — Collaborative idea sharing board
- Break Timer — Musical countdown timer
- Word Cloud — Real-time word clouds
- Flash Cards — Interactive learning flash cards
- Live Q&A — Real-time question and answer board
- Whiteboard — Interactive drawing and annotations
- Collaborative Note — Shared real-time notes
- Collaborative Flow — Visual workflow collaboration
- Collaborative Kanban — Shared kanban task board
- Live Poll — Real-time polling and voting
- MindMaps — Collaborative mind mapping
- Spinning Wheel — Random selection spinner
- 5 Whys — Root cause analysis tool
- Fishbone Diagram — Cause-and-effect (Ishikawa) diagram
- Pareto Chart — Identify the most significant factors
- System Thinking — Feedback loop visualisation
- Mock Data Generator — Generate sample datasets
- Virtual Collaboration Tools — Google Meet, Microsoft Teams, Zoom
- Data Analytics Tools — Pivot Visualization
- Statistics Tools — Descriptive, Correlation, Regression, Hypothesis, Chi-Square, ANOVA (NovaStats)
- Design of Experiments (DOE) — Full Factorial, Fractional Factorial, Taguchi, Central Composite, Box-Behnken, Plackett-Burman, Latin Square, Response Surface (NovaDOE)
- Statistical Process Control (SPC) — c Chart, u Chart, np Chart, p Chart, X-mR Chart, X̄-R Chart, X̄-s Chart, Distribution, Process Capability (NovaSPC)
- Finance Tools — Tax Calculator, Financial Planning & Analysis, Financial Ratio Calculators
- Sustainability Tools — Carbon Footprint Calculator
- GenAI Tools — Curated links to ChatGPT, Gemini, Claude, and UI design tools (Figma, Stitch)
- Agentic AI Tools — No/Low Code Platforms (AgentX, Opal, Relevance AI, n8n, Langflow, Flowise), Voice Agents (ElevenLabs, Retell AI, Vapi), Video Agents (HeyGen, Synthesia)
- Admin Dashboard — KPI cards: Ongoing Classes, Upcoming Classes, Completed Classes, Assigned Trainers (Local), Missing Trainers (Local/TPG)
- Workflow Guides — Interactive documentation organized by category (Training, Admin, Finance) with 10+ workflow guides including SSG Process Steps
- Support Tickets — Ticket management system for handling learner, trainer, and user support requests
- Calendar & Scheduler — View and manage training calendar, search by course code/title/name/date
- Course Management — View courses, trainers, funding validity
- Class Management — View learners, manage upcoming/ongoing/completed classes, assign trainers and learners, search past learners
- Direct Application — Upload, view, and manage direct applications
- TPG Management (SkillsFuture)
- Course Run: Create, search, view, upload, delete course runs; manage sessions and attendance
- Enrolment: Enroll learners, bulk upload, search/view/update/cancel enrolments, manage fees
- Assessment: Submit, update, search, and view SSG assessments
- Grant: Search grants and view grant status
- Certificate Management — Create, delete, and send certificates (SG and GH variants) with configurable CC email lists
- Reference Links — Configurable external links (Master List, TMS, FMS, MMS, TPMS)
- n8n Links — Quick access to n8n workflow hosts
- Useful Links — Quick access to Magento backend and other tools
- Financial Dashboard — Grants and Claims overview with KPIs: Total Grants, Total Estimated, Total Approved
- FMS (n8n) Automation — View All Course Runs, Process Enrolments, Manual Enrolment, Create Enrolments For Error Status, Employer Enrolment, Append Cancelled Class Trainees, Update Assessment, Process Grants, Update Grant Status & Total Grant, Grant Query, Direct Application, Check Duplicates for DA, Update Claim ID
- TPG Management — Full SSG course run, enrolment, session, attendance, assessment, grant, and claim management
- Claim Management — Search, view, upload, and cancel SSG claims; track outstanding claims
- QuickBooks Integration — OAuth2 proxy supporting query, create, send, delete, void, pdf, read actions on estimates, invoices, and payments
- Bizfile Integration — Company profile, key dates, address, SSIC, capital, shareholders lookup
- Workflow Guides — Billing History, Proforma Invoice, Personal Invoice, Company Invoice, Receipt workflows
- Useful Links — Quickbooks, Vendors@gov, GeBiz, Bizfile quick access
- Personal Invoice Workflow
- Create enrollment and grant on SSG
- Retrieve Enrolment ID and Grant ID from SSG
- Trigger QuickBooks to generate invoice and send to learner
- Download PDF to Google Drive
- Record in learner's billing history
- Company Invoice Workflow
- Send Excel template to company contact
- Receive completed Excel file
- Upload Excel file to TMS
- Create enrollment and grant for each record on SSG
- Retrieve Enrolment ID and Grant ID from SSG
- Trigger QuickBooks consolidated invoice and send to company contact
- Download PDF to Google Drive
- Record in company contact's billing history
- Course content creation and editing
- Assessment authoring with multiple assessment methods (Written, Practical, Case Study, Role Play, Oral Questioning, Project, Assignment)
- Learning unit and subtopic management
- Course material uploads (lesson plans, slides, guides)
- SEO Metadata Generator — AI-powered SEO metadata generation for WSQ and non-WSQ courses using Claude Agent SDK
- WSQ: Meta title (with WSQ prefix), keywords, description with 70% funding subsidy, course description, and 20 job roles
- Non-WSQ: Region-specific meta titles (Singapore, Malaysia with HRD Corp, International), keywords, description, course description, and 20 job roles
- Training Dashboard — Organization overview and statistics
- Workflow Guides — Interactive workflow documentation organized by category (Training, Admin, Finance)
- Course Management — Full course catalog and course run management
- User Management — Add, remove, and manage users; assign/update roles; enable/disable accounts
- Role Management — Manage admin-level accounts and role assignments
- Finance Management — Access to all finance features (grants, claims, QuickBooks, billing)
- Company Setting
- Company profile (name, UEN, address, logo, color scheme)
- Contact person management
- Integrations — Google (Calendar, OAuth, Certificate Folder), n8n (Host URLs), Magento (Backend URL), Reference Links
- SSG Authentication — SSG certificate, private key, and encryption key (with support for App1, App3, App4 credentials)
- LLM Credentials — Anthropic, OpenAI, Gemini, MiniMax, Kimi, DeepSeek with default and fallback provider selection
- Security Settings — OTP login, default OTP, force first password change, default password, sensitive data masking
- Admin Settings — Auto-send pro-forma invoices, confirmation emails, invoices on grant success, receipts, certificates, thank-you emails
- Gaming Settings — Leaderboard and points system toggles
- Funding Settings — Normal/enhanced funding rates, GST configuration
- Document Templates — Proforma invoice, invoice, receipt, and certificate templates (text IDs or file uploads)
- SSG API Summary — Full summary of SSG API endpoints and their status
- API Endpoints — Built-in interactive API documentation covering all 200+ endpoints
- Task Scheduler — Schedule and manage automated tasks (auto-create certificates, auto-send emails, sync operations)
- Webhooks — Configure and monitor webhooks with webhook logs for debugging
- Email Templates — OTP, Certificate, Feedback, Password Reset, Trainer Invitation, Trainer Accept/Decline, Final Class Confirm, Class Confirm, Privacy Policy, Acceptable Use Policy
- Useful Links — SSG API Portal, SSG Developer quick access
- Help & Support — Built-in support ticket system where learners can raise new tickets for course, connectivity, session, or payment issues
- Contact Information — Direct access to company address, hotline (+65 6100 0613), support email (enquiry@tertiaryinfotech.com), and opening hours
- Nemo AI Agent — Claude Agent SDK-powered operational assistant with:
- Persistent memory via Markdown files and Claude skills (
.claude/skills/nemo-agent/SKILL.md) - Role-based tool access (read-only for learners, full access for admin/finance/training provider)
- 18 tools including dashboard queries, course run search, trainer management, enrollment operations, proforma/invoice generation, QuickBooks operations, SSG course operations
- Agentic tool-use loop (up to 10 iterations per request)
- Persistent memory via Markdown files and Claude skills (
- SEO Metadata Generator — Claude-powered SEO content generation for WSQ and non-WSQ courses
- AI Chatbot — Gemini-powered chatbot for learner assistance on public landing page
- GenAI Authoring — AI content generation for course development
- Quiz Generator — AI-generated quizzes based on course content
- Task Scheduler — Schedule and run automated tasks: Auto Create Certificates, Auto Send Course Confirmation, Auto Create Learners, Auto Create Assessment Records, etc.
- Webhook System — Configure webhooks with full logging for external integrations
- Trainer Invitation Workflow — Automated cascading trainer invitations with accept/decline webhooks; if a trainer declines, system auto-sends to next available trainer
- Certificate Workflow — Auto-generate certificates after class completion, upload to Google Drive, and email to learners
- Auto-Create Learners — Automatically creates learner accounts for course runs starting today (via n8n)
- Auto-Assign Trainers — Bot-driven trainer assignment with fallback logic
- Course Run Date Sync — Automatic synchronization of dates with SSG
- Enrolment Backfill — Batch sync of enrollment data from SSG
- Auto-Send Emails — Configurable auto-send for proforma invoices, confirmation emails, invoices, receipts, certificates, and thank-you emails
- SSG API Integration - Full SkillsFuture Singapore API support
- Course run management (create, view, edit, delete, publish)
- Session and attendance management
- Enrolment synchronization
- Assessment submission and updates
- Grant search and status tracking
- SSG data encryption/decryption
- WSQ/IBF Course Support - Support for WSQ, IBF, and non-WSQ funded courses
- Funding Calculations - Normal (50%/70%), enhanced (MCES), and GST calculations
- Singapore ID Validation - NRIC/FIN and UEN verification
| Role | Description | Key Permissions |
|---|---|---|
| Learner | Course participants | Enroll in courses, track progress, submit assessments, download certificates, raise support tickets |
| Trainer | Course instructors | View assigned classes, take attendance, grade assessments, access Ed Tools and GenAI tools |
| Developer | Course developers | Create and edit course content, assessments, learning materials, SEO metadata generation |
| Admin | System administrators | Full class management, trainer/learner assignment, TPG management, certificate generation, ticket system, workflow guides |
| Finance | Financial operations | Financial dashboard, FMS automation, QuickBooks, claims, grants, personal/company invoice workflows, Bizfile lookup |
| Training Provider | Organization admins | Company settings, user/role management, finance management, scheduler, webhooks, email templates, API documentation |
| Category | Technology |
|---|---|
| Framework | Next.js 16 (Pages Router, TypeScript) |
| Frontend | React 18, Tailwind CSS |
| Database | PostgreSQL 17 |
| Authentication | JWT + OTP (bcryptjs, jsonwebtoken) |
| AI Integration | Claude Agent SDK, Anthropic SDK, Google Generative AI (Gemini), OpenAI, MiniMax, Kimi, DeepSeek |
| Finance Integration | QuickBooks Online (OAuth2), Bizfile API |
| File Uploads | Multer, Google Drive API |
| Nodemailer (Gmail OAuth2) | |
| Password Hashing | bcryptjs |
| Icons | Lucide React |
| Database Client | pg (node-postgres) |
| Container | Docker, Docker Compose |
| Deployment | Coolify (self-hosted) |
| Automation | n8n workflows, Task Scheduler, Webhooks |
| E-commerce | Magento integration |
POST /api/external/assign-trainer # Assign trainer to course run
POST /api/external/unassign-trainer # Remove trainer from course run
GET /api/external/get-course-run # Get course run details
GET /api/external/list-course-runs # List course runs (with filters)
GET /api/external/list-trainers # List trainers (with filters)
POST /api/external/auto-create-learners # Auto-create learner accounts
POST /api/external/sync-course-run-dates # Sync dates with SSG
GET /api/external/backfill-enrollments # Preview enrollment backfill
POST /api/external/backfill-enrollments # Execute enrollment backfill
POST /api/auth/login # Login (password or OTP)
POST /api/auth/send-otp # Send OTP to email
PUT /api/auth/update-password # Update user password
GET /api/courses/list # List all courses
GET /api/courses/detail # Get course details
POST /api/courses/create-course # Create course (multipart)
POST /api/admin/save-course-run # Create/update course run
GET /api/admin/search-course-runs # Search course runs
POST /api/admin/import-course-run # Import from SSG
POST /api/enrolment/create # Create enrolment
GET /api/enrolment/search # Search enrolments
GET /api/enrolment/view # View enrolment details
PUT /api/enrolment/update # Update enrolment
POST /api/enrolment/cancel # Cancel enrolment
POST /api/enrolments/bulk-create # Bulk create enrolments
POST /api/assessments/publish # Publish assessment
POST /api/submissions/submit # Submit assessment
POST /api/grading/update-grading # Grade submission
POST /api/assessments/ssg-create # Create SSG assessment
PUT /api/assessments/ssg-update # Update SSG assessment
POST /api/admin/create-learner-account # Create learner
POST /api/admin/add-trainer # Add trainer
POST /api/admin/assign-all-roles # Assign roles to user
POST /api/training-provider/update-user-roles # Update user roles
POST /api/training-provider/delete-user # Disable user
POST /api/admin/bulk-upload-courses # Bulk import courses
POST /api/admin/bulk-upload-trainers # Bulk import trainers
Full interactive API documentation with example requests/responses is available in-app under Training Provider > API Endpoints.
ai-lms-tms/
├── components/ # React components
│ ├── admin/ # Admin dashboard & management
│ ├── trainer/ # Trainer views & tools
│ ├── training-provider/ # Training provider management
│ ├── ssg/ # SSG API integration views
│ ├── ui/ # Reusable UI components
│ ├── common/ # Shared components
│ ├── LoginScreen.tsx # Authentication screen
│ ├── AiChatbot.tsx # Gemini-powered chatbot
│ ├── CourseDetail.tsx # Course detail view
│ ├── GradingView.tsx # Assessment grading
│ └── ...
│
├── pages/ # Next.js pages & API routes
│ ├── api/
│ │ ├── admin/ # Admin operations (~58 endpoints)
│ │ ├── external/ # External bot APIs (8 endpoints)
│ │ ├── auth/ # Authentication (7 endpoints)
│ │ ├── courses/ # Course management (17 endpoints)
│ │ ├── enrolment/ # Enrolment operations
│ │ ├── assessments/ # Assessment CRUD & SSG
│ │ ├── grading/ # Grading system
│ │ ├── trainer/ # Trainer operations
│ │ ├── training-provider/ # TP management (13 endpoints)
│ │ ├── profile/ # User profiles
│ │ ├── ssg/ # SSG API proxies
│ │ ├── ai/ # AI endpoints
│ │ ├── upload/ # File uploads
│ │ └── grants/ # Grant management
│ ├── _app.tsx
│ └── index.tsx # Main SPA entry
│
├── lib/ # Core libraries
│ ├── services/ # Business logic services
│ │ ├── authService.ts # Authentication logic
│ │ ├── certificateService.ts # Certificate generation
│ │ ├── geminiService.ts # AI integration
│ │ └── ...
│ ├── ssg/ # SSG API utilities
│ ├── config.ts # Environment configuration
│ └── db.ts # PostgreSQL connection pool
│
├── contexts/ # React context (LmsContext)
├── types/ # TypeScript definitions
├── database/ # SQL schema & migrations
├── scripts/ # Utility scripts
├── styles/ # Global CSS
└── public/ # Static assets & uploads
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ app_user │────>│ user_role_map │ │ training_provider│
│ (Core User) │ │ (Roles) │ │ (Tenant) │
└────────┬────────┘ └─────────────────┘ └────────┬────────┘
│ │
┌────┴────┬────────────┬────────────┐ │
v v v v │
┌────────┐┌────────┐┌───────────┐┌───────────┐ │
│learner ││trainer ││ developer ││ admin │ │
│_profile││_profile││ _profile ││ _profile │ │
└───┬────┘└───┬────┘└───────────┘└───────────┘ │
│ │ │
v v │
┌─────────────────┐ ┌─────────────────┐ │
│ enrollment │────>│ course_run │<───────────┘
│ (User<>Course) │ │ (Scheduled) │
└────────┬────────┘ └────────┬────────┘
│ │
│ ┌────────┴────────┐
│ v v
│ ┌─────────────┐ ┌─────────────┐
│ │ course │ │ assessment │
│ │ (Template) │ │ (Tests) │
│ └──────┬──────┘ └──────┬──────┘
│ │ │
│ ┌──────┴──────┐ │
│ v v │
│ ┌──────────┐ ┌──────────┐ │
│ │ learning │ │ subtopic│ │
│ │ _unit │ │ │ │
│ └──────────┘ └──────────┘ │
│ │
└───────────────────────────────┘
│
┌──────┴──────┐
v v
┌───────────┐ ┌───────────┐
│submission │ │assessment │
│ (Files) │ │ _grade │
└───────────┘ └───────────┘
| Table | Description |
|---|---|
app_user |
Core user accounts with email, password hash, and profile |
user_role_map |
Maps users to roles (Learner, Trainer, Admin, Developer, Training Provider) |
training_provider |
Organization settings, templates, integrations, and security config |
training_provider_member |
User membership in training provider organizations |
course |
Course templates with metadata, materials, funding info, and assessment methods |
course_run |
Scheduled course instances with dates, trainers, and digital attendance |
enrollment |
Learner enrollments with progress, payment, and sponsorship tracking |
assessment |
Course assessments (Written, Practical, Case Study, Role Play, etc.) |
submission |
Learner assessment submissions |
learning_unit |
Course chapters/modules |
subtopic |
Individual learning topics within units |
- Node.js 18+
- PostgreSQL 17+
- npm or yarn
-
Clone the repository
git clone https://github.com/alfredang/AI-LMS-TMS.git cd AI-LMS-TMS -
Install dependencies
npm install
-
Configure environment variables
cp .env.example .env.local # Edit .env.local with your configuration -
Set up the database
# Run schema migration psql -f database/01-schema.sql # Seed initial data (optional) psql -f database/02-data-clean-fixed.sql
-
Start development server
npm run dev
The application will be available at
http://localhost:3000
Create a .env.local file with the following variables:
# Database Connection
DATABASE_URL=postgresql://user:password@host:port/database
# Application URLs
NEXT_PUBLIC_BASE_URL=http://localhost:3000
BASE_URL=http://localhost:3000
# JWT Authentication
JWT_SECRET=your-secure-jwt-secret
# Google Gemini AI
NEXT_PUBLIC_GOOGLE_GEMINI_API_KEY=your-gemini-api-key
# SSG API Integration
SSG_API_BASE_URL=https://api.ssg-wsg.sg
# External API Authentication
EXTERNAL_API_KEY_FOR_CLAWDBOT=your-external-api-keyThe application is deployed on Coolify at https://ai-lms-tms.tertiaryinfo.tech. Pushes to main trigger automatic redeployment.
# Build for production
npm run build
# Start production server
npm startFull documentation is available at https://alfredang.github.io/AI-LMS-TMS/
| Role | Guide |
|---|---|
| Learner | Learner User Guide |
| Trainer | Trainer User Guide |
| Developer | Developer User Guide |
| Admin | Admin User Guide |
| Finance | Finance User Guide |
| Training Provider | Training Provider Guide |
This project is proprietary software developed by Tertiary Infotech Pte Ltd. All rights reserved.
Developed by Tertiary Infotech Pte Ltd
Empowering Training Excellence in Singapore
