TaskFlow
A backend API for managing organizations, projects, and tasks in a multi-tenant environment.
Overview
TaskFlow is a backend API for managing organizations, projects, and tasks in a multi-tenant environment. It is designed to model how real SaaS tools (e.g. Linear, Jira, Notion) handle authentication, authorization, and data isolation across teams.
The system focuses on correct access control, clean domain boundaries, and production-ready architecture rather than simple CRUD operations.
Motivation
The motivation behind TaskFlow was to move beyond simple CRUD APIs and build a backend system that reflects real-world product constraints. I wanted to understand how production systems handle multi-tenancy, role-based access control, and strict data isolation across teams. TaskFlow was designed to model how collaborative tools manage organizations, permissions, and workflows, focusing on correct authorization, scalable architecture, and maintainable backend design rather than UI complexity.
Core Concepts
- A single backend serves multiple organizations
- Users can belong to multiple organizations
- A user’s permissions depend on their role per organization
Features
Authentication
- JWT-based authentication
- Secure login & registration
- Protected endpoints
Organizations
- Create organizations
- Automatic owner membership creation
- Organization-scoped access
Memberships
- User ↔ Organization relationship
- Role stored per membership
- Single source of truth for permissions
Projects
- Projects belong to organizations
- Only owners/admins can create projects
- Members have read-only access
Tasks
- Tasks belong to projects
- Tasks can be assigned to members
- Only assigned members or privileged roles can update tasks
Invitations
- Organization members can invite users via email
- Token-based invite acceptance
- Invite expiration handling
Activity Logging
- Important actions are logged
- Provides an audit trail per organization
Technology Stack
- Python
- Django
- Django REST Framework
- PostgreSQL
- Docker
- JWT Authentication
Architecture & Design Decisions
The application is split into two primary experiences: a chat-first homepage and a scroll-based portfolio. Knowledge about projects is embedded into the AI, allowing users to ask follow-up questions that go beyond what is displayed on the page.
Future Improvements
- Pagination & filtering
- Async email delivery for invites
- Webhooks / notifications
- Deployment (AWS / Fly.io / Railway)
- API documentation (Swagger / Redoc)