GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com โ€” GitHub - ReineRahim/simAid_project: SimAid is a full-stack web application that gamifies first aid learning through interactive quizzes and scenarios.

BranchesTags
Open more actions menu

Latest commit

 

History

8 Commits
8 Commits

Folders and files

NameName
Last commit message
Last commit date
api
api
 
 
frontend
frontend
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 

Repository files navigation

๐Ÿฉน SimAid โ€” Interactive First Aid Training Platform

SimAid is a full-stack web application that gamifies first aid learning through scenario-based simulations.
Users progress through levels, earn badges, and unlock certificates for mastering key emergency response skills.


๐Ÿš€ Tech Stack

๐Ÿ–ฅ๏ธ Frontend

  • React 18 with functional components and hooks
  • Custom Hooks Architecture for modular logic (useAuth, useLevels, useUserLevels, etc.)
  • React Router for page navigation
  • CSS Modules / Custom Styles (/styles/)
  • Responsive design, accessible and mobile-friendly

โš™๏ธ Backend

  • Node.js + Express.js
  • MySQL 8+ database with mysql2/promise connection pool
  • Domain-driven structure with:
    • Entities
    • Repositories
    • Services
    • Controllers
  • JWT Authentication (access token)
  • Bcrypt password hashing
  • Role-based Access Control (RBAC) via isAdmin middleware
  • Validation Layer using express-validator
  • Centralized Error Handling

๐Ÿงฉ Key Features

Category Description
๐ŸŽฎ Scenarios & Steps Interactive multi-step training scenarios with MCQ-style questions and feedback
๐Ÿง  Levels Structured progression system with increasing difficulty
๐Ÿ… Badges Earn badges when you complete levels with perfect scores
๐Ÿงพ Certificates Generate printable/shareable PDF certificate on completion
๐Ÿ‘ค User System Registration, login, JWT sessions, role-based access
๐Ÿ’พ Progress Tracking Saves attempts, tracks scores, and unlocks next levels automatically

๐Ÿ—‚๏ธ Project Structure

๐Ÿฉน SimAid โ€” Interactive First Aid Training Platform

SimAid is a full-stack web application that gamifies first aid learning through scenario-based simulations.
Users progress through levels, earn badges, and unlock certificates for mastering key emergency response skills.


๐Ÿš€ Tech Stack

๐Ÿ–ฅ๏ธ Frontend

  • React 18 with functional components and hooks
  • Custom Hooks Architecture for modular logic (useAuth, useLevels, useUserLevels, etc.)
  • React Router for page navigation
  • CSS Modules / Custom Styles (/styles/)
  • Responsive design, accessible and mobile-friendly

โš™๏ธ Backend

  • Node.js + Express.js
  • MySQL 8+ database with mysql2/promise connection pool
  • Domain-driven structure with:
    • Entities
    • Repositories
    • Services
    • Controllers
  • JWT Authentication (access token)
  • Bcrypt password hashing
  • Role-based Access Control (RBAC) via isAdmin middleware
  • Validation Layer using express-validator
  • Centralized Error Handling

๐Ÿงฉ Key Features

Category Description
๐ŸŽฎ Scenarios & Steps Interactive multi-step training scenarios with MCQ-style questions and feedback
๐Ÿง  Levels Structured progression system with increasing difficulty
๐Ÿ… Badges Earn badges when you complete levels with perfect scores
๐Ÿงพ Certificates Generate printable/shareable PDF certificate on completion
๐Ÿ‘ค User System Registration, login, JWT sessions, role-based access
๐Ÿ’พ Progress Tracking Saves attempts, tracks scores, and unlocks next levels automatically

๐Ÿ—‚๏ธ Project Structure

