Farabi
002 · 2026

CCTB Platform

Full-stack platform for a tech and business centre: courses, events, a member directory and space booking with database-level double-booking protection, run from an in-house admin panel

Next.js 16PostgreSQLPrismaBooking EngineRBAC
CCTB Platform screenshot

The Project

CCTB (Chattogram Centre for Technology & Business) is a community hub for courses, events, coworking spaces and business opportunities. I built its complete platform end to end: the public website, an in-house admin panel that acts as the CMS, and a space booking system. Content lives in a 27-model PostgreSQL schema through Prisma, and pages read it through a typed data layer with Next.js 16 Cache Components, where each read is tagged by the records it uses so an admin save expires exactly the pages affected. Visitors book a space by day and hour and pay by bKash with a transaction ID; the slot is held with a countdown and is released automatically when the hold ends, with no background job. Double booking is refused by Postgres itself through a GiST exclusion constraint on time ranges, and booking transactions retry on deadlocks, so two people booking the same hour at the same moment can't both win. Staff get instant phone alerts through ntfy, with reminders driven by a ticker that uses a Postgres advisory lock so only one container sends them, a daily budget guard against the free plan's limit, and no personal data in any alert. The admin panel has three roles (super admin, admin, staff) enforced on every API request, a full audit log, course and event registrations with seat limits and registration windows, and a Puck-based visual page editor with drafts, preview, publish and version restore. Public forms are protected by an invisible ALTCHA proof-of-work captcha and rate limits. The whole app runs in Docker on Dokploy, is mobile friendly down to the admin screens, and is guarded by Playwright visual regression tests that compare every page at phone, tablet and desktop widths.

01
Architecture

Modelled courses, events, people, spaces, bookings and page content in PostgreSQL, behind a typed data layer with per-record cache tags, and pushed the hardest rule (no overlapping bookings) down into the database where concurrent requests can't race past it.

02
Build and Launch

Built the public site from the client's mockups, the role-based admin panel, registrations, the booking flow and phone alerts, then shipped it in Docker on Dokploy with visual regression tests guarding every page.

Deliverables

  • Next.js 16 Website and In-house Admin CMS
  • 27-model PostgreSQL Schema with Prisma 7
  • Space Booking with Holds, bKash TrxID and Expiry
  • Double-booking Prevention via Postgres Exclusion Constraint
  • Role-based Access (Super Admin, Admin, Staff) and Audit Log
  • Visual Page Editor with Drafts, Preview and Version Restore
  • Real-time Phone Alerts with Advisory-lock Reminder Ticker
  • Tag-based Cache Invalidation with Cache Components
  • Playwright Visual Regression at 3 Breakpoints
  • Docker Deployment on Dokploy

Want something similar?

View live siteStart a project
Next steps

Let's build the
next one.

Get in touch