Skip to content

NarMadat/sec-project

Repository files navigation

README

Quick Start

Option 1: Using Make (Recommended)

# Initial setup
make setup

# Start all services
make start

# Stop services
make stop

Option 2: Manual Setup

# 1. Copy environment file
cp .env.example .env

# 2. Install dependencies
pnpm install

# 3. Start infrastructure
docker-compose up -d postgres redis kafka zookeeper

# 4. Setup databases
pnpm run db:generate
pnpm run db:migrate

# 5. Start all services
pnpm run start:dev

Option 3: Full Docker Setup

# Build and start everything
docker-compose up --build

Testing the APIs

Once all services are running, you can access:

Example API Calls

  1. Register User:
curl -X POST http://localhost:3000/api/auth/register \
  -H "Content-Type: application/json" \
  -d '{"email":"[email protected]","password":"password123","role":"ADMIN"}'
  1. Login:
curl -X POST http://localhost:3000/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email":"[email protected]","password":"password123"}'
  1. Create Employee (with JWT token):
curl -X POST http://localhost:3000/api/employees \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -d '{"userId":"user-id","firstName":"John","lastName":"Doe","phoneNumber":"+1234567890","position":"Guard","status":"ACTIVE"}'

About

Distributed security-management platform built with NestJS microservices, an API gateway, and Dockerized infrastructure.

Resources

Stars

Watchers

Forks

Releases

Contributors

Languages