← Back to Projects

TaskFlow

Overview

TaskFlow is a production-ready, multi-tenant task management SaaS platform deployed at admin.widesurf.com.
It demonstrates advanced engineering across backend systems, ETL pipelines, real-time WebSocket features, containerized DevOps, and modern frontend development.

The Challenge

The goal was to build a complete SaaS product with:

  • Multi-tenant database isolation
  • Real-time task updates
  • Analytics & reporting
  • Background data pipeline (ETL)
  • Full Docker containerization
  • Enterprise-grade deployment

Docker Container Architecture

TaskFlow runs on six Docker containers, orchestrated through Docker Compose.

version: '3.3'

services:

  postgres:
    image: postgres:16-alpine
    container_name: taskflow-postgres
    # PostgreSQL database for all application data

  redis:
    image: redis:7-alpine
    container_name: taskflow-redis
    # Redis for caching and Celery message broker

  backend:
    build: ./backend
    container_name: taskflow-backend
    # FastAPI backend with REST API and WebSocket support

  celery-worker:
    build: ./backend
    container_name: taskflow-celery-worker
    # Background worker for data pipeline processing

  celery-beat:
    build: ./backend
    container_name: taskflow-celery-beat
    # Scheduler for periodic tasks and reports

  frontend:
    build: ./frontend
    container_name: taskflow-frontend
    # Next.js frontend application

Network Architecture

Networks:

  1. taskflow-network – internal communication (Postgres, Redis, backend, workers)
  2. traefik-proxy – external HTTPS routing

Benefits:

  • Isolated microservices
  • Secure internal-only DB access
  • Independent scaling of workers
  • Built-in health checks

Traefik Integration

Traefik handles:

  • SSL certificates (Let’s Encrypt)
  • Domain routing
  • Path-based routing (/api vs frontend)
  • HTTP → HTTPS redirects
labels:
  - "traefik.enable=true"
  - "traefik.http.routers.taskflow-backend.rule=Host(`admin.widesurf.com`) && PathPrefix(`/api`)"
  - "traefik.http.routers.taskflow-backend.entrypoints=websecure"
  - "traefik.http.routers.taskflow-backend.tls=true"
  - "traefik.http.routers.taskflow-backend.tls.certresolver=le"

Solution Architecture

                 ┌──────────────────────────────┐
                 │        TaskFlow SaaS         │
                 │     Multi-Tenant Platform     │
                 └───────────────┬──────────────┘
                 ┌───────────────┴──────────────┐
                 │        Frontend (Next.js)     │
                 │  - Tenant-aware UI            │
                 │  - Server Actions / Forms     │
                 └───────────────┬──────────────┘
   ┌─────────────────────────────┼─────────────────────────────┐
   │                             │                             │
   ▼                             ▼                             ▼
┌──────────┐             ┌──────────────┐              ┌────────────────┐
│ Auth     │             │ API Gateway   │              │ Sanity CMS      │
│ (Clerk)  │             │ (FastAPI)     │              │ - Content        │
│ - JWT    │             │ - Routing      │              │ - Branding       │
└─────┬────┘             │ - RBAC         │              │ - Multi-tenant   │
      │                  └───────┬────────┘              └────────┬───────┘
      │                          │                                 │
      ▼                          ▼                                 ▼
┌──────────────┐       ┌─────────────────┐              ┌─────────────────────┐
│ User/Tenant  │       │ Task Service    │              │ Webhooks / Sync      │
│ Management   │       │ - CRUD Tasks     │              │ - Auto-publish        │
│ Service      │       │ - Pipelines      │              │ - Real-time updates   │
└───────┬──────┘       └─────────┬───────┘              └───────────┬─────────┘
        │                          │                                │
        ▼                          ▼                                ▼
 ┌─────────────┐          ┌──────────────────┐          ┌────────────────────────┐
 │ Postgres DB │          │ Redis / Caching  │          │ Analytics & Observability│
 │ - Tenants    │          │ - Rate limit     │          │ - Logs (Grafana)         │
 │ - Tasks      │          │ - Queues         │          │ - Metrics (Prometheus)   │
 └─────────────┘          └──────────────────┘          └────────────────────────┘

Backend (FastAPI + Python 3.11)

Key features:

  • Google OAuth + JWT
  • Multi-tenant org isolation
  • Subscription tiers
  • PostgreSQL + SQLAlchemy
  • Redis caching
  • Auto-generated API docs (/docs)

Data Pipeline Engineering (Celery)

The ETL system processes analytics events in batches.

Pipeline Features

  • Batch aggregation
  • Automatic daily reports
  • Productivity score calculations
  • Time-series trend generation
  • Data lifecycle cleanup

This mirrors quant trading system pipelines for market data, analytics, and batch processing.

Frontend (Next.js 16 + Tailwind)

Features:

  • Real-time Kanban board
  • Analytics dashboard
  • Recharts visualizations
  • Zustand state store
  • Dark-mode optimized UI

Technical Achievements

Multi-Tenant System

  • Complete org-level data isolation
  • Subscription-based resource limits
  • Horizontal scalability

Real-Time WebSockets

  • Live task updates
  • Zero-refresh collaboration foundation

Analytics Engine

  • Productivity metrics
  • Completion trends
  • Contributor stats
  • Automated scheduling (Celery Beat)

Technology Stack Summary

Backend

  • Python 3.11, FastAPI
  • SQLAlchemy, PostgreSQL 16
  • Redis 7
  • Celery + Celery Beat
  • JWT, WebSockets

Frontend

  • Next.js 16
  • TypeScript
  • Tailwind CSS
  • Zustand
  • Recharts

Infrastructure

  • Docker
  • Docker Compose
  • Traefik reverse proxy
  • Let’s Encrypt SSL

Key Features

  • Full Kanban system
  • Real-time updates
  • Multi-tenant org structure
  • Advanced analytics
  • ETL pipeline (Celery)
  • OAuth login
  • Production-grade deployment
# Start all services
docker-compose up -d --build

# Initialize database
docker-compose exec backend python init_db.py

# View logs
docker-compose logs -f

# Scale Celery workers if needed
docker-compose up -d --scale celery-worker=3

Impact & Learning

This project demonstrates proficiency in:

  • Full-stack engineering
  • Data pipeline architecture
  • Dockerized microservices
  • Multi-tenant SaaS design
  • Real-time systems
  • Production DevOps

These patterns match those used in quant trading environments for:

  • Market-data pipelines
  • Analytics aggregation
  • Monitoring infrastructure