Back

trello

Built a collaborative product workflow system with shared data models, auth, and real-time synchronization across a monorepo backend stack.

Turborepo
Prisma
Postgres
LiveGitHub

Trello-style project management app

This repository is a monorepo for a Trello-inspired task and team collaboration application. The current implementation is primarily a backend API built with Express, Prisma, and PostgreSQL, and it models the main entities needed for a Kanban-style workflow: users, organisations, memberships, boards, sections, and issues.

The project is intended to evolve into a collaborative board system similar to Trello, where teams can create organisations, manage members, and organize work into boards and cards.

Overview

Stack

Project structure

.
├── apps/
│   ├── api/
│   │   ├── src/
│   │   └── tests/
│   ├── client/
│   └── ws/
├── packages/
│   ├── db/
│   ├── env/
│   ├── eslint-config/
│   ├── typescript-config/
│   └── ui/
├── package.json
├── pnpm-lock.yaml
├── pnpm-workspace.yaml
├── turbo.json
└── README.md

Functionalities implemented

At the moment, the app includes the following working backend capabilities:

Core domain model

The Prisma schema defines a Trello-style entity structure:

User

Organisation

Membership

Board

Section

Issue

This structure matches the expected workflow for a project board app: an organisation owns boards, a board contains sections, and each section contains issues/tasks.

API endpoints

The active API is mounted in the Express app from apps/api/src/app.ts.

Server base

GET /

Returns a simple text response:

"This is the home page..."

Authentication routes

Register a user

POST /user/register
Content-Type: application/json

Request body:

{
  "name": "Jane Doe",
  "email": "jane@example.com",
  "password": "secret123"
}

Example successful response:

{
  "success": true,
  "message": "Register successful",
  "data": {
    "user": {
      "id": "cuid",
      "email": "jane@example.com"
    }
  }
}

Log in a user

POST /user/login
Content-Type: application/json

Request body:

{
  "email": "jane@example.com",
  "password": "secret123"
}

Example successful response:

{
  "success": true,
  "message": "Login successful",
  "data": {
    "user": {
      "id": "cuid",
      "email": "jane@example.com"
    },
    "token": "jwt-token"
  }
}

Organisation routes (defined but not mounted yet)

The organisation module contains route definitions for the following endpoints:

POST /organisation/create-organisation
DELETE /organisation/delete-organisation/:id

Those are implemented in the organisation controller and service layer, but they are not currently connected to the main Express app in app.ts. The controller expects an authenticated user from req.user.id and validates ownership before deletion.

Authentication behaviour

The current auth implementation does the following:

Important note: the service currently uses process.env.JWT_SECRET, while the environment validation schema also expects JWT_ACCESS_SECRET and JWT_REFRESH_SECRET. For local development, it is safer to define both forms in the environment to avoid mismatches.

Database and migrations

The app uses Prisma with a PostgreSQL database. The schema is stored in:

Migrations are stored in:

Common commands:

cd packages/db
pnpm prisma generate
pnpm prisma migrate dev
pnpm prisma studio

Local setup

1) Install dependencies

cd /home/huma/PROGRAMS/trello
pnpm install

2) Configure environment variables

Create a .env file in the project root or configure the environment with variables like:

DATABASE_URL=postgresql://postgres:postgres@localhost:5432/trello
TEST_DATABASE_URL=postgresql://postgres:postgres@localhost:5432/trello_test
PORT=3002
NODE_ENV=development
CLIENT_URL=http://localhost:3000
JWT_SECRET=your-jwt-secret
JWT_ACCESS_SECRET=your-jwt-secret
JWT_REFRESH_SECRET=your-refresh-secret

3) Run database migrations

cd packages/db
pnpm prisma migrate dev

4) Start the API

cd apps/api
pnpm dev

The server listens on the port configured by PORT (default in the environment schema is 3000, while the app’s current startup code uses the environment value or 3002).

5) Run tests

cd apps/api
pnpm test

Monorepo commands

From the repository root:

pnpm dev
pnpm build
pnpm lint
pnpm check-types

Current status and gaps

This project is a functional backend foundation rather than a complete finished product.

Already present

Missing or incomplete

Intended product direction

The data model and route structure point toward a collaborative Kanban board application with:

Summary

This repository is best described as a Trello-inspired backend foundation. It already has the correct architecture and most of the core data model needed for a project board app, but it still requires additional route wiring, middleware, and frontend implementation to become a complete application.