Skip to content

abdulloooh/iam_service

Repository files navigation

IAM Service

A minimal IAM (Identity and Access Management) REST API built with NestJS, TypeORM, and PostgreSQL, supporting:

  • User registration & authentication
  • Role-based access control (RBAC)
  • Appointment scheduling with user associations
  • Secure JWT-based auth

Tech Stack

  • Node.js (TypeScript)
  • NestJS
  • PostgreSQL
  • TypeORM
  • class-validator
  • Passport + JWT

Features

Users

  • Register
  • Login (JWT-based)
  • Role assignment (default: user)
  • User management (CRUD)

Auth

  • JWT guard for protected routes
  • Role-based guard for admin-only routes

Appointments

  • Users can create and view their own appointments
  • Admins can view all appointments or filter by user

Getting Started

Prerequisites

  • Node.js (v18 or later)
  • PostgreSQL

Setup

# Clone the repo
git clone https://github.com/abdulloooh/iam_service
cd iam_service

# Install dependencies
npm install

# Copy and update environment config
cp .env.example .env
# Fill in values

Database Migration

# Generate migrations after entity changes
npm run migration:generate -name=migration_name

# Run pending migrations
npm run migration:run

Development

npm run start:dev

Testing

# Run unit tests
npm run test
# Run e2e tests
npm run test:e2e

ER Diagram

An Entity-Relationship Diagram is available under docs/erd.png.


API Documentation

API documentation is available via Postman: 👉 Postman Collection

This includes all endpoints for authentication, user management, role-based access control, and appointment handling.


Design Document

A brief design document is available at docs/design.md.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published