29 Commits

Author SHA1 Message Date
c4940e9691 Add user authentication, RBAC, and improved recruiter dashboard
- JWT-based auth with access tokens (15m) and refresh tokens (7d)
- User registration, login, logout, and /auth/me endpoints
- Three roles: admin, recruiter, hiring_manager with middleware enforcement
- users and refresh_tokens tables with bcrypt password hashing
- Login and Register pages with full form validation
- Protected routes — unauthenticated users redirect to /login
- Dashboard upgraded: real metrics, pipeline overview with progress bars,
  recent activity feed with 30s polling, and quick-action cards
- Dashboard API endpoints: /api/dashboard/metrics, pipeline-summary, recent-activity

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-21 22:06:11 +00:00
ede906ed3a fix: update nodemon.json to watch client/src and run full build 2026-02-21 18:35:24 +00:00
6db9eadb6f feat: implement HireFlow MVP features
- AI-powered CV parsing (regex extraction of skills, experience, education)
- Multi-channel job posting (LinkedIn, Indeed, Arbetsförmedlingen, Glassdoor, company site)
- Collaborative hiring scorecards with 5-criteria scoring system
- Dashboard with live stats (candidates, jobs, applications, scorecards)
- PostgreSQL schema for candidates, jobs, applications, scorecards
- REST API for all CRUD operations
- React UI with shadcn/ui components throughout

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-21 18:05:56 +00:00
SAAC Daemon
3d33977471 Fix hot-reload: nodemon only restarts backend (1-2s), client builds separately 2026-02-18 18:27:53 +01:00
SAAC Daemon
e349453fbb Document hot-reload workflow for AI agents
Rewrite SAAC_DEPLOYMENT.md to lead with the two-domain model:
- Production (yourapp.<server>.domain.com) — updates on saac deploy
- Hot-reload (yourapp-hot.<server>.domain.com) — auto-rebuilds on git push

Added: recommended dev workflow (push → check hot → deploy to prod),
nodemon.json explanation, development cycle diagram, customization guide.

Updated Dockerfile and docker-compose.yml headers to explain which
container uses which file and reference nodemon.json.
2026-02-18 16:50:06 +01:00
SAAC Daemon
bb1a05af07 Add nodemon.json for full hot-reload (backend + frontend)
nodemon now watches both server.js and client/src/. On any change,
it rebuilds the React app and restarts Express — so git push makes
both backend AND frontend changes visible on the hot domain.

- dev script simplified to "nodemon" (reads nodemon.json config)
- dev:local added for human developers who want Vite HMR
2026-02-18 16:48:02 +01:00
SAAC Daemon
5b37f88477 Harden template for production: add comments, fix bugs, add lock file
- Add inline comments to docker-compose.yml explaining the 5 key rules
  (expose vs ports, DB host, DB name persistence, no Traefik labels)
- Add comments to Dockerfile explaining multi-stage build, layer caching,
  and why .dockerignore excludes client/dist
- Add comments to .dockerignore explaining each exclusion
- Fix dev script: use nodemon (auto-restart) instead of node for server.js
- Add postinstall script to auto-install client deps (cd client && npm install)
- Fix SPA fallback: bare return → next() to prevent hanging requests
- Add root package-lock.json for deterministic server dependency installs
- Remove committed tsconfig.tsbuildinfo build artifact, add *.tsbuildinfo to .gitignore
- Update README: simpler install (npm install handles everything), reference SAAC_DEPLOYMENT.md,
  use npx instead of pnpm dlx for shadcn components
