How rohitd3v/devdesk works
Project Type and Purpose
• DevDesk is a full-stack ticketing and DevOps automation tool aimed at small to mid-sized developer teams.
• The file tree reveals two main directories: “frontend” (a Next.js 13 app in TypeScript) and “backend” (an Express-style Node.js API, also in TypeScript), plus integration with Supabase for data storage and auth.
High-Level Architecture Components
a. Frontend (Next.js)
• Pages & layout (app/page.tsx, app/layout.tsx)
• UI components (Sidebar, TicketCard, Forms)
• Feature modules under src/app/features (auth, projects, tickets, comments, profiles)
• API client wrapper (apiClient.ts) that communicates with the backend via REST
b. Backend (Express-style API)
• Entry point: server.ts
• Routing layer: routers for auth, profiles, projects, tickets, ticketComments, ticketActivity
• Controllers: business logic handling for each resource
• Services: reusable logic (e.g., ticketService)
• Middleware: auth checks, validation, error handling
• Supabase client: config/supabaseClient.ts for DB and auth interactions
c. Database & External Services
• Supabase (Postgres database + built-in Auth)
• Potential future integrations (e.g., email/webhooks) via additional services or controllers
Key Architectural Patterns
• Layered MVC-style architecture on the backend: Routes → Controllers → Services → Database
• Feature-driven modularization on the frontend: each feature folder contains its components, hooks, services
• Centralized API client on the frontend for all HTTP calls
• Zod validation in backend for request payloads
• Async handler wrapper for uniform error handling
a. Main Components
• Browser/Client (React–Next.js)
• Next.js app (UI render, routing)
• API Client (apiClient.ts)
• Backend API (Express server)
• Supabase (Auth & Postgres)
b. Relationships & Data Flows
1. User interacts with Next.js UI →
2. Next.js calls apiClient → issues HTTPS requests to Backend API endpoints (e.g., /api/projects) →
3. Backend middleware authenticates via Supabase Auth →
4. Controllers call Services → Supabase Client executes SQL queries or auth operations →
5. Responses flow back up: Supabase → Service → Controller → HTTP Response → apiClient → Next.js → UI
c. Important Design Principles
• Separation of concerns: UI vs business logic vs data layer
• Modular, feature-based structure in frontend to ease scaling and maintenance
• Centralized error handling and validation in backend
• Use of typed interfaces (TypeScript types + Zod schemas) for end-to-end type safety
d. Technologies & Frameworks
• Frontend: Next.js 13, React, TypeScript, PostCSS
• Backend: Node.js, Express-style routing, TypeScript, Zod, Supabase client
• Database/Auth: Supabase (PostgreSQL + JWT auth)
Detail
• Every layer: UI, hooks, services, middleware, controllers, data access.
• Validation (Zod) and error handling as cross-cutting middleware.