← All projects
Project / In development

Business presence & booking platform

A multi-tenant SaaS workspace that brings business profiles, service booking, customer conversations, and an AI assistant together.

Next.jsTypeScriptFastifyPostgreSQLPrismaRedisBullMQpgvector

Overview

I am building a platform for service businesses to manage their online presence and turn customer interest into appointments. Each workspace can publish a customizable profile, organize services and calendars, capture contacts, and coordinate follow-up conversations. An assistant combines business knowledge with booking tools and human handoff.

Technologies

Next.js, TypeScript, Fastify, PostgreSQL, Prisma, Redis, BullMQ, and pgvector.

Architecture

A Next.js frontend communicates with a Fastify API in a TypeScript monorepo. Shared Zod contracts keep frontend forms and API validation aligned. The backend uses services, repository boundaries, and adapters for infrastructure and external providers.

System design

Booking writes run inside transactions with a calendar-level lock and a fresh availability check, including appointment buffers that cross midnight. A transactional outbox records domain events alongside business changes; workers dispatch events, reminders, and delayed work through BullMQ and Redis.

The assistant has a separate knowledge ingestion flow for document extraction, chunking, and embeddings. Versioned sources and embedding generations prevent outdated work from replacing newer content. PostgreSQL vector indexes support retrieval without a separate vector database.

Database design

Workspaces anchor memberships, public profiles, calendars, services, contacts, and assistant configuration. Composite keys and selected tenant-aware foreign keys reinforce relationships between workspace-owned records. Contact identity is unique within a workspace.

Bookings preserve service details as snapshots, record lifecycle timestamps, and link rescheduled appointments to their predecessors. Calendar and status indexes support operational queries. Assistant data includes source revisions, knowledge chunks, runs, and usage records; outbox and processing records support durable event handling.

Security

Authentication uses access-token cookies, hashed refresh tokens, rotation, and token-family revocation when reuse is detected. Password hashing, two-factor authentication, workspace membership checks, and role restrictions are implemented in the backend.

Shared validation, Redis-backed request limits, and security headers provide additional controls. Assistant retrieval receives workspace context; account access is checked separately from public profile and booking access.

Development status

In development. Core workspace, profile, booking, contact, and assistant workflows are implemented locally. Work continues on integration acceptance, release preparation, and operational validation with real providers. Merchant payment handling and marketplace workflows are outside the current scope.