WeBuildCrew
🧩 B2B SaaS · Sales

NexaCRM — Multi-tenant CRM SaaS

A full multi-tenant CRM SaaS with teams, pipelines, automation, billing and analytics — built to onboard and bill customers from day one.

Timeline
7 weeks
Role
Full-stack design & development
Team
Lead engineer + designer
Year
2025
Next.jsTypeScriptPostgreSQLPrismaStripeTailwind CSSRedis
🧩
NexaCRM

−40%

Admin time saved

4 wk

To first paying customer

99.9%

Uptime

10k+

Records / tenant

Client goals

  • Let teams manage leads, deals and customers in one place
  • Bill customers on subscriptions from launch
  • Stay fast and correct as data and teams grow

Project overview

NexaCRM is a multi-tenant SaaS where each company gets an isolated workspace to manage leads, deals, customers and their team. The product had to be useful in the first session and billable from day one.

  • User types: owners, admins, sales reps
  • Core loop: capture lead → work the pipeline → close → report
  • Architecture: organisation-scoped data on every record
  • Scalability: indexed queries, caching, background jobs

The client problem

Our solution

We designed a tenant-isolated schema first, enforced access in a single auth guard, and built the core pipeline loop before anything else — then layered billing, automation and analytics on top.

Technical architecture

Next.js App Router frontend with server components, a PostgreSQL core via Prisma, Redis for caching and rate limits, and Stripe for billing. Every query is scoped by organisation id and authorised server-side.

What we built

Features

👥

Multi-role auth

Owner, admin and member roles per organisation.

📊

Pipelines & deals

Drag-and-drop kanban with custom stages.

💳

Stripe billing

Plans, trials, proration and a customer portal.

⚙️

Workflow automation

Trigger emails and tasks on stage changes.

📈

Analytics dashboard

Revenue, conversion and activity reporting.

🔔

Notifications

In-app and email alerts for owners and reps.

📥

Import / export

CSV import and one-click data export.

🔌

REST + webhooks

Public API and webhooks for integrations.

Under the hood

Technical code

lib/auth-guard.ts
TypeScript
import { auth } from "@/lib/auth"; export async function requireMember(orgId: string) {  const session = await auth();  if (!session) throw new Response("Unauthorized", { status: 401 });   const member = await db.membership.findUnique({    where: { userId_orgId: { userId: session.user.id, orgId } },  });  if (!member) throw new Response("Forbidden", { status: 403 });  return { user: session.user, role: member.role };}
prisma/schema.prisma
Prisma
model Organization {  id        String   @id @default(cuid())  name      String  members   Membership[]  createdAt DateTime @default(now())} model Membership {  id     String @id @default(cuid())  role   Role   @default(MEMBER)  userId String  orgId  String  @@unique([userId, orgId])} enum Role { OWNER ADMIN MEMBER }

Integrations

APIs & services

Stripe

Subscriptions, billing portal and webhooks.

Resend

Transactional & automation emails.

Redis

Caching and rate limiting.

Supabase Storage

Attachments and file uploads.

Slack

Deal-won notifications to channels.

Process

Development workflow

  1. 1

    Discovery

    Goals, users and success metrics defined on a free call.

  2. 2

    Planning

    Fixed scope, milestone plan and timeline in writing.

  3. 3

    UI/UX design

    Wireframes and a clean, modern design system.

  4. 4

    Backend setup

    Database schema, auth and core services.

  5. 5

    API development

    Typed, documented endpoints and integrations.

  6. 6

    Frontend

    Responsive, accessible UI wired to the API.

  7. 7

    Testing

    QA across devices plus performance & security checks.

  8. 8

    Deployment

    CI/CD, monitoring and a smooth production launch.

  9. 9

    Support

    Ongoing maintenance, updates and new features.

Speed & SEO

Performance & SEO

Performance

  • Server-side & static rendering for instant first paint
  • Image optimisation and lazy loading
  • Code-splitting and route-level prefetching
  • Edge/CDN caching with smart revalidation
  • Green Core Web Vitals (LCP, CLS, INP)
  • Database indexing and query tuning

SEO

  • Per-page metadata, canonical URLs and Open Graph
  • Structured data (JSON-LD) for rich results
  • Programmatic sitemap & robots
  • Semantic, accessible HTML
  • Clean, descriptive slug URLs

Built secure

Security

🔒Session-based auth with role permissions
🔒Server-side authorization on every protected route
🔒Input validation (Zod) on client and server
🔒Secure payments via hosted Checkout (no card data stored)
🔒Rate limiting and abuse protection
🔒Encrypted secrets and least-privilege access

Outcome

Results & impact

−40%

Admin time saved

4 wk

To first paying customer

99.9%

Uptime

10k+

Records / tenant

NexaCRM launched in 7 weeks, signed its first paying customer within a month, and replaced the client's spreadsheet workflow entirely — cutting admin time by ~40% while staying fast at thousands of records per tenant.