Reviewer Note:
This project is fully deployed and ready for live testing.
Frontend (React/Vite):
π https://spt-front.onrender.com
Backend (Express/MongoDB API):
π https://spt-api-w5vi.onrender.com
When logged out, only the Dashboard is visible.
To access Machines, Maintenance, Cycles, and Detail views, please register or log in.
A modern full-stack web app for tracking sterile processing equipment, maintenance, and sterilizer cycles (loads).
Built with React (Vite), Express, MongoDB, and JWT authentication.
| Service | URL |
|---|---|
| π₯οΈ Frontend (React/Vite) | https://spt-front.onrender.com |
| βοΈ Backend (Express/MongoDB API) | https://spt-api-w5vi.onrender.com |
- Add / edit / delete washers, sterilizers, ultrasonics (auth required)
- Machine detail: recent maintenance & cycles (auth required)
- Washer / Ultrasonic descale with daily & time-based tracking (auth required)
- Sterilizers: Daily Inspection and Quarterly Cleaning (auth required)
- Maintenance history view & export
- Log sterilizer loads, test types, and results (auth required)
- Track cycles by date, load type, and operator
- KPIs for todayβs sterilizer cycles & recent maintenance
- Real-time load tracking overview (public)
- Register / Login / Logout with JWT
- Protected routes for all critical data
- Session persistence via
localStoragetoken
- Toast notifications
- Reusable card layouts
- Loading skeletons
- Consistent CSS-based dashboard layout
apps/
ββ server/ β Express API + MongoDB
ββ client/ β React client (Vite)
npm installExample for local development:
# apps/server/.env
PORT=3001
CLIENT_URL=http://localhost:5173
MONGO_URL=mongodb://localhost:27017/spt
JWT_SECRET=your-secret-key
JWT_EXPIRES_IN=7d# apps/client/.env
VITE_API_URL=http://localhost:3001node apps/server/scripts/seed.js# Terminal 1: Express API
npm run dev:server # Runs on http://localhost:3001
# Terminal 2: React client
npm run dev:web # Runs on http://localhost:5173# Build web client
npm run build:web
# Start Express API (after build)
npm run start:server| Command | Description |
|---|---|
dev:server |
Run Express API with nodemon |
dev:web |
Start Vite dev server |
build:web |
Build production-ready client |
start:server |
Run API in production mode |
seed |
Populate MongoDB with demo data |
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/auth/register |
Create new user (email, password, name, employeeId, sterilizationNumber) |
POST |
/api/auth/login |
Authenticate existing user |
GET |
/api/auth/me |
Fetch logged-in user profile (JWT required) |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/machines |
Get all machines |
GET |
/api/machines/:id |
Get machine by ID |
POST |
/api/machines |
Create new machine (auth) |
PUT |
/api/machines/:id |
Update machine (auth) |
DELETE |
/api/machines/:id |
Delete machine (auth) |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/maintenance?machineId=&date= |
Fetch maintenance records |
POST |
/api/maintenance |
Log maintenance activity |
GET |
/api/maintenance/history |
Fetch maintenance history |
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/cycles |
List cycles |
POST |
/api/cycles |
Log sterilizer cycle |
GET |
/api/cycles/:id |
Get cycle detail |
DELETE |
/api/cycles/:id |
Delete a cycle |
Auth required: All write operations.
Header:Authorization: Bearer <token>
- Server-side validation with Zod + Mongoose schemas
- Endpoints protected by JWT
- CORS restricted to
CLIENT_URL - Helmet middleware enabled for HTTP security headers
- Sensitive config via
.env(never committed)
| Collection | Index |
|---|---|
| Maintenance | { machineId: 1, performedAt: -1 } |
| Cycles | { machineId: 1, startedAt: -1 } |
Indexes ensure efficient lookups by machine and date.
-
Login with demo user (or register a new account)
- Use seeded demo data or create your own.
- When logged out, only the Dashboard is visible.
-
Access Restricted Views
- Machines, Maintenance, Cycles, and Detail pages require login.
-
Dashboard KPIs
- Todayβs sterilizer cycles and recent maintenance appear in real-time.
-
Machine Detail View
- Log or view maintenance and sterilizer cycles by machine.
-
Cycle & Maintenance History
- Export reports via CSV from "View Allβ¦" pages.
-
Reports & Recall Tracking
- Track historical loads and maintenance schedules with filters.
Created to streamline and modernize sterile processing operations β from washer to sterilizer β with data-driven visibility.