Athena — mahmoud-consultancy/archive/old-docs/LOCAL_STARTUP_GUIDE.md

Local Startup Guide - InterimPlaza Platform

Last Updated: October 17, 2025 Platform: InterimPlaza Recruitment Platform


🚀 Quick Start

Infrastructure Services Started ✅

Running Services:

docker ps
  • ✅ PostgreSQL (port 5432)
  • ✅ Redis (port 6379)
  • ✅ MailHog (SMTP 1025, UI 8025)

🔧 Known Issues & Fixes Applied

HQL Query Fixes

  1. CLOB Search Issue - Fixed ✅

    • Removed LOWER(content) from search query
    • Search now uses title and excerpt only
    • Commit: 8d7941a
  2. JOIN FETCH Pagination Issue - Fixed ✅

    • Removed @Query with JOIN FETCH from ArticleBookmarkRepository
    • Using Spring Data method naming convention instead
    • Commit: <latest>

Code Quality Issues (Non-Blocking)

  • 8 Checkstyle violations (import order) - Can skip with -Dcheckstyle.skip=true
  • SCSS budget warnings (frontend) - Non-blocking

📋 Startup Instructions

Option 1: Using Docker Compose (Recommended for Testing)

# Start infrastructure only
docker-compose -f docker-compose.local.yml up -d postgres redis mailhog

# Start backend (in separate terminal)
cd backend
./mvnw spring-boot:run -Dspring-boot.run.profiles=local -Dcheckstyle.skip=true

# Start frontend (in another terminal)
cd frontend/recruitment-portal
npm start

Option 2: Using Docker Compose Full Stack

# Build and start everything
docker-compose -f docker-compose.local.yml up --build

# Or in detached mode
docker-compose -f docker-compose.local.yml up -d --build

Option 3: Manual Startup (No Docker)

# 1. Start backend
cd backend
./mvnw spring-boot:run -Dcheckstyle.skip=true

# 2. Start frontend (new terminal)
cd frontend/recruitment-portal
npm start

🔍 Troubleshooting

Backend Won't Start

Issue: HQL query validation errors Solution: Fixed in latest commits Verify: Pull latest code

git pull origin rename-to-glorylabs

If still failing:

# Check logs
tail -100 /tmp/backend-final.log

# Or run with debug
cd backend
./mvnw spring-boot:run -Dcheckstyle.skip=true -X

Database Connection Issues

Issue: Cannot connect to PostgreSQL Solution:

# Check if PostgreSQL is running
docker ps | grep postgres

# Restart if needed
docker restart recruitment-postgres

# Check logs
docker logs recruitment-postgres

Frontend Build Errors

Issue: TypeScript or SCSS errors Solution: Already fixed in latest code

# Pull latest
git pull

# Install dependencies
cd frontend/recruitment-portal
npm install

# Start
npm start

🌐 Access URLs

Application URLs (when running)

  • Frontend: http://localhost:4200
  • Backend API: http://localhost:8080/api
  • Swagger UI: http://localhost:8080/api/swagger-ui.html
  • H2 Console: http://localhost:8080/api/h2-console

Development Tools

  • MailHog UI: http://localhost:8025
  • PgAdmin: http://localhost:5050 (if started with --profile tools)
  • Redis Commander: http://localhost:8081 (if started with --profile tools)

Database Connection

Host: localhost
Port: 5432
Database: recruitment_local
Username: recruitment
Password: localpass123

✅ Verification Steps

1. Check Infrastructure

docker ps
# Should show: postgres, redis, mailhog running

2. Check Backend

curl http://localhost:8080/api/actuator/health
# Should return: {"status":"UP"}

3. Check Frontend

curl http://localhost:4200
# Should return: HTML content

4. Test API

# Get jobs
curl http://localhost:8080/api/jobs

# Get KB articles
curl http://localhost:8080/api/articles

📝 Latest Fixes (October 17, 2025)

Commits:

  • 8d7941a - Fix HQL CLOB query error
  • <latest> - Fix JOIN FETCH pagination issue

Issues Resolved:

  1. ✅ CLOB search query (cannot use LOWER() on CLOB)
  2. ✅ JOIN FETCH with pagination (not supported in JPA)
  3. ✅ TypeScript errors in frontend
  4. ✅ Import order issues (reduced, skip with flag)

Remaining:

  • Minor Checkstyle warnings (use -Dcheckstyle.skip=true)
  • SCSS budget warnings (non-blocking)

🎯 Expected Behavior

When successfully started, you should see:

Backend Console:

Started RecruitmentApplication in X.XXX seconds
Tomcat started on port(s): 8080 (http)

Frontend Console:

** Angular Live Development Server is listening on localhost:4200 **
✔ Compiled successfully

Browser:

  • Navigate to http://localhost:4200
  • See InterimPlaza homepage with job listings
  • CV upload button visible
  • Knowledge Base link in navigation

💡 Tips

  1. Skip Checkstyle: Use -Dcheckstyle.skip=true for faster local development
  2. Hot Reload: Backend supports hot reload with Spring Boot DevTools
  3. Database: Using H2 in-memory by default (data lost on restart)
  4. Emails: All emails go to MailHog (http://localhost:8025)
  5. Redis: Optional, can run without it (caching disabled)

🆘 Still Having Issues?

Check Session Docs:

  • COMPLETE_WORK_SUMMARY_OCT16.md - Full feature list
  • DOD_VERIFICATION_REPORT.md - Known issues
  • ACTION_ITEMS_REVIEW.md - Pending items

Common Issues:

  1. Port already in use → Change port in application.yml
  2. Java version mismatch → Requires Java 17+
  3. Node version mismatch → Requires Node 18+
  4. Database migration fails → Check data.sql file

For deployment to production, see: DEPLOYMENT_GUIDE_PRODUCTION_CHECKLIST.md

Reacties

Nog geen reacties