Date: November 1, 2025
Branch: main
Prerequisites: All 281 backend tests passing ✅
# Check backend
lsof -ti:8090 && echo "Backend: ✅" || echo "Backend: ❌"
# Check frontend
lsof -ti:4200 && echo "Frontend: ✅" || echo "Frontend: ❌"
# Backend (Terminal 1)
cd /Users/sarkout/projects/prive/mahmoud-consultancy/backend
./mvnw spring-boot:run
# Frontend (Terminal 2)
cd /Users/sarkout/projects/prive/mahmoud-consultancy/frontend/recruitment-portal
npm start
Goal: Verify complete user journey through browser
Test Flow:
User Registration
User Login
CV Builder - Complete Flow
Success Criteria:
Testing Tools:
Goal: Generate type-safe models from OpenAPI spec
Steps:
Install OpenAPI Generator
cd frontend/recruitment-portal
npm install --save-dev @openapitools/openapi-generator-cli
Generate TypeScript Models
# Option 1: Generate Angular services (full)
npx openapi-generator-cli generate \
-i http://localhost:8090/v3/api-docs \
-g typescript-angular \
-o src/app/generated-api
# Option 2: Generate types only (lighter)
npx openapi-typescript http://localhost:8090/v3/api-docs \
--output src/app/models/api-types.ts
Update Services
Add npm script
// package.json
"scripts": {
"generate:api": "openapi-typescript http://localhost:8090/v3/api-docs -o src/app/models/api-types.ts"
}
Success Criteria:
Goal: Prepare application for production deployment
Create Production Profile:
# backend/src/main/resources/application-prod.yml
spring:
datasource:
url: ${DATABASE_URL}
username: ${DATABASE_USERNAME}
password: ${DATABASE_PASSWORD}
driver-class-name: org.postgresql.Driver
jpa:
hibernate:
ddl-auto: validate
properties:
hibernate:
dialect: org.hibernate.dialect.PostgreSQLDialect
redis:
host: ${REDIS_HOST:localhost}
port: ${REDIS_PORT:6379}
mail:
host: ${SMTP_HOST}
port: ${SMTP_PORT:587}
username: ${SMTP_USERNAME}
password: ${SMTP_PASSWORD}
properties:
mail:
smtp:
auth: true
starttls:
enable: true
server:
port: 8090
security:
jwt:
secret: ${JWT_SECRET}
expiration: 86400000 # 24 hours
cors:
allowed-origins: ${CORS_ALLOWED_ORIGINS}
Environment Variables Template:
# Create .env.example
DATABASE_URL=postgresql://localhost:5432/glorylabs
DATABASE_USERNAME=glorylabs
DATABASE_PASSWORD=change-me
JWT_SECRET=change-this-to-a-secure-random-string-at-least-256-bits
CORS_ALLOWED_ORIGINS=https://glorylabs.nl,https://www.glorylabs.nl
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USERNAME=noreply@glorylabs.nl
SMTP_PASSWORD=change-me
REDIS_HOST=localhost
REDIS_PORT=6379
Create Production Environment:
// frontend/recruitment-portal/src/environments/environment.prod.ts
export const environment = {
production: true,
apiUrl: 'https://api.glorylabs.nl/api',
tokenKey: 'glorylabs_access_token',
refreshTokenKey: 'glorylabs_refresh_token',
tokenExpiryBuffer: 60000
};
Build for Production:
cd frontend/recruitment-portal
ng build --configuration production
Create Liquibase Changelog (if not exists):
cd backend
./mvnw liquibase:generateChangeLog
Verify Migration:
# Test against PostgreSQL
./mvnw liquibase:update -Dspring.profiles.active=prod
Create Dockerfile for Backend:
FROM eclipse-temurin:21-jre-alpine
WORKDIR /app
COPY target/*.jar app.jar
EXPOSE 8090
ENTRYPOINT ["java", "-jar", "app.jar"]
Create Dockerfile for Frontend:
FROM node:20-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build --configuration production
FROM nginx:alpine
COPY --from=build /app/dist/recruitment-portal /usr/share/nginx/html
EXPOSE 80
Create docker-compose.yml:
version: '3.8'
services:
postgres:
image: postgres:15-alpine
environment:
POSTGRES_DB: glorylabs
POSTGRES_USER: glorylabs
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
redis:
image: redis:7-alpine
ports:
- "6379:6379"
volumes:
- redis_data:/data
backend:
build: ./backend
environment:
SPRING_PROFILES_ACTIVE: prod
DATABASE_URL: jdbc:postgresql://postgres:5432/glorylabs
DATABASE_USERNAME: glorylabs
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
JWT_SECRET: ${JWT_SECRET}
REDIS_HOST: redis
ports:
- "8090:8090"
depends_on:
- postgres
- redis
frontend:
build: ./frontend/recruitment-portal
ports:
- "80:80"
depends_on:
- backend
volumes:
postgres_data:
redis_data:
Update Files:
README.md
API Documentation
Deployment Guide
Email Service - SMTP not configured
Redis - May not be running
Form Validation - Some fields may need refinement
Error Handling - May need user-friendly messages
# Backend load testing
ab -n 1000 -c 10 http://localhost:8090/api/jobs
# Frontend build size
ng build --configuration production --stats-json
npx webpack-bundle-analyzer dist/recruitment-portal/stats.json
# Clear browser cache and reload
# Hard refresh: Cmd+Shift+R (Mac) or Ctrl+Shift+R (Windows)
# Backend logs
./mvnw spring-boot:run | tee backend.log
# Frontend build issues
rm -rf node_modules package-lock.json
npm install
npm start
# Database reset (development only!)
# H2 database automatically resets on backend restart
Focus: Production Deployment
Tasks:
Estimated Time: 90-120 minutes Difficulty: Medium Prerequisites: All backend tests passing, services running
Status: Ready to start ✅
Prepared: October 31, 2025 For: November 1, 2025 session Current Project Completion: ~90%
Reacties