Intelligent Task Scheduler & Workflow Engine
Production-ready, Clean Architecture Modular Monolith built with TypeScript, Node.js, Express, Prisma ORM, BullMQ, React 19, and Tailwind CSS.
Chronos Sync is an enterprise-grade task orchestration platform engineered for developers, technical project leaders, and high-performance teams. Unlike standard todo applications, Chronos Sync models task execution as a Directed Acyclic Graph (DAG) with automated circular dependency prevention, dynamic overrun rescheduling with mandatory cognitive recovery buffers, and context-aware energy mode filtering.
Designed according to Clean Architecture and SOLID principles, the backend is structured as an isolated Modular Monolith with absolute type safety, compile-time Zod schema validation, optimistic locking for offline-first sync, and modular BullMQ worker pipelines.
- Natural Language Processing (NLP) Quick Capture: High-speed tokenizer converting raw phrases (e.g., "Deploy microservice tomorrow at 4pm for 60m !p0 #deepwork") into structured tasks complete with ISO dates, priority tiers, tags, and duration.
- Auto-Rescheduling & Dynamic Buffers: When high-priority (
P0/P1) tasks run over their allocated timeframe, the BullMQ rescheduling engine recalculates downstream task start times while inserting 5β30 minute cognitive recovery buffers to eliminate burnout and schedule cascading. - Predictive Time Estimation & Audit: Logs historical execution metrics and flags tasks with unrealistic allocations using planned vs. actual duration ratios and deviation percentage analytics.
- Directed Acyclic Graph (DAG) Dependency Engine: Incorporates Kahnβs algorithm and three-color cycle detection (
WHITE,GRAY,BLACK) to guarantee prerequisite chains remain non-circular. Tasks are locked inBlockedstatus until all antecedent dependencies are markedCompleted. - Flexible Recurring Rule Engine: Extends standard POSIX CRON to evaluate complex real-world cadence rules like "Every 3rd Tuesday" or "Every 10 business days", skipping holidays and weekends.
- Cross-Calendar Synchronization: Clean abstraction and gateway adapters for two-way synchronization hooks with Google Calendar and Microsoft Outlook APIs.
- Context-Based Energy Filtering: Filter workflow pipelines according to available cognitive energy levels:
- π§ Deep Work: 100% uninterrupted focus, zero context switching (architecture, critical algorithms).
- β‘ High Focus: Creative engineering, design, and complex problem solving.
- π Medium Focus: Routine features, code reviews, PR audits, and technical syncs.
- πΏ Low Energy: Lightweight administration, documentation, backlog grooming.
- Pomodoro Focus Chamber: Built-in 25-minute Pomodoro timer directly coupled with task entities, with active audio chimes, progress rings, and real-time telemetry logging.
- Precision Time Tracking: Integrated stopwatch recording start/pause/complete events with millisecond precision to feed the predictive estimation audit engine.
- Multi-View Visual Orchestration:
- π Kanban Pipeline: Five-lane state machine (
To Do,In Progress,Blocked,In Review,Completed) with optimistic locking indicators and column descriptions. - β±οΈ Timeline & Buffers: Gantt-style schedule displaying allocated working time blocks alongside color-coded cognitive buffers.
- π Time-Blocked Day View: Hourly schedule distribution (8:00 AM β 8:00 PM) with overlap warnings.
- π DAG Dependency Studio: Interactive visual node-and-edge graph illustrating predecessor/successor relationships and cycle status.
- π Kanban Pipeline: Five-lane state machine (
- Offline-First Optimistic Locking: Every task entity maintains a monotonically increasing
versioncounter and timestamp. Batch updates performed while offline are reconciled server-side with conflict-detection safety. - Omnipresent Quick Capture: Accessible anywhere via β Cmd + K (or Ctrl + K) for sub-second task creation.
Chronos Sync enforces a strict decoupled Modular Monolith adhering to Robert C. Martin's Clean Architecture:
chronos-sync/
βββ prisma/
β βββ schema.prisma # Relational PostgreSQL schema with compound indexes
βββ src/
β βββ modules/
β β βββ auth/ # Supabase & JWT Auth Domain
β β β βββ domain/ # Pure Entities & Repository Interfaces
β β β βββ application/ # Use Cases (Register, Login, Supabase Verify)
β β β βββ infrastructure/ # Prisma Repositories & JWT Adapters
β β β βββ presentation/ # Express Controllers & Zod Validators
β β β
β β βββ task/ # Core Task & DAG Domain
β β β βββ domain/ # Task Entity, DAG cycle detector
β β β βββ application/ # Create, Update, DAG validation, NLP parser
β β β βββ infrastructure/ # PrismaTaskRepository & in-memory stores
β β β βββ presentation/ # TaskController & task routes
β β β
β β βββ scheduler/ # BullMQ, Rescheduling & Cron
β β βββ domain/ # Reschedule Engine & Dynamic Buffer logic
β β βββ application/ # AutoRescheduleUseCase, RecurringCronUseCase
β β βββ infrastructure/ # BullMQ queues, workers & Upstash Redis driver
β β βββ presentation/ # Reschedule and Recurring controllers
β β
β βββ components/ # React 19 UI Modules
β β βββ KanbanView.tsx # 5-lane Kanban board with DAG locks
β β βββ TimelineView.tsx # Gantt schedule & recovery buffers
β β βββ TimeBlockedView.tsx # Hourly calendar view
β β βββ DagStudioView.tsx # Node-link DAG graph visualizer
β β βββ FocusPomodoroView.tsx # Live timer chamber & audio chimes
β β βββ PredictiveAuditView.tsx # Planned vs actual duration analytics
β β βββ QuickCaptureModal.tsx # Cmd+K NLP task creator
β β βββ TaskModal.tsx # Comprehensive task editor & dependency picker
β β βββ Tooltip.tsx # Viewport-safe portal tooltips
β β βββ AuthScreen.tsx # Login & Supabase JWT verification
β β
β βββ server/ # Express Application & Router Bridge
β βββ App.tsx # React root application & navigation
β βββ index.css # Tailwind CSS v4 styling
βββ server.ts # Express HTTP Server & Vite middleware bridge
βββ vite.config.ts # Vite build configuration
βββ package.json # Project dependencies & scripts
- Dependency Rule: Inner domain layers contain zero imports from outer layers (no database, no HTTP frameworks).
-
Repository Pattern: All database interactions pass through explicit TypeScript interfaces (
ITaskRepository,IUserRepository), allowing mock testing and persistence swapping. -
Directed Acyclic Graph Validation: Circular dependencies (
$A \rightarrow B \rightarrow C \rightarrow A$ ) are intercepted at the application layer before reaching persistence. - Resilient Background Processing: BullMQ queues isolate CPU-intensive operations (schedule cascade recalculations, recurring task expansions) from the HTTP event loop.
| Layer | Technology | Purpose |
|---|---|---|
| Frontend Framework | React 19 | Concurrent rendering, hooks, responsive state management |
| Styling & Design | Tailwind CSS v4 | Modern CSS design tokens, dark-mode slate theme |
| Icons & Animation | Lucide React, Motion | Scalable vector icons and layout transitions |
| Backend Framework | Express.js 4 | RESTful API routing and JSON middleware |
| Language & Typing | TypeScript 5 | Strict static type safety across client and server |
| Validation | Zod | Runtime request payload validation |
| Database ORM | Prisma ORM | Relational modeling, migrations, and PostgreSQL client |
| Database | PostgreSQL | ACID transactions and relational foreign key constraints |
| Queue & Cache | BullMQ, Redis / Upstash | Background workers, delay scheduling, and cron queues |
| Tooling & Bundler | Vite 8, tsx | Instant HMR development and fast TypeScript execution |
- Node.js:
v20.xor higher - npm:
v10.xor higher - (Optional) Redis and PostgreSQL instance or Docker (fallback in-memory store is enabled by default for standalone testing).
-
Clone the repository:
git clone https://github.com/YOUR_USERNAME/chronos-sync.git cd chronos-sync -
Install dependencies:
npm install
-
Configure Environment Variables: Create a
.envfile from the example:cp .env.example .env
(Ensure
PORT=3000is configured). -
Start Development Server:
npm run dev
The application will be live at
http://localhost:3000. -
Build for Production:
npm run build npm run start
| Method | Endpoint | Description |
|---|---|---|
GET |
/api/tasks |
Fetch all user tasks |
POST |
/api/tasks |
Create a new task with DAG dependency validation |
PUT |
/api/tasks/:id |
Update task details or change execution status |
DELETE |
/api/tasks/:id |
Remove a task and cascade orphan dependencies |
POST |
/api/tasks/quick-capture |
2-second low-latency NLP parser endpoint |
GET |
/api/tasks/views/multi |
Returns structured projections for Kanban, Timeline, Day-Block, and DAG views |
POST |
/api/tasks/offline-batch-sync |
Optimistic locking reconciliation for offline updates |
POST |
/api/reschedule/auto |
Trigger BullMQ dynamic buffer recalculation for overruns |
POST |
/api/focus/session |
Record a completed Pomodoro session and update task duration |
GET |
/api/audit/predictive |
Retrieve planned vs. actual duration estimation variance |
POST |
/api/auth/login |
Authenticate user session |
POST |
/api/auth/supabase-verify |
Validate Supabase JWT bearer token |
To present this repository cleanly on GitHub, use the following configurations:
Production-ready Intelligent Task Scheduler & Workflow Engine built with Clean Architecture, DAG dependency cycles prevention, BullMQ dynamic buffer auto-rescheduling, and React 19.
Set the website field to your deployment link or preview URL.
Add these topics in the GitHub repo header to maximize discoverability:
task-scheduler, dag-workflow, clean-architecture, kanban, gantt-chart, bullmq, prisma-orm, expressjs, react19, typescript, tailwindcss, pomodoro-timer, time-blocking, modular-monolith
- Go to Settings β Branches β Add branch protection rule:
- Branch name pattern:
main - Check: Require a pull request before merging
- Check: Require status checks to pass before merging (
build,lint) - Check: Do not allow bypassing the above settings
- Branch name pattern:
Create .github/workflows/ci.yml:
name: CI Build & Typecheck
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm ci
- run: npm run lint
- run: npm run buildThis project is licensed under the Apache-2.0 License. See the LICENSE file for details.