No description
Find a file
Mykola_Vaskevych af311b26e1
Some checks failed
Update README / update-readme (push) Failing after 18s
Update README.md
2025-11-23 17:00:47 +00:00
.github/workflows Added README script and workflow 2025-11-23 15:31:16 +00:00
backend Upload files to "backend" 2025-11-23 15:51:23 +00:00
docs sctructure adeed 2025-11-23 10:12:55 +00:00
frontend fixed search/filter 2025-11-23 16:02:03 +00:00
scripts Added README script and workflow 2025-11-23 15:31:16 +00:00
sdk/nodejs nodejs sdk 2025-11-23 13:19:42 +00:00
third-party-demo 3d party (run .sh) 2025-11-23 16:24:32 +00:00
.gitignore added to gitignore package-lock file 2025-11-23 13:38:59 +00:00
.gitkeep sctructure adeed 2025-11-23 10:12:55 +00:00
docker-compose.yml docker compose 2025-11-23 10:27:03 +00:00
package-lock.json Upload files to "/" 2025-11-23 12:43:39 +00:00
package.json Upload files to "/" 2025-11-23 12:43:39 +00:00
README.md Update README.md 2025-11-23 17:00:47 +00:00

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 in backend/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)

  1. Install dependencies for backend and frontend
cd backend
npm install
cd ..\frontend
npm install
cd ..
  1. Start services with Docker Compose (database, redis, optional reverse proxy)
# from repository root
docker-compose up -d
  1. 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).

  1. 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/.env or environment variables used in the NestJS ConfigModule.
  • 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.js and SQL files in scripts/ / 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 watch
  • npm run build — compile TypeScript to dist/
  • 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 from backend/package.json scripts.