KB

Case study

B-CRM DEMO — CRM for lead handling and sales operations

Production-like CRM demo with role-aware views, Supabase data, operations workflow and documented limitations.

B-CRM admin dashboard and demo workflow preview
B-CRM realization tutorial and operations workflow preview

Problem

Sales and operations teams need one place for lead ownership, statuses, callbacks, meetings, files, comments and post-contract execution.

Goal

Build a CRM demo that organizes lead work, separates role-based screens and shows how a record moves from sales into operations.

Status

Production-like CRM demo

Stack

ReactTypeScriptNext.jsSupabase AuthPostgreSQLTailwind CSSVercelVitest

Users and roles

Owner

Full control over CRM data, roles, settings, exports and system-level access.

Admin

Manages users, imports, leads, team structure and operational CRM settings.

Manager

Works with team leads, assignment, team metrics, approvals and follow-up.

Sales representative

Handles assigned leads, statuses, comments, callbacks, meetings and offers.

Finance

Reviews financing context, reports and data needed before settlement continues.

Viewer

Read-only access for management review, audit or safe observation.

Accounting

Works with documents, invoices, annexes and demo KSeF payloads after contract approval.

Logistics

Coordinates orders, picking, warehouse preparation and delivery documents.

Installer

Handles the installation stage and confirms field execution.

Key features

  • Supabase Auth login and demo role cards on the login screen.
  • Role normalization, permission helpers and legacy aliases: manager to manager role, sales to sales representative.
  • Lead ownership, statuses, comments, activity history, reminders, files, callbacks and meetings.
  • Admin, manager, sales, calendar, calculators, import, users and lead-detail routes.
  • CSV import, filtered export, offer/PDF-oriented calculators and print-ready offer flow.
  • Operations route with finance, accounting, logistics and installation workflow.
  • Safe demo tutorial that walks through sales PDF, manager check, finance, accounting, logistics and installer steps.
  • KSeF demo package/payload preview without sending production data.
  • Supabase SQL files for schema, RLS, policies, demo users, hierarchy and demo/production isolation.

Technical decisions

  • Supabase is used because it combines auth, PostgreSQL, policies and fast demo-friendly deployment.
  • Role logic is centralized in role helpers and permission checks instead of being scattered through UI components.
  • Data is read through the Supabase client and selected route handlers where server-side validation or admin operations are needed.
  • The app separates sales work from post-contract operations through dedicated routes and role-aware home paths.
  • Demo users and demo scope are documented so portfolio review can happen without touching real client data.

What I learned

  • Designing role-based workflows beyond a simple admin/user split.
  • Working with Supabase Auth, PostgreSQL tables, RLS-oriented SQL and demo seed data.
  • Building dashboards and dense CRM screens around real operational states.
  • Connecting lead work with post-contract finance, accounting, logistics and installation steps.
  • Documenting a production-like demo honestly with tests, CI, roadmap and known risks.

Next improvements

  • Add more Playwright smoke tests for login, dashboards and operations tutorial.
  • Split the largest route components into smaller domain modules.
  • Improve Supabase error logging, analytics and monitoring.
  • Strengthen mobile UX for dense tables and long operational forms.
  • Add a safe demo reset/seed script for repeatable presentations.

Limitations

B-CRM is a portfolio demo with production-like patterns. It still needs broader e2e coverage, monitoring, security review and UX hardening before real production use.