Skip to content

Hemanth7723/Job_Tracking_system

Repository files navigation

๐Ÿ’ผ JobTrack โ€” Job Application Tracking System

A production-ready Full-Stack Job Tracker built with React, TypeScript & PocketBase


๐Ÿ“Œ Overview

JobTrack is a modern, multi-user job application tracking system designed to help users manage their job search efficiently.

It provides secure data isolation, intuitive analytics, and resume management, making it ideal for students, job seekers, and professionals.


๐Ÿ—๏ธ Architecture

Browser (React App)
โ”‚
โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Vercel Frontend    โ”‚  (React + Vite + nginx)
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
          โ”‚ REST API (HTTPS)
          โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   PocketBase API     โ”‚  (Go binary on Railway)
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
          โ”‚
          โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  SQLite DB + Files   โ”‚  (Railway persistent volume)
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
Layer Role
๐ŸŒ Frontend UI, routing, charts, state management โ€” hosted on Vercel
โš™๏ธ Backend Auth, REST API, file storage โ€” PocketBase on Railway
๐Ÿ—„๏ธ Database SQLite embedded in PocketBase, persisted via Railway volume

โœจ Features

๐Ÿ” Authentication & Security

  • Multi-user system with strict data isolation โ€” enforced at database level
  • JWT-based authentication with auto-refresh via PocketBase SDK
  • Server-side access rules prevent any cross-user data access

๐Ÿ“Š Job Management

  • Add / Edit / Delete job applications
  • Fields: company, role, job link, status, location, CTC, company rating, notes
  • Attach resume PDFs per application (max 5MB, PDF only)

๐Ÿ” Search & Filtering

  • Search by company name or role
  • Filter by status and location
  • Paginated results (10 per page)

๐Ÿ“ˆ Dashboard & Analytics

  • Total applications count and per-status breakdown
  • Donut chart visualization powered by Chart.js

๐ŸŽจ UI/UX

  • Fully responsive โ€” mobile and desktop
  • Clean, minimal UI with dark mode (auto system preference)

๐Ÿ› ๏ธ Tech Stack

Layer Technology
Frontend React 18, TypeScript, Vite 5
Backend PocketBase 0.22 (Go)
Database SQLite (embedded in PocketBase)
Charts Chart.js 4 + react-chartjs-2
Routing React Router v6
Frontend hosting Vercel
Backend hosting Railway
Containerization Docker + nginx

โœ… Prerequisites

Tool Version
Node.js 18+
npm Latest
PocketBase binary Latest
Docker (optional, for local container testing) Latest

๐Ÿš€ Local Development

1๏ธโƒฃ Clone & install dependencies

git clone <your-repo-url>
cd jobtrack
npm install

2๏ธโƒฃ Download and run PocketBase

Download the PocketBase binary for your OS from pocketbase.io.

# macOS / Linux
chmod +x pocketbase
./pocketbase serve

# Windows
pocketbase.exe serve

Admin UI will be available at: http://127.0.0.1:8090/_/

3๏ธโƒฃ Import the database schema

  1. Open http://127.0.0.1:8090/_/ in your browser
  2. Create your admin account (first time only)
  3. Go to Settings โ†’ Import Collections
  4. Upload pocketbase_schema.json from the project root
  5. Click Review โ†’ Confirm and import

4๏ธโƒฃ Configure environment

cp .env.example .env.local

The default .env.local already points to local PocketBase โ€” no changes needed:

VITE_PB_URL=http://127.0.0.1:8090

5๏ธโƒฃ Start the frontend dev server

npm run dev

App runs at: http://localhost:5173

Keep both terminals running โ€” one for PocketBase (./pocketbase serve) and one for Vite (npm run dev).


๐Ÿ“ก Security Rules

Data isolation is enforced at the PocketBase collection rule level, not just the frontend. Even direct API calls are rejected if the authenticated user doesn't own the record.

listRule:   "@request.auth.id = user"
viewRule:   "@request.auth.id = user"
createRule: "@request.auth.id != \"\""
updateRule: "@request.auth.id = user"
deleteRule: "@request.auth.id = user"

โš ๏ธ Note: Rules use = user (direct ID comparison), not = user.id โ€” this is correct for PocketBase's relation field syntax.

โœ… Prevents unauthorized cross-user data access
โœ… Server-side enforcement โ€” bypassing the frontend UI has no effect


๐Ÿณ Docker

The project includes two Dockerfiles โ€” one for each service.

Frontend (React + nginx)

# Build the image (VITE_PB_URL is required at build time)
docker build \
  --build-arg VITE_PB_URL=http://127.0.0.1:8090 \
  -t jobtrack-frontend .

# Run locally (nginx listens on $PORT, defaults to 8080)
docker run -p 8080:8080 jobtrack-frontend

VITE_PB_URL must be passed as a build argument โ€” Vite bakes it into the JS bundle at compile time and cannot read it at runtime.

PocketBase backend

# Build
docker build -f Dockerfile.pocketbase -t jobtrack-pb .

# Run locally (data stored in ./pb_data on your host)
docker run -p 8090:8090 -v $(pwd)/pb_data:/pb/pb_data jobtrack-pb

There is no docker-compose.yml in this project. Services are deployed independently to Vercel (frontend) and Railway (backend).


โ˜๏ธ Deployment

๐Ÿ”น Backend โ€” Railway (PocketBase)

  1. Push the repo to GitHub

  2. On railway.app, create a new project โ†’ Deploy from GitHub repo

  3. In the service Variables tab, add:

    Variable Value
    RAILWAY_DOCKERFILE_PATH Dockerfile.pocketbase
  4. Go to Settings โ†’ Networking โ†’ Generate Domain to get your public URL

  5. Attach a persistent volume (right-click service on canvas โ†’ Attach Volume):

    • Mount path: /pb/pb_data
  6. Open https://your-pb-domain.up.railway.app/_/ and import pocketbase_schema.json

๐Ÿ”น Frontend โ€” Vercel (React)

  1. On vercel.com, import the same GitHub repo

  2. Add environment variable (mark it as a Build Variable):

    Variable Value
    VITE_PB_URL https://your-pb-domain.up.railway.app

    No trailing slash. VITE_PB_URL must be a Build Variable โ€” Vercel must pass it during npm run build, not at runtime.

  3. Deploy โ€” vercel.json handles SPA routing automatically


๐Ÿ“ Project Structure

jobtrack/
โ”‚
โ”œโ”€โ”€ Dockerfile                  # Frontend โ€” multi-stage Node + nginx build
โ”œโ”€โ”€ Dockerfile.pocketbase       # Backend โ€” PocketBase binary on Alpine
โ”œโ”€โ”€ docker-entrypoint.sh        # Injects Railway $PORT into nginx at startup
โ”œโ”€โ”€ nginx.conf                  # nginx config โ€” SPA routing + asset caching
โ”‚
โ”œโ”€โ”€ .env.example                # Environment variable template
โ”œโ”€โ”€ vercel.json                 # Vercel SPA rewrite rules
โ”œโ”€โ”€ pocketbase_schema.json      # PocketBase collection schema + access rules
โ”‚
โ”œโ”€โ”€ public/
โ”‚   โ””โ”€โ”€ favicon.svg
โ”‚
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ App.tsx                 # Root router + AuthProvider
โ”‚   โ”œโ”€โ”€ main.tsx                # React entry point
โ”‚   โ”œโ”€โ”€ index.css               # Global styles + CSS design tokens
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ lib/
โ”‚   โ”‚   โ””โ”€โ”€ pb.ts               # PocketBase client instance
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ types/
โ”‚   โ”‚   โ””โ”€โ”€ index.ts            # TypeScript types + constants
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ hooks/
โ”‚   โ”‚   โ”œโ”€โ”€ useAuth.tsx         # Auth context โ€” login, register, logout
โ”‚   โ”‚   โ””โ”€โ”€ useJobs.ts          # CRUD operations for job applications
โ”‚   โ”‚
โ”‚   โ”œโ”€โ”€ components/
โ”‚   โ”‚   โ”œโ”€โ”€ JobModal.tsx        # Add / Edit job form modal
โ”‚   โ”‚   โ”œโ”€โ”€ ProtectedRoute.tsx  # Auth guard โ€” redirects to /auth if not logged in
โ”‚   โ”‚   โ”œโ”€โ”€ StatusBadge.tsx     # Colour-coded status pill
โ”‚   โ”‚   โ””โ”€โ”€ StatsChart.tsx      # Donut chart with legend
โ”‚   โ”‚
โ”‚   โ””โ”€โ”€ pages/
โ”‚       โ”œโ”€โ”€ Auth.tsx            # Login + Register page
โ”‚       โ””โ”€โ”€ Dashboard.tsx       # Main dashboard
โ”‚
โ”œโ”€โ”€ index.html
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ tsconfig.json
โ””โ”€โ”€ vite.config.ts

๐Ÿ”ฎ Future Improvements

  • ๐Ÿ“… Interview scheduling with calendar view
  • ๐Ÿ“ง Email reminders (Resend / SMTP integration)
  • ๐Ÿ“Š Advanced analytics โ€” application rate over time, conversion by company
  • ๐Ÿ“‚ Resume version tracking โ€” link multiple resume versions per application
  • ๐Ÿ” OAuth login (Google / GitHub) via PocketBase OAuth2

๐Ÿ“œ Scripts

npm run dev      # Start Vite dev server (http://localhost:5173)
npm run build    # TypeScript check + production build โ†’ dist/
npm run preview  # Preview production build locally
npm run lint     # Run ESLint

โญ Built for developers & job seekers
๐Ÿ’ก Clean โ€ข Secure โ€ข Scalable

About

Simple Job Tracking System to keep track your job applications and application status

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors