This repository powers the backend infrastructure behind QueueFlow, a high-performance Real-time Kanban Workspace. It features robust RESTful endpoints bound natively over an integrated Socket.io ecosystem seamlessly driving Real-time application states directly to isolated front-end clients dynamically.
- Relational Database Engine: Complex, scalable schema designs utilizing Prisma ORM built strictly over a PostgreSQL (Supabase) database natively enforcing relational tracking blocks (Users -> Projects -> Tasks).
- Bi-directional WebSockets: Wrapped the Express HTTP server cleanly into a Socket.io node instance pushing organic telemetry signals isolated exclusively into target active 'Project Rooms'.
- Time-Bound Cryptographic Invites: Highly secure cryptographic generation of 6-character Workspace invitations natively evaluating database deadlines executing organic expiry mechanics securely mitigating unauthorized onboardings.
- Granular Audit Logging: Custom telemetry tracking logic executing strict
.create()Prisma hooks immediately sequentially following state interactions permanently generating timeline Analytics securely. - JWT Identity Chains: Stateless JWT-driven authentication headers executing distinct RBAC (Role-Based Access Control) gates strictly preventing Developers from hitting PM-restricted routing nodes securely.
The backend is strictly typed and managed using Prisma. Below is a high-level overview of our core tables and how they structurally map the relational QueueFlow ecosystem:
-
User(Table): Core identity store tracking authentication data (Email, Password Hash) and their persistentRole(PM,DEVELOPER,CLIENT).- One-to-Many ➔
Project(A PM creates many Projects). - One-to-Many ➔
ProjectMember(A user can join many workspaces). - One-to-Many ➔
Task(A user is assigned multiple workload items). - One-to-Many ➔
StickyNote(A user can leave multiple comments).
- One-to-Many ➔
-
Project(Table): Represents an isolated Workspace initialized natively by a Project Manager.- One-to-Many ➔
ProjectMember(Manages who securely has access to the workspace). - One-to-Many ➔
Task(Scopes tasks exclusively to this workspace border). - One-to-Many ➔
ActivityEvent(Scopes timeline logs directly to the project dashboard).
- One-to-Many ➔
-
ProjectMember(Table): Serves as the junction matrix securely resolving many-to-many mapping boundaries betweenUser⇄Project.- Enforces unique compound keys
[user_id, project_id]preventing duplicate roles simultaneously holding state.
- Enforces unique compound keys
-
Task(Table): Granular workload rows tracking agile assignments. Contains state (status), structural queue order (position), and analytical timestamps (started_at,completed_at).- Many-to-One ➔
User(The Developer Assigned). - Many-to-One ➔
Project(The target Workspace). - One-to-Many ➔
StickyNote(A task can contain formal feedback).
- Many-to-One ➔
-
ProjectInvite(Table): Temporary cryptographic keys allowing users to bypass manual PM assignments securely natively.- Features a strict
expires_atcolumn actively evaluated mitigating unauthorized onboardings.
- Features a strict
-
ActivityEvent(Table): Permanent immutable telemetry tracking strings tracing exact granular actions chronologically (e.g.MOVED_TASK).- Many-to-One ➔
User(The explicit actor who executed the change). - Many-to-One ➔
Task(Optional reference mapping directly back to the modified Task!).
- Many-to-One ➔
-
StickyNote(Table): Client collaboration layer mapping specialized formal visual feedback exclusively tracked via bidirectional isolated WebSocket structures natively smoothly to specific exact DOM components safely.- Many-to-One ➔
Task(The target structural grid scope). - Many-to-One ➔
User(The precise author ID mapping formally backward).
- Many-to-One ➔
git clone https://github.com/Anoop-Kumar-31/QueueFlow_Backend.git
cd QueueFlow_Backendnpm installConstruct a local .env exposing your PostgreSQL connections firmly isolating secrets securely formatting like so:
DATABASE_URL="postgresql://user:password@aws-0-eu-central-1.pooler.supabase.com:6543/postgres?pgbouncer=true"
DIRECT_URL="postgresql://user:password@aws-0-eu-central-1.pooler.supabase.com:5432/postgres"
PORT=5000
JWT_SECRET=your_super_secret_jwt_string
CLIENT_URL=http://localhost:5173Execute Prisma's DB Push to force the Postgres engine to compile the QueueFlow analytical tables natively:
npx prisma db pushnpm run devThe Node.js server and Socket.io instances will aggressively spin up binding to Port 5000 executing seamlessly.
Anoop Kumar | Full Stack Developer