simaid/
โ”œโ”€โ”€ backend/
โ”‚ โ”œโ”€โ”€ src/
โ”‚ โ”‚ โ”œโ”€โ”€ config/ # Database connection + health check
โ”‚ โ”‚ โ”œโ”€โ”€ controllers/ # Route controllers (Express)
โ”‚ โ”‚ โ”œโ”€โ”€ domain/
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ entities/ # Data models
โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ repositories/# Database queries
โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ dto/ # DTOs for clean data transfer
โ”‚ โ”‚ โ”œโ”€โ”€ middlewares/ # Auth / Error handling
โ”‚ โ”‚ โ”œโ”€โ”€ routes/ # RESTful routes
โ”‚ โ”‚ โ”œโ”€โ”€ services/ # Business logic
โ”‚ โ”‚ โ”œโ”€โ”€ utils/ # Helpers (JWT, bcrypt, feedback, etc.)
โ”‚ โ”‚ โ”œโ”€โ”€ app.js # Express app setup
โ”‚ โ”‚ โ””โ”€โ”€ server.js # Entry point
โ”‚ โ””โ”€โ”€ package.json
โ”‚
โ”œโ”€โ”€ frontend/
โ”‚ โ”œโ”€โ”€ src/
โ”‚ โ”‚ โ”œโ”€โ”€ components/ # Reusable UI components
โ”‚ โ”‚ โ”œโ”€โ”€ hooks/ # Custom React hooks
โ”‚ โ”‚ โ”œโ”€โ”€ pages/ # Page-level components (Home, Level, Profile)
โ”‚ โ”‚ โ”œโ”€โ”€ services/ # API services
โ”‚ โ”‚ โ”œโ”€โ”€ styles/ # CSS styles
โ”‚ โ”‚ โ””โ”€โ”€ app.jsx
โ”‚ โ””โ”€โ”€ package.json
โ”‚
โ”œโ”€โ”€ .env.example # Environment variable template
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ package.json # Root project config (optional)

โš™๏ธ Environment Variables

Create a .env file inside the backend directory:

PORT=4000
DB_HOST=localhost
DB_USER=root
DB_PASS=yourpassword
DB_NAME=simaid
JWT_SECRET=supersecretkey
JWT_EXPIRES_IN=7d

## Setup & Installation:

git clone https://github.com/yourusername/simaid.git
cd simaid

## Install dependencies:

# Backend
cd backend
npm install

#Frontend
cd ../frontend
npm install

## Set up database

CREATE DATABASE simaid;

Then import your schema file:

## Run the app:

## Backend:

cd backend
npm run dev

It will start at http://localhost:4000

## Frontend:

cd ../frontend
npm run dev

Accessible at http://localhost:5173


# API Endpoints:

| Method | Endpoint                        | Description               |
| ------ | ------------------------------- | ------------------------- |
| `POST` | `/api/users/register`           | Register new user         |
| `POST` | `/api/users/login`              | Login user                |
| `GET`  | `/api/levels`                   | Fetch all levels          |
| `GET`  | `/api/scenarios/level/:levelId` | Get scenarios by level    |
| `POST` | `/api/attempts`                 | Save or update best score |
| `GET`  | `/api/user-levels`              | Get user level progress   |
| `POST` | `/api/user-badges`              | Assign badge to user      |

## Development Notes

Each repository handles a single SQL responsibility.
Service layer encapsulates business logic.
Controllers manage route I/O and responses.
React hooks keep frontend logic modular and reusable.
Fully written in ESM syntax (import/export).

## Future Enhancements:

๐Ÿงฉ Add leaderboard for top performers
๐Ÿ”” Real-time notifications (WebSocket)
๐ŸŒ Multi-language support
๐Ÿ“ฑ PWA mode for offline training

## Credits

Author: Reine Rahim
Email: [email protected]
Organization: plus
Framework: Node.js + React + MySQL

About

SimAid is a full-stack web application that gamifies first aid learning through interactive quizzes and scenarios.

Topics

cssfirstaidhtmljavascript

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 โ€” GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800ร—600. No cookies required.