Delivered remotely for a business based in Vancouver, Canada. Names withheld by agreement.
Project Overview
Distributed product teams lose delivery momentum when planning tools lag behind real engineering work. From Vancouver, we architected a multi-tenant project management platform built around Next.js, NestJS, PostgreSQL, and Redis so product managers, engineers, and delivery leads can coordinate backlogs, sprint boards, and cross-team dependencies in a single responsive workspace. Rather than bolting real-time updates onto a legacy CRUD database, the platform treats concurrent board state, granular permission scoping, and auditability as first-class primitives across the browser and API layers.
Business Bottleneck
Growing engineering organizations frequently outgrow lightweight task checklists yet stall inside bloated legacy trackers that take seconds to load a sprint board. Teams struggled with stale Kanban states during live standups, accidental overwrites when two leads prioritized the same backlog column, and fragmented spreadsheets used to track cross-project blockers and team capacity. Workspace administrators also lacked verifiable tenant isolation and role-scoped visibility when external contractors joined specific client-facing boards.
Architectural Strategy
We split presentation and domain orchestration cleanly between Next.js and NestJS while keeping strong TypeScript contracts across the wire. Next.js handles initial server-rendered project shells, fast route transitions, and optimistic local board mutations, while NestJS owns authentication, RBAC policy evaluation, WebSocket room broadcasting, and background job dispatch.
PostgreSQL serves as the single source of truth for issues, epics, comments, time logs, and dependency graphs. Instead of polling endpoints every few seconds, NestJS publishes committed state changes over Redis Pub/Sub to active Socket.IO rooms so every connected browser patches its local query cache incrementally.
Core Capabilities
- Live Sprint & Kanban Boards: Instant card drag-and-drop with optimistic UI updates, column WIP limits, and automatic conflict reconciliation across connected users.
- Hierarchical Work Breakdown: Initiatives, epics, stories, and subtasks modeled cleanly with roll-up progress indicators and cycle-free blocker links.
- Role-Scoped Workspace Access: Granular permissions separating organization owners, project leads, contributors, and external guest reviewers down to board and field visibility.
- Workload & Capacity Views: Sprint allocation heatmaps comparing estimated story points and logged hours against individual member availability and holiday calendars.
- Automated Workflow Rules: Configurable triggers that transition parent epics, assign reviewers, or dispatch outbound webhooks when issue statuses or pull-request links change.
- Keyboard-First Command Palette & Search: Sub-second full-text search across issue titles, descriptions, and comment threads scoped strictly to authorized projects.
Technical Architecture
Flow: Browser (Next.js App Router) -> ALB (HTTPS & WSS) -> NestJS API / WebSocket Gateway -> PostgreSQL (RLS + Fractional Index) & Redis (Pub/Sub + BullMQ)
Incoming browser requests authenticate with short-lived JWTs and HttpOnly refresh cookies validated at the NestJS gateway. On initial project load, Next.js fetches the hydrated board snapshot via REST so users see rendered columns immediately without a blank loading spinner, then opens an authenticated WebSocket channel bound to the workspace and project room.
When a user moves or edits a task, the client applies an optimistic update and sends the mutation along with the task's current version integer. Inside NestJS, a PostgreSQL transaction sets app.current_tenant_id, evaluates Row-Level Security policies, verifies the version match, computes a new fractional index key if the card changed rank, commits the change, and emits an event through Redis Pub/Sub. Every NestJS container subscribed to that project channel pushes the delta payload to connected clients, while BullMQ workers asynchronously process mention notifications, SLA escalations, and webhook deliveries.
Technology Stack
| Category | Technology detail |
|---|---|
| Frontend Framework | Next.js (App Router) with React Server Components and optimistic client mutations |
| Language & Typing | TypeScript shared contracts for DTO validation, API responses, and socket payloads |
| Backend Runtime | NestJS modular monolith exposing REST endpoints and authenticated WebSocket gateways |
| Primary Database | PostgreSQL with Row-Level Security policies, ltree hierarchies, and GIN full-text indexes |
| Realtime Coordination | Redis Pub/Sub adapter synchronizing Socket.IO rooms across stateless NestJS pods |
| Background Queues | BullMQ on Redis handling recurring tasks, webhook retries, and digest notifications |
| Container Orchestration | Docker images deployed on AWS ECS Fargate behind an Application Load Balancer |
| Observability | OpenTelemetry traces and structured JSON logs exported to AWS CloudWatch |
Engineering Trade-offs & Solutions
| Challenge | Architectural Solution |
|---|---|
| Reordering cards without rewriting entire column indexes | Lexicographical fractional indexing on text rank keys with background rebalancing when key strings exceed threshold length |
| Maintaining tenant boundaries across shared tables | PostgreSQL Row-Level Security bound per transaction via NestJS request context instead of relying solely on ORM query filters |
| Preserving WebSocket fan-out across autoscaling API pods | Stateless Socket.IO rooms backed by Redis Pub/Sub so any ECS task can broadcast mutations to users on other instances |
| Preventing circular task-blocking graphs | Bounded recursive CTE cycle check inside the dependency insertion transaction before persisting blocker edges |
| Keeping heavy search queries from slowing board mutations | Composite B-tree indexes for board views paired with dedicated GIN tsvector indexes and cursor pagination for search |
Security & Reliability
Every API endpoint enforces both NestJS guard evaluation and database-level PostgreSQL Row-Level Security, creating defense in depth for multi-tenant workspaces. Guest collaborators receive project-restricted tokens that exclude private internal comments and organization billing metadata at the serializer boundary.
Webhook deliveries and notification bursts run outside the synchronous request path inside BullMQ queues with exponential backoff, idempotency keys, and dead-letter inspection. Automated database migrations execute as pre-deploy jobs with backward-compatible schema steps so rolling ECS container updates drop zero active WebSocket connections abruptly.
Performance & Scale
Board load queries avoid N+1 joins by fetching normalized task summaries, assignee profiles, and label mappings in batched relational queries indexed on (tenant_id, project_id, status_id, rank_key). Client state separates static workspace metadata from fast-changing board items, preventing full board re-renders when a single comment arrives.
Read-heavy reporting exports—such as velocity charts and cumulative flow diagrams—aggregate from pre-computed daily snapshot tables refreshed asynchronously when sprint states change, shielding live transaction throughput from analytical scans.
Operational Outcomes
Engineering and product squads replaced disconnected spreadsheets and sluggish legacy trackers with a single predictable workspace where board changes appear instantaneously for every team member. Delivery leads gain clear visibility into blocked dependencies and sprint capacity before bottlenecks cascade into missed milestones, while administrators onboard external partners safely under verifiable tenant isolation and complete change histories.