2026-02-18 16:36:33 +01:00
0e21d26c05 Replace vanilla HTML with React + shadcn/ui + TailwindCSS scaffold
- Frontend: React 19 + Vite + TypeScript + TailwindCSS v4 + shadcn/ui
- Pre-installed shadcn/ui components: Button, Card, Input, Separator
- Multi-stage Dockerfile: build React client → serve with Express
- Server.js updated to serve built React SPA with API routes
- Sample landing page with shadcn/ui components demonstrating usage
- Path aliases (@/) configured in tsconfig + vite config
- components.json for easy `shadcn add <component>` usage

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-18 15:50:02 +01:00
3eeda1f347 Update SAAC_DEPLOYMENT.md: template_db → postgres 2026-02-16 21:29:39 +00:00
ee7a9e0308 Change default DB name from template_db to postgres in server.js 2026-02-16 21:29:28 +00:00
926f941ae3 Change POSTGRES_DB from template_db to postgres — postgres DB always exists by default 2026-02-16 21:29:14 +00:00
2010a8d4ec Update SAAC_DEPLOYMENT.md: add dual-container docs, DB name warning, deploy coordination 2026-02-16 18:53:39 +00:00
e699340831 Update Dockerfile: node:20-alpine, remove bash syntax bug in ENV 2026-02-16 18:01:10 +00:00
6f53061edc Clean up docker-compose.yml: remove misleading Traefik labels and custom network (handled by SAAC daemon) 2026-02-16 18:01:01 +00:00
6933097afd Add SAAC_DEPLOYMENT.md - deployment rules for AI agents 2026-02-16 18:00:48 +00:00
ryan.gogo
a9487484fe Fix: Use placeholders instead of hardcoded template repo path
Changed deployment key instructions to use YOUR-USERNAME/YOUR-REPO
instead of hardcoded template path. This is a TEMPLATE - users
deploy their own repositories, not the template repository.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-15 14:28:55 +01:00
ryan.gogo
af49e7982c Document that git commit tracking works automatically
- Added note that git_commit is automatically provided by infrastructure
- Clarified that no additional configuration is needed
- Removed any manual setup instructions

This assumes the SAAC backend enables SOURCE_COMMIT by default
for all new applications created via 'saac create application'.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-15 14:11:33 +01:00
ryan.gogo
69a3bdfec6 Fix: Keep git in Dockerfile and remove all Coolify mentions
Changes:
1. Dockerfile: Keep git installation (may be needed for other operations)
2. README: Remove ALL mentions of Coolify (SAAC abstracts this)
3. README: Remove instructions about enabling "Include Source Commit in Build"
4. README: Simplify git_commit documentation
5. README: Update deployment key notes to be generic

Git commit tracking will work automatically when properly configured
in the SAAC backend without users needing to know about Coolify.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-15 14:11:05 +01:00
ryan.gogo
7b2c5f312c Fix: Use Coolify's SOURCE_COMMIT instead of git detection
Research findings:
- Coolify provides SOURCE_COMMIT environment variable with git commit hash
- Must enable "Include Source Commit in Build" in Coolify General settings
- Disabled by default to preserve Docker build cache
- Coolify automatically passes SOURCE_COMMIT as build arg

Changes:
1. Dockerfile: Use SOURCE_COMMIT build arg instead of GIT_COMMIT
2. Dockerfile: Remove git installation and detection logic
3. Dockerfile: Extract first 7 chars of SOURCE_COMMIT for short hash
4. docker-compose.yml: Pass SOURCE_COMMIT instead of GIT_COMMIT
5. docker-compose.yml: Remove GIT_COMMIT from env (set in Dockerfile)
6. README: Add instructions to enable "Include Source Commit in Build"
7. README: Update version tracking documentation

How it works:
- Coolify passes SOURCE_COMMIT to docker build
- Dockerfile takes first 7 characters: ${SOURCE_COMMIT:0:7}
- Sets as GIT_COMMIT env var for runtime
- Health endpoint returns the short commit ID

Note: Returns "unknown" if SOURCE_COMMIT tracking is not enabled.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-15 14:02:43 +01:00
ryan.gogo
2598323f84 Remove .saac/ directory from repository and add to .gitignore
- Add .saac/ to .gitignore (local SAAC configuration)
- Remove .saac/config.json from git tracking
- This file is generated locally and should not be in templates

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-15 11:57:34 +01:00
ryan.gogo
25b9d20094 Fix: Use short git commit ID (7 chars) instead of full hash
Research findings:
- Industry standard uses 'git rev-parse --short HEAD' (7 characters)
- Short hashes are more readable for logs and health endpoints
- Git automatically extends hash if 7 chars aren't unique
- Better for production deployment tracking and version verification

