Getting Started
Quick start guide for setting up the HRMS development environment
Getting Started with HRMS
This guide will help you set up the HRMS development environment and get the system running locally.
Prerequisites
Before you begin, ensure you have the following installed:
| Tool | Version | Check Command |
|---|---|---|
| Node.js | 20+ | node -v |
| npm | 10+ | npm -v |
| Docker Desktop | Latest | docker -v |
| Git | Latest | git -v |
Required Tools
All prerequisites are required. The project will not build without them.
Quick Start Path
Follow these phases in order to get a working HRMS system:
| Phase | Document | Time | Result |
|---|---|---|---|
| 00 | Empty Shell | 4-6 hours | Monorepo + Docker + Health endpoint |
| 01 | Multi-Tenant Auth | 8-12 hours | Google OAuth + Protected dashboard |
After Phase 01, you'll have a working HRMS with:
- Multi-tenant database with RLS
- Google SSO authentication
- SystemRole-based access control
- Protected API endpoints
- Basic dashboard
Google OAuth Setup
Required for Phase 01
You don't need OAuth for Phase 00. Set this up before starting Phase 01, Step 13.
Step 1: Create Google Cloud Project
- Go to Google Cloud Console
- Create a new project named "HRMS Dev"
- Select the project from the dropdown
Step 2: Configure OAuth Consent Screen
- Go to APIs & Services → OAuth consent screen
- Select External user type
- Fill in required fields:
- App name:
HRMS Dev - User support email: Your email
- Developer contact: Your email
- App name:
- Skip scopes (defaults are fine)
- Add your email as a test user
- Save and continue
Step 3: Create OAuth Credentials
- Go to APIs & Services → Credentials
- Click Create Credentials → OAuth client ID
- Select Web application
- Name:
HRMS Web Client - Add Authorized redirect URI:
http://localhost:3000/api/auth/callback/google - Click Create
- Copy the Client ID and Client Secret
Step 4: Configure Environment
Create apps/web/.env.local:
# Generate with: npx auth secret
AUTH_SECRET="your-generated-secret-here"
# From Google Cloud Console
GOOGLE_CLIENT_ID="your-client-id.apps.googleusercontent.com"
GOOGLE_CLIENT_SECRET="your-client-secret"Generate AUTH_SECRET:
cd apps/web && npx auth secretEnvironment Variables Reference
For the complete list of environment variables, see:
- Bootstrap Artifacts - Full
.env.exampletemplate
Minimum Required Variables
| Variable | Service | Purpose |
|---|---|---|
DATABASE_URL | API, Web | PostgreSQL connection |
AUTH_SECRET | Web | Auth.js session encryption |
GOOGLE_CLIENT_ID | Web | Google OAuth |
GOOGLE_CLIENT_SECRET | Web | Google OAuth |
Verification Checklist
After completing Phase 00 and Phase 01, verify:
# Services running
docker compose ps # PostgreSQL healthy
curl http://localhost:3000 # Next.js serving
curl http://localhost:3001/health # NestJS connected to DB
# Authentication working
# 1. Go to http://localhost:3000/login
# 2. Sign in with Google
# 3. Should redirect to /dashboard
# 4. Dashboard shows tenantId and systemRoleWhat's Next?
After Phase 01, continue with:
| Phase | Feature |
|---|---|
| Phase 02 | Employee CRUD + Profile pictures |
| Phase 03 | Org structure + Manager assignment |
| Phase 04 | Org chart visualization |
See Implementation Plan for full roadmap.
Working with AI Assistants
This project is designed for AI-assisted development using Cursor or Claude Code.
100+ Pages of Docs
Don't try to read everything. Use these guides to know what to read and when.
Essential Guides
| Guide | Purpose |
|---|---|
| Documentation Map | Which docs to read when - categorized by purpose |
| AI Session Guide | Step-by-step workflow with copy-paste prompts |
Quick Start for AI Development
- One-time setup: Copy state file templates to your code repo
- Each session: AI reads
PROJECT_STATE.md+WHAT_EXISTS.md - Before coding: AI states understanding, you approve
- During work: 30-minute checkpoints to prevent drift
- End session: AI updates state files, you commit
See the AI Session Guide for detailed prompts and workflows.
Troubleshooting
Having issues? See the Troubleshooting Guide for common problems and solutions.
Deployment
Ready to deploy? See the Deployment Guide:
| Guide | Description |
|---|---|
| Infrastructure Setup | GCP project, APIs, service accounts |
| CI/CD Pipeline | GitHub Actions workflow |
| Load Balancer Setup | Custom domain with SSL |
| Domain Setup | DNS configuration |
Live Example: https://docs.hrms.bluewoo.com
Additional Resources
- Technology Stack - Version constraints and packages
- Architecture Principles - Design decisions
- AI Coding Agents Guide - For AI-assisted development
- Live State Tracking - Session management for AI coding
- Deployment - Production infrastructure setup