A production-grade, purely digital Role-Based Access Control (RBAC) platform with full audit logging.
| Layer | Technology |
|---|---|
| Backend Runtime | Node.js 18+ |
| Web Framework | Express.js |
| Database | PostgreSQL |
| ORM | Prisma |
| Auth | bcrypt + jsonwebtoken |
| Security | helmet, cors, express-rate-limit |
| Frontend | React 18 + Vite |
| Styling | TailwindCSS v3 |
| HTTP Client | Axios |
# Backend
cd backend && npm install
# Frontend
cd ../frontend && npm installDATABASE_URL="postgresql://postgres:YOUR_PASSWORD@localhost:5432/sacms?schema=public"
JWT_SECRET="your-64-char-random-hex"
JWT_EXPIRES_IN="8h"
BCRYPT_SALT_ROUNDS=12
PORT=5000
CORS_ORIGIN="http://localhost:5173"
NODE_ENV="development"cd backend
npx prisma generate
npx prisma db push
node prisma/seed.js# Terminal 1
cd backend && npm run dev
# Terminal 2
cd frontend && npm run devDefault login: superadmin@sacms.local / SuperAdmin@123
| Method | Endpoint | Permission |
|---|---|---|
| POST | /api/auth/register | Public |
| POST | /api/auth/login | Public (rate-limited) |
| GET | /api/auth/me | Any authenticated |
| GET | /api/users | read:users |
| GET | /api/users/roles | read:users |
| DELETE | /api/users/:id | delete:users |
| GET | /api/auditlogs | read:auditlogs |
| GET | /api/auditlogs/stats | read:auditlogs |
| GET | /health | Public |