Changes:
- Dockerfile: Use --short flag to get 7-character commit ID
- README: Update examples to show short commit format (0e993d9)
- README: Add explanation of why short commits are used

Example health response:
{
  "git_commit": "0e993d9",  // 7 chars, not full 40-char SHA
  "version": "1.0.0"
}

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-15 11:00:45 +01:00
ryan.gogo
0e993d912a Add Git commit ID tracking to health endpoint
Features:
- Health endpoint now returns git_commit SHA and version
- Auto-detects git commit during Docker build
- Falls back to 'unknown' if git info unavailable
- Allows AI agents to verify deployed version

Changes:
1. server.js: Add git_commit and version to /health response
2. Dockerfile: Add git installation and commit detection
3. Dockerfile: Accept GIT_COMMIT and APP_VERSION build args
4. docker-compose.yml: Pass build args and env vars for versioning
5. README.md: Document version tracking in health endpoint

Example response:
{
  "status": "healthy",
  "postgres": "connected",
  "redis": "connected",
  "timestamp": "2026-02-14T10:30:00.000Z",
  "git_commit": "eb6b6e0a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q",
  "version": "1.0.0"
}

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-15 10:58:26 +01:00
ryan.gogo
eb6b6e09df Add health checks for zero-downtime deployments
Critical changes for production stability:

1. Add healthchecks to all services:
   - app: curl to /health endpoint (10s interval, 5s start period)
   - postgres: pg_isready check (5s interval)
   - redis: redis-cli ping check (5s interval)

2. Use depends_on with health conditions:
   - Ensures postgres/redis are fully ready before app starts
   - Prevents connection errors during startup

3. Remove hardcoded container_name:
   - Prevents name collisions between deployments
   - Allows Coolify to manage container names

Why this matters:
- Without healthchecks: Coolify kills old container → builds new → 502 gap
- With healthchecks: Coolify builds new → waits for healthy → kills old → zero downtime

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-15 10:54:44 +01:00
ryan.gogo
ceb77b2d5a Add health check and improve Docker layer caching
- Install curl for HEALTHCHECK support
- Add HEALTHCHECK instruction using /health endpoint
- Improve layer caching by copying package.json before app code
- Add helpful comments for better maintainability
- Health check runs every 10s with 5s start period and 2 retries

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-15 10:40:00 +01:00
ryan.gogo
f5d778956f Update README: Remove non-existent features from documentation
- Remove saac shell commands (not available)
- Remove saac domain commands (not available)
- Remove resource limit update commands (not available)
- Simplify debugging section with available commands
- Keep only working features: logs, env, status

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-14 06:37:53 +01:00
ryan.gogo
f48a5b456b Update README: Remove Git OAuth section and fix examples
- Remove Git OAuth connection step (SAAC AI agents already connected)
- Add note that AI agents have Git pre-configured
- Update examples to use 'username' instead of 'YourOrg'
- Add clarification about username/repo placeholders
- Renumber sections accordingly (5-8 instead of 6-9)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-14 06:35:44 +01:00
ryan.gogo
82f0c75ac3 Update README: Remove local Docker testing instructions
- Remove local Docker testing section (SAAC AI agents don't have Docker)
- Update best practices for AI agents without build tools
- Update contributing section to use saac deploy for testing
- Add note that AI agents should deploy directly to SAAC servers

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-14 06:33:19 +01:00
ryan.gogo
bf6bb394c2 Add comprehensive documentation to README.md
- AI Developer Agent instructions with step-by-step guide
- Critical port configuration explanation (no host port mappings)
- Complete deployment guide with all commands used
- Architecture documentation
- Environment variables reference
- API endpoints documentation
- Troubleshooting section
- Advanced configuration examples
- Local development setup

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-14 06:30:54 +01:00
ryan.gogo
95c13a841f Initial commit: Template site for Start an AI Company deployment
- Node.js Express application with modern white UI
- PostgreSQL and Redis integration
- Docker Compose configuration without host port mappings
- Traefik-ready with proper labels
- Health check endpoint

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-02-14 05:52:41 +01:00