Zenith PM is a high-fidelity, high-velocity agile project management SaaS platform purpose-built for high-performance engineering squads. Designed to replace sluggish legacy trackers, Zenith matches a clean, modern glassmorphic frontend built with Next.js 15 and React 19 (JavaScript/JSX) with a scalable, high-throughput Node.js/Express/TypeScript backend. The system features real-time synchronization via Socket.io alongside an integrated suite of 11 context-aware Gemini AI tools functioning as digital team members.
graph TD
A["Zenith Platform"] --> B["Enterprise App Client"]
A --> C["High-Performance Server"]
A --> D["Gemini AI Engine"]
B --> B1["Next.js 15 App Router (React 19)"]
B --> B2["Zustand Selector useShallow Optimization"]
B --> B3["Framer Motion Kanban & Socket Cursors"]
C --> C1["Express TypeScript & JWT Auth Gateway"]
C --> C2["Prisma Schema & PostgreSQL Data Layer"]
C --> C3["Presence Rooms State Engine"]
D --> D1["Prompt-to-Tasks Wizard Service"]
D --> D2["Capacity-Aware Sprint Optimizer"]
D --> D3["Gemini Automated Bug Solver"]
D --> D4["Grounded Workspace Chat Bot"]
We recently executed an extensive, end-to-end upgrade of Zenith to establish a top-tier, enterprise-ready standard:
- Phase 1: Database & Backend Optimization:
- N+1 Query Resolution: Parallelized database counts using
Promise.allin controllers, accelerating API load speeds. - Prisma Indices: Configured highly selective
@indexparameters insideschema.prismato accelerate query sorting. - Zod Payload Validations: Embedded bulletproof server-side input schema validation on all request controllers using an optimized custom middleware layer.
- N+1 Query Resolution: Parallelized database counts using
- Phase 2: Sockets & Multiplayer Collaboration:
- Ghost Connection Eviction: Tracked active Socket rooms within
presence.tsregistries. Connection drops trigger automatic room cleanups, broadcasting exit alerts to active team members. - Zombie Cursors Deletion: Configured Zustand hooks on
user:leftevents to instantly delete departees' mouse pointers from active boards.
- Ghost Connection Eviction: Tracked active Socket rooms within
- Phase 3: RAG-Grounded Chatbot & Capacity-Aware Planner:
- Keyword-Based RAG Context Grounding: Upgraded
chatWithWorkspaceinai.service.tsto rank workspace documents using keyword relevance (RAG filtering) to feed dense context previews to Gemini. - Capacity-Aware Sprint Planning: Re-engineered the Sprint Optimizer to fetch live developer workloads (active assigned tasks) directly from PostgreSQL to balance card assignments.
- Keyword-Based RAG Context Grounding: Upgraded
- Phase 4: State Selector Tuning & Framer Motion Kanban Board:
- Zustand Selector Tuning: Wrapped destructured store hooks with
useShallowfromzustand/react/shallowinside layouts and dashboard views to isolate rendering cascades. - Tactual Card Animations: Swapped board cards with Framer Motion
<motion.div layout>wrappers with spring transitions and tactile hover lift-up physics.
- Zustand Selector Tuning: Wrapped destructured store hooks with
- Phase 5: Multi-Stage DevOps & CI/CD Pipelines:
- Double-Stage Docker Pipelines: Split
backend/Dockerfileandfrontend/Dockerfileinto intermediatebuilderand minimal productionrunnerstages to shrink image footprints. - GitHub Actions CI Workflow: Set up a robust validation pipeline (
ci.yml) triggering on pushes tomaster.
- Double-Stage Docker Pipelines: Split
- Phase 6: Transactional Emails (Resend SDK):
- Resend Transactional Integrations: Designed dark-themed Notion-style invitations and Linear-style task assignment HTML templates, triggered asynchronously in the background inside Controllers.
- Phase 7: Stripe Subscription Checkouts & Sandbox Portals:
- Monetization Gateway: Integrated Stripe checkouts and webhook handlers. Configured mock success sandbox loops (
/api/billing/mock-success) to simulate webhook confirmations instantly in development.
- Monetization Gateway: Integrated Stripe checkouts and webhook handlers. Configured mock success sandbox loops (
- Hardening Rate Limiter Security:
- Reverse-Proxy IP Extraction: Hardened custom rate limiters with secure parsing of
x-forwarded-forto extract the true client IP and prevent bypass spoofing behind Cloudflare or ALB.
- Reverse-Proxy IP Extraction: Hardened custom rate limiters with secure parsing of
- Robust JWT token-based authentication with secure local/sessional memory hydration.
- Automated onboarding layer that auto-provisions a personalized default tenant hub upon registration.
- Granular Role-Based Access Control (RBAC) levels enforcing data mutations natively:
OWNER,ADMIN,MEMBER, andVIEWER.
- Zero-latency task allocation updates matching modern agile states:
BACKLOG,TODO,IN_PROGRESS,IN_REVIEW, andDONE. - Optimized Optimistic UI updates within custom Zustand store slices instantly mirror coordinate modifications on screen before database persistence, resolving client lagging.
- Native tracking clocks (Pomodoro timers) let developers log deep focus intervals seamlessly to PostgreSQL analytics schemas.
- Real-time multiplayer presence engine that broadcasts and tracks mouse cursor coordinates of connected developers within active project boards.
- Asynchronous canvas synchronization streams status transitions and lane-order updates via centralized channel events instantly.
- Automated "Ghost Connection" eviction handles abrupt user network failures by cleaning registries inside server sockets.
- Prompt-to-Tasks: Compiles text descriptions into full sprint tickets equipped with pre-populated subtasks and technical priorities.
- Sprint Planning Optimizer: Iterates through pending cards, looks up estimated metrics, and suggests optimal development workloads based on live team member active workloads.
- Meeting Summarizer: Takes raw text transcripts from engineering syncs and turns them into technical checklist backlogs.
- AI Bug Solver: Examines issue context, reports deep structural root causes, and generates complete proposed source code repairs.
- Grounded Chatbot Companion: Provides an integrated assistant that has workspace-wide text grounding, leveraging keyword relevance scoring (RAG) to scan active wiki documentation.
d:/Project_Management/
βββ .github/ # CI/CD Workflows
β βββ workflows/
β βββ ci.yml # GitHub Actions CI compilation & build validator pipeline
βββ frontend/ # Next.js 15 App Router React JS Client
β βββ src/
β β βββ app/ # Dashboard layouts, Calendars, Wikis, Sprints, Profile views (.jsx)
β β βββ components/ # Glassmorphic shells, overlays, inputs, buttons (.jsx)
β β βββ store/ # Zustand state slices (useAuthStore.js, useWorkspaceStore.js, useSocketStore.js)
β β βββ lib/ # Global utility scripts and client API mappings (.js)
β βββ jsconfig.json # JavaScript absolute path directory mapping configurations
β βββ tailwind.config.js # Custom animations, boxed box-shadows, HSL theme maps
β βββ Dockerfile # Multi-stage production frontend container blueprint
β βββ package.json
βββ backend/ # Node.js Express TypeScript Engine Server
βββ src/
β βββ controllers/ # HTTP request handlers and payload managers
β βββ middlewares/ # Core protection guards (JWT decryption, Proxy IP rate limits, schema Zod validators)
β βββ routes/ # Central application gateway routing blueprint
β βββ services/ # Google Gemini generative models logic, Resend emails, and Stripe billing
β βββ sockets/ # Collaborative coordinates & room syncing socket handlers
β βββ server.ts # Express application initialization entrypoint
βββ prisma/
β βββ schema.prisma # Unified Prisma schema architecture (Neon Postgres)
β βββ seed.ts # High-fidelity developer roles seeding database pipeline
βββ Dockerfile # Multi-stage production backend container blueprint
βββ package.json
A complete ecosystem including PostgreSQL, the TypeScript backend server, and the Next.js production client can be spun up instantly using optimized multi-stage builder-runner pipelines:
# Compile multi-stage builder environments and run detached service processes
docker-compose up --build -d- π SaaS Frontend Web Application:
http://localhost:3000 - β‘ Express Core API Gateway Engine:
http://localhost:8000/api
cd backend
npm installCreate a standard local development environment configuration file at backend/.env:
PORT=8000
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/zenith?schema=public"
JWT_SECRET="super-secret-zenith-jwt-key-2026-wow"
GEMINI_API_KEY="YOUR_GOOGLE_GEMINI_API_KEY_HERE"
RESEND_API_KEY="YOUR_RESEND_API_KEY_HERE"
STRIPE_SECRET_KEY="YOUR_STRIPE_SECRET_KEY_HERE"
STRIPE_WEBHOOK_SECRET="YOUR_STRIPE_WEBHOOK_SECRET_HERE"
CORS_ORIGIN="http://localhost:3000"Sync database relational schemas and trigger the idempotent development seeding engine:
# Push Prisma schema blueprints to active database instance
npx prisma db push
# Load standard organization tenants, checklist items, and markdown docs
npm run seedBoot the API development server environment:
npm run devcd ../frontend
npm installCreate the public client build configuration template at frontend/.env.local:
NEXT_PUBLIC_API_URL="http://localhost:8000/api"
NEXT_PUBLIC_SOCKET_URL="http://localhost:8000"Execute the application client compiler:
npm run devOpen your browser and navigate to http://localhost:3000.
Zenith's seeding engine handles rapid testing out of the box by preloading profiles with pre-mapped projects:
- Lead Product Architect / Admin Guard:
- π§ Email address:
lead@zenith.com - π Password string:
password123
- π§ Email address:
- Software Engineer / Team Member Profile:
- π§ Email address:
developer@zenith.com - π Password string:
password123
- π§ Email address:
π Authentication & Profiles
| Method | Endpoint | Functional Scope |
|---|---|---|
POST |
/api/auth/register |
Compiles profiles and provisions a unique default workspace |
POST |
/api/auth/login |
Validates credentials and returns sessional JWT signature keys |
GET |
/api/auth/me |
Fetches active identity scopes and sessional tenant mappings |
PUT |
/api/auth/profile |
Synchronizes user names, passwords, and custom avatar indicators |
π’ Workspace & Project Tenants
| Method | Endpoint | Functional Scope |
|---|---|---|
POST |
/api/workspaces |
Provisions an isolated company workspace space |
GET |
/api/workspaces |
Lists all workspaces linked to authenticated users |
GET |
/api/workspaces/:workspaceId/stats |
Aggregates project velocities and global completion metrics |
POST |
/api/workspaces/:workspaceId/invite |
Invites registered users to workspaces with background Resend HTML invites |
DELETE |
/api/workspaces/:workspaceId/members/:userId |
Revokes developer access keys from selected workspace nodes |
POST |
/api/projects |
Creates an independent board task array tracker |
GET |
/api/projects |
Fetches projects linked to active organization context parameters |
π Task & Kanban Card Operations
| Method | Endpoint | Functional Scope |
|---|---|---|
POST |
/api/tasks |
Creates backlog item nodes populated with sorting indices, triggers assignee emails |
PUT |
/api/tasks/:taskId |
Commits status transitions, lane orders, and assignee updates |
DELETE |
/api/tasks/:taskId |
Purges task entries and cascade deletes matching checklist arrays |
POST |
/api/tasks/:taskId/subtasks |
Appends checklists to manage granular sprint objectives |
POST |
/api/tasks/:taskId/comments |
Posts textual remarks directly to active task discussion streams |
POST |
/api/tasks/:taskId/timer |
Saves logged task focus duration elements directly to database |
π Document Wikis
| Method | Endpoint | Functional Scope |
|---|---|---|
POST |
/api/documents |
Provisions markdown documents and wiki pages in the workspace |
GET |
/api/documents |
Lists all documents linked to workspace contexts |
GET |
/api/documents/:documentId |
Fetches full markdown document details |
PUT |
/api/documents/:documentId |
Updates markdown documentation titles and content |
DELETE |
/api/documents/:documentId |
Purges documents from the workspace database |
π§ Google Gemini AI Services
| Method | Endpoint | Functional Scope |
|---|---|---|
POST |
/api/ai/generate-tasks |
Evaluates natural language input to assemble ticket backlogs |
POST |
/api/ai/optimize-sprint |
Evaluates current workloads and backlog counts to organize sprints |
GET |
/api/ai/project-summary/:projectId |
Compiles milestone results and evaluates potential blocks |
POST |
/api/ai/summarize-meeting |
Scans text notes to build clear developer requirements checklists |
GET |
/api/ai/workspace-risks/:workspaceId |
Monitors system timelines to flag overload risks |
POST |
/api/ai/solve-bug |
Suggests root-causes and provides formatted code modifications |
POST |
/api/ai/smart-assign |
Suggests optimal candidate assignees for custom ticket tags |
GET |
/api/ai/daily-standup |
Assembles text summaries tracking daily development updates |
POST |
/api/ai/chatbot |
Grounded digital coworker using RAG document rankings |
π³ Monetization & Subscriptions (Stripe)
| Method | Endpoint | Functional Scope |
|---|---|---|
POST |
/api/billing/checkout |
Initiates safe Stripe Checkout portal sessions for workspace upgrades |
GET |
/api/billing/mock-success |
Sandbox portal to test billing successes and upgrade tiers in development |
POST |
/api/billing/webhook |
Receiver endpoint that captures Stripe subscription completed events |