Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

🔐 Secure Access Control Management System (SACMS)

A production-grade, purely digital Role-Based Access Control (RBAC) platform with full audit logging.


Tech Stack

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

Setup & Running

1. Install dependencies

# Backend
cd backend && npm install

# Frontend
cd ../frontend && npm install

2. Configure backend/.env

DATABASE_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"

3. Initialize the database

cd backend
npx prisma generate
npx prisma db push
node prisma/seed.js

4. Start both servers

# Terminal 1
cd backend && npm run dev

# Terminal 2
cd frontend && npm run dev

Open http://localhost:5173

Default login: superadmin@sacms.local / SuperAdmin@123


API Reference

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

About

Project Exhibition I

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages