|
Some checks failed
Update README / update-readme (push) Failing after 18s
|
||
|---|---|---|
| .github/workflows | ||
| backend | ||
| docs | ||
| frontend | ||
| scripts | ||
| sdk/nodejs | ||
| third-party-demo | ||
| .gitignore | ||
| .gitkeep | ||
| docker-compose.yml | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
CSIS IAM System
A self-contained Identity and Access Management (IAM) system used for the Hackathon Group 2 demo. This repository contains a NestJS backend API, a React + Vite frontend admin UI, database migration/seeding utilities, and Docker Compose development configuration.
Team Members
| Contributor | ID |
|---|---|
| Sohaila Awaga | 22367543 |
| Shane Hanley | 22356843 |
| Luke Minogue | 22347526 |
| Darren Nugent | 22365893 |
| Mykola Vaskevych | 22372199 |
| Muadh Muhsin Zibiri | 22235302 |
Features
- User management (register, verify email, reset password)
- Roles & permissions
- OAuth / JWT authentication
- Audit logging
- Redis-backed session/cache support
Tech stack
- Backend: NestJS, TypeScript, TypeORM, PostgreSQL, Redis
- Frontend: React + Vite, TypeScript, Tailwind CSS
- Dev / Infra: Docker, Docker Compose
Repository layout
backend/— NestJS API server (source inbackend/src)frontend/— Admin UI (Vite + React)docker-compose.yml— local dev services (db, redis, backend, frontend)scripts/— helper scripts (SQL, PowerShell, batch)sdk/— SDK examples
Prerequisites
- Node.js (v18+ recommended)
- npm (or yarn/pnpm)
- Docker & Docker Compose (for containerized run)
Quick start — development (Windows PowerShell)
- Install dependencies for backend and frontend
cd backend
npm install
cd ..\frontend
npm install
cd ..
- Start services with Docker Compose (database, redis, optional reverse proxy)
# from repository root
docker-compose up -d
- Run backend in dev mode
cd backend
npm run start:dev
The backend runs by default on port 3000 (see backend/src/main.ts or environment configuration).
- Run frontend in dev mode
cd frontend
npm run dev
By default Vite will start on port 5173. Open the admin UI in your browser at http://localhost:5173.
Environment & configuration
- Check
backend/.envor environment variables used in the NestJSConfigModule. - JWT keys and other secrets: see
backend/keys/(example:keyid.txt) — do not commit private keys to source control.
Database migrations & seeding
- Migrations are available via npm scripts in
backend/package.json(migration:generate,migration:run,migration:revert). - A roles seeding helper exists:
backend/seed-roles.jsand SQL files inscripts//scripts/seed-roles.sql.
#to genereate roles and demo users run:
script/generate-users.sh
to test demo application how to use IAM from 3d partie
cd third-party-demo
./start.sh
To run migrations and seed roles:
cd backend
# run migrations
npm run migration:run
# run the Node seed script (if present)
node seed-roles.js
Or run the SQL seed statements against your Postgres instance using psql or your DB client.
Running tests
Backend unit & e2e tests use Jest. From backend/:
cd backend
npm run test # run tests
npm run test:e2e # run integration/e2e tests
Useful backend scripts
npm run start:dev— run NestJS with watchnpm run build— compile TypeScript todist/npm run lint/npm run format— code quality tools
Running everything with Docker Compose
The repository provides docker-compose.yml for a simple local environment including Postgres and Redis. To bring everything up:
# start containers in detached mode
docker-compose up -d --build
# view logs
docker-compose logs -f
When finished, tear down with:
docker-compose down
Troubleshooting
- If migrations fail, confirm the database connection environment variables (host, port, user, password, database).
- If the frontend cannot reach the backend, confirm CORS and that the backend is listening on the expected host/port.
Contributing
- Fork the repo, create a feature branch, add tests, and open a pull request.
License
This project uses the MIT License. See LICENSE if included.
Keeping this README up to date
This README contains a couple of sections that can be regenerated from the repository state:
- The Repository layout section (between
<!-- REPO-LAYOUT-START -->and<!-- REPO-LAYOUT-END -->) can be refreshed to reflect current top-level folders and common files. - The Useful backend scripts section (between
<!-- BACKEND-SCRIPTS-START -->and<!-- BACKEND-SCRIPTS-END -->) is populated frombackend/package.jsonscripts.