Skip to content

alfredang/ssg-tms-react-excel

Repository files navigation

SSG TMS React Excel

React TypeScript Vite Ant Design License

A React-based Training Management System for SSG/WSG API integration with Excel bulk upload support

Report Bug Β· Request Feature


About

SSG TMS React Excel is a web application that integrates with SkillsFuture Singapore (SSG) and Workforce Singapore (WSG) APIs, enabling training providers to manage course runs, sessions, trainers, enrolments, assessments, and skills framework data through a unified dashboard.

The app supports bulk operations via Excel file upload (.xlsx), with built-in validation, data preview, and direct API submission β€” streamlining administrative workflows for training providers.

Key Features

  • Course Run Management β€” Publish, edit, delete, and view course runs with sessions and trainers
  • Trainer Management β€” Full CRUD for training provider trainer profiles
  • Enrolment Lifecycle β€” Create, update, cancel, search, and manage fee collections
  • Assessment Management β€” Create, update, void, search, and view assessments
  • Skills Framework β€” Browse occupations, search job roles, and explore skills
  • Excel Bulk Upload β€” Upload .xlsx files with multi-sheet support, field validation, and data preview before submission
  • Centralized API Layer β€” Axios client with interceptors for auth, error handling, and logging

Tech Stack

Layer Technology
Frontend React 19, TypeScript 5
Build Tool Vite 7
UI Library Ant Design 6, Ant Design Icons
HTTP Client Axios
Excel Parsing SheetJS (xlsx)
Routing React Router v7
Date Handling Day.js
API Integration SSG/WSG REST APIs (mTLS + encrypted payloads)

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   Browser UI                     β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚ Dashboard  β”‚ β”‚  Pages   β”‚ β”‚  Excel Upload  β”‚  β”‚
β”‚  β”‚           β”‚ β”‚ (7 modules)β”‚ β”‚  + Preview     β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                 React Hooks                      β”‚
β”‚         useApi() Β· useExcelUpload()              β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚              API Service Layer                   β”‚
β”‚  courseService Β· trainerService Β· enrolmentServiceβ”‚
β”‚  assessmentService Β· skillsService               β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚            Axios Client (ssgClient)              β”‚
β”‚    Auth Headers Β· Error Handling Β· Logging        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚           SSG/WSG REST APIs (mTLS)               β”‚
β”‚  UAT: uat-api.ssg-wsg.sg                        β”‚
β”‚  Prod: api.ssg-wsg.sg                           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Project Structure

ssg-tms-react-excel/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ api/                     # Centralized API service layer
β”‚   β”‚   β”œβ”€β”€ ssgClient.ts         # Axios instance + interceptors
β”‚   β”‚   β”œβ”€β”€ courseService.ts     # Course Runs & Sessions endpoints
β”‚   β”‚   β”œβ”€β”€ trainerService.ts   # Trainer CRUD endpoints
β”‚   β”‚   β”œβ”€β”€ enrolmentService.ts # Enrolment lifecycle endpoints
β”‚   β”‚   β”œβ”€β”€ assessmentService.ts # Assessment lifecycle endpoints
β”‚   β”‚   └── skillsService.ts    # Skills Framework endpoints
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ AppLayout.tsx        # Sider + Content layout
β”‚   β”‚   β”œβ”€β”€ ExcelUpload.tsx      # Upload + preview modal
β”‚   β”‚   β”œβ”€β”€ DataPreview.tsx      # Table with error highlighting
β”‚   β”‚   └── PageHeader.tsx       # Breadcrumbs + title
β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”œβ”€β”€ Dashboard.tsx        # Module navigation
β”‚   β”‚   β”œβ”€β”€ CourseSessions.tsx   # Session retrieval + upload
β”‚   β”‚   β”œβ”€β”€ CourseRuns.tsx       # View/Add/Edit/Delete tabs
β”‚   β”‚   β”œβ”€β”€ Trainers.tsx        # Retrieve/Add/Update/Delete
β”‚   β”‚   β”œβ”€β”€ Enrolments.tsx      # Full enrolment lifecycle
β”‚   β”‚   β”œβ”€β”€ Assessments.tsx     # Full assessment lifecycle
β”‚   β”‚   └── SkillsFramework.tsx # Occupation & job role browser
β”‚   β”œβ”€β”€ hooks/
β”‚   β”‚   β”œβ”€β”€ useApi.ts            # API state management
β”‚   β”‚   └── useExcelUpload.ts   # Excel file handling
β”‚   β”œβ”€β”€ utils/
β”‚   β”‚   β”œβ”€β”€ excelParser.ts      # SheetJS parsing + mapping
β”‚   β”‚   └── validators.ts      # Schema validation
β”‚   β”œβ”€β”€ types/
β”‚   β”‚   └── index.ts            # TypeScript types + enums
β”‚   β”œβ”€β”€ App.tsx                  # Router + theme config
β”‚   └── main.tsx                 # Entry point
β”œβ”€β”€ .env.example                 # Environment variable template
β”œβ”€β”€ package.json
β”œβ”€β”€ tsconfig.json
└── vite.config.ts

Getting Started

Prerequisites

  • Node.js 18+ and npm
  • SSG Developer Portal account with API credentials (developer.ssg-wsg.gov.sg)
  • Client certificate (.pem) and private key for mTLS authentication

Installation

# Clone the repository
git clone https://github.com/alfredang/ssg-tms-react-excel.git
cd ssg-tms-react-excel

# Install dependencies
npm install

# Configure environment
cp .env.example .env
# Edit .env with your SSG API credentials

Environment Variables

Variable Description
VITE_SSG_API_BASE_URL SSG API base URL (UAT or Production)
VITE_SSG_CLIENT_ID OAuth Client ID
VITE_SSG_CLIENT_SECRET OAuth Client Secret
VITE_SSG_UEN Training Provider UEN

Running

# Development server
npm run dev

# Production build
npm run build

# Preview production build
npm run preview

SSG API Endpoints

All endpoints are verified from SSG's official Sample-Codes repository.

Module Endpoint Method
Course Runs /courses/courseRuns/id/{runId} GET
/courses/courseRuns/publish POST
/courses/courseRuns/edit/{runId} POST
Sessions /courses/runs/{runId}/sessions GET
Trainers /tp/trainers GET/POST
Enrolments /tpg/enrolments POST
/tpg/enrolments/details/{refNum} GET/POST
/tpg/enrolments/search POST
/tpg/enrolments/feeCollections/{refNum} POST
Assessments /tpg/assessments POST
/tpg/assessments/details/{refNum} GET/POST
/tpg/assessments/search POST
Skills /skillsFramework/occupations GET
/skillsFramework/jobRoles GET

Excel Upload Format

The app supports .xlsx files with the following sheet structures:

Course Sessions Sheet

Column Required Description
Start Date Yes Session start date
End Date Yes Session end date
Start Time Yes HH:mm format
End Time Yes HH:mm format
Mode of Training Yes Training mode code

Enrolments Sheet

Column Required Description
Course Run ID Yes Target course run
Course Reference Number Yes SSG course reference
Trainee ID Yes NRIC/FIN
Trainee ID Type Yes SB/SO/OT
Trainee Full Name Yes Legal full name
Enrolment Date Yes Date of enrolment
Sponsorship Type Yes EMPLOYER/INDIVIDUAL
Training Partner Code Yes TP code

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Acknowledgements


If you found this useful, give it a star!

About

πŸ“Š React-based Training Management System with SSG/WSG API integration & Excel bulk upload. Built with TypeScript, Vite & Ant Design.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages