Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

96 Commits

Folders and files

Repository files navigation

ATS with LLM

A full-stack Applicant Tracking System with planned AI-powered features. Built with a FastAPI backend and React frontend, featuring strict multi-tenant architecture, role-based access control, and a comprehensive hiring pipeline.

Tech Stack

Layer Technology
Frontend React 19, TypeScript, Vite, TailwindCSS v4, React Router v7
Backend FastAPI, Python 3.14, SQLModel, Alembic
Database PostgreSQL 16 (Docker) / SQLite (local dev)
Auth JWT (python-jose), bcrypt password hashing
Testing Vitest (frontend, 397 tests), pytest (backend, 407 tests)
Infrastructure Docker Compose, Redis, Adminer

Key Features

  • Multi-tenant Architecture — Strict organization-level data isolation
  • JWT Authentication — Secure token-based auth with four roles: OWNER, ADMIN, HR, INTERVIEWER
  • Job Management — Create, edit, and publish job postings with structured sections; share via public links
  • Application Tracking — Receive applications through public job pages, review resumes (PDF viewer), manage candidate pipeline
  • Speed Review — Rapid application review workflow with keyboard controls and undo support
  • Team Management — Invite users via secure time-limited tokens, manage roles, activate/deactivate members
  • Public Job Board — Server-rendered job detail pages with Jinja2 templates for applicants (no auth required)
  • Comprehensive Test Suite — 804 tests across frontend and backend

Quick Start

Option 1: Docker (Recommended)

Runs the full stack — frontend, backend, PostgreSQL, Redis, and Adminer.

Prerequisites: Docker Desktop installed and running

  1. Set up environment variables

    cp .env.example .env
    # Edit .env and update SECRET_KEY and POSTGRES_PASSWORD
  2. Start all services

    docker-compose up --build
  3. Access the application

  4. Stop services

    docker-compose down
    # To remove volumes and start fresh:
    docker-compose down -v

Option 2: Local Development (SQLite)

Run everything locally without Docker. Uses SQLite instead of PostgreSQL.

Prerequisites: Python 3.10+, Node.js 18+

Backend

cd backend
python -m venv .venv

# Activate virtual environment
# Windows PowerShell:
.venv\Scripts\Activate.ps1
# Windows CMD:
.venv\Scripts\activate
# Linux / macOS:
source .venv/bin/activate

pip install -r requirements.txt

Create backend/.env:

SECRET_KEY=your-secret-key-here
DATABASE_URL=sqlite:///./ats.db
ACCESS_TOKEN_EXPIRE_MINUTES=30
# Generate a secure secret key
python -c "import secrets; print(secrets.token_hex(32))"

# Start the backend
uvicorn src.main:app --reload --host 0.0.0.0 --port 8000

Frontend

cd frontend
npm install
npm run dev

The frontend dev server runs at http://localhost:5173 and proxies API requests to the backend at http://localhost:8000.


Project Structure

ats-with-llm/
├── backend/
│   ├── src/
│   │   ├── auth/            # Authentication, authorization, user management
│   │   ├── organizations/   # Multi-tenant organization models
│   │   ├── jobs/            # Job postings CRUD, public links, sections
│   │   ├── applications/    # Application submissions, file storage, review
│   │   ├── ai/              # AI module (planned — resume scoring, JD generation)
│   │   ├── config.py        # Application settings
│   │   ├── database.py      # Database session management
│   │   └── main.py          # FastAPI entry point
│   ├── alembic/             # Database migrations
│   ├── static/              # CSS & JS for public job pages
│   ├── templates/           # Jinja2 templates for public job pages
│   ├── tests/               # 407 backend tests
│   ├── uploads/             # Resume file storage
│   ├── requirements.txt
│   └── Dockerfile
├── frontend/
│   ├── src/
│   │   ├── api/             # API client (auth, jobs, applications, users)
│   │   ├── components/      # Reusable UI (Button, Modal, Table, PdfViewer, etc.)
│   │   ├── contexts/        # AuthContext (user state, tokens)
│   │   ├── hooks/           # useAuth hook
│   │   ├── layouts/         # AuthLayout, DashboardLayout
│   │   ├── pages/           # Login, Register, Jobs, Applications, Team, SpeedReview
│   │   └── types/           # TypeScript type definitions
│   ├── package.json
│   └── vite.config.ts
├── docker-compose.yml
└── README.md

API Endpoints

Authentication (/api/v1/auth)

Method Path Description Auth
POST /register Register new organization + owner user No
POST /login Login and get JWT token No
GET /me Get current user profile Yes
POST /invite Invite user to organization OWNER/ADMIN
POST /accept-invite Accept invitation and create account No
GET /users List organization members Yes
PATCH /users/{id} Update user role OWNER/ADMIN
PATCH /users/{id}/deactivate Deactivate a user OWNER/ADMIN
PATCH /users/{id}/activate Reactivate a user OWNER/ADMIN

Jobs (/api/v1/jobs)

Method Path Description Auth
POST /jobs/ Create a job posting Yes
GET /jobs/ List organization jobs (filterable by status) Yes
GET /jobs/{id} Get job details Yes
PATCH /jobs/{id} Update job (including status transitions) Yes
DELETE /jobs/{id} Delete a job OWNER/ADMIN

Applications (/api/v1/applications)

Method Path Description Auth
GET /applications/ List applications (filterable) Yes
GET /applications/{id} Get application details Yes
PATCH /applications/{id} Update application status Yes
GET /applications/{id}/resume Download resume PDF Yes
GET /applications/stats Application statistics Yes

Public (/api/v1/public)

Method Path Description Auth
GET /public/jobs/{token} Get public job posting (JSON) No
GET /public/jobs/{token}/view View job page (HTML) No
POST /public/jobs/{token}/apply Submit application with resume No
GET /public/jobs/{token}/apply/success Application success page No

Testing

Backend

cd backend
pytest                          # Run all 407 tests
pytest -v                       # Verbose output
pytest tests/auth/ -v           # Run auth tests only
pytest --cov=src tests/         # With coverage

Frontend

cd frontend
npm test                        # Watch mode
npm run test:run                # Single run (397 tests)
npm run test:coverage           # With coverage report

Environment Variables

Docker (.env in project root)

POSTGRES_USER=postgres
POSTGRES_PASSWORD=your-secure-password
POSTGRES_DB=postgres
DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_DB}
REDIS_URL=redis://redis:6379/0
SECRET_KEY=your-secret-key-here
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=30

Local (backend/.env)

SECRET_KEY=your-secret-key-here
DATABASE_URL=sqlite:///./ats.db
ACCESS_TOKEN_EXPIRE_MINUTES=30

Troubleshooting

Docker

docker-compose ps              # Check running services
docker-compose logs db         # View database logs
docker-compose logs backend    # View backend logs
docker-compose restart         # Restart all services
  • Port conflicts: Stop conflicting services or change ports in docker-compose.yml (default: 8000, 5432, 6379, 8080)

Local Development

  • Import errors: Ensure the virtual environment is activated and run pip install -r requirements.txt
  • Database errors: Delete ats.db and restart to recreate tables; verify DATABASE_URL in backend/.env
  • Frontend not loading: Ensure the backend is running on port 8000; the frontend calls http://localhost:8000 from the browser

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages