A reliable and scalable distributed job scheduling system built with TypeScript, Node.js, React, PostgreSQL, and Redis. Chronos supports one-time jobs, recurring jobs (cron), automatic retries, and comprehensive monitoring.
Backend:
- Node.js + TypeScript
- Express.js (RESTful API)
- PostgreSQL (Job storage)
- Redis + BullMQ (Distributed job queue)
- JWT (Authentication)
- Winston (Logging)
Frontend:
- React + TypeScript
- Vite
- React Query (Data fetching)
- Tailwind CSS
- React Router
Infrastructure:
- Docker & Docker Compose
- Multi-container architecture (API, Worker, DB, Redis)
┌─────────────┐
│ Client │
│ (Browser) │
└──────┬──────┘
│
▼
┌─────────────┐ ┌─────────────┐
│ API Server │────▶│ PostgreSQL │
│ (Express) │ │ (Jobs) │
└──────┬──────┘ └─────────────┘
│
▼
┌─────────────┐ ┌─────────────┐
│ Redis │◀────│ Workers │
│ (Queue) │ │ (BullMQ) │
└─────────────┘ └─────────────┘
- Node.js (version 20 or higher) - Download here
- npm or yarn (comes with Node.js)
- Docker and Docker Compose - Download here
- Git (for cloning the repository)
git clone <your-repo-url>
cd chronosCreate a .env file in the root directory of the project after referring .env.example:
Chronos requires PostgreSQL and Redis to be running. The easiest way is to use Docker Compose:
# Start PostgreSQL and Redis containers
docker-compose up -d postgres redisThis command will:
- Start PostgreSQL on port
5432 - Start Redis on port
6379 - Automatically create the database schema using
db/init.sql
Verify services are running:
docker psInstall all required Node.js packages for the backend:
# Make sure you're in the project root directory
npm installnpm run buildnpm run devThe API server will start on http://localhost:3000.
The worker process handles job execution.
# Make sure you're in the project root directory
npm run dev:workercd frontend
npm installnpm run devThe frontend will start on http://localhost:5173 (Vite's default port).
Open your web browser and navigate to:
- Frontend UI: http://localhost:5173
- Backend API: http://localhost:3000
- API Health Check: http://localhost:3000/health