Under the hood

Modern, boring, reliable

Next.js 15
App Router, server actions
React 19
Server components
Supabase
Postgres, Auth, Storage
Tailwind CSS
Token-based theming
Paystack
Checkout + webhooks
TypeScript
End to end

For your IT team

Technical setup, fully documented

Installation is included in your R5 000 setup fee. If your own developer wants to see how it fits together, it’s all here.

  1. 1

    Install

    Unzip the package and install dependencies.

    npm install
  2. 2

    Create the database

    Make a free Supabase project and run every file in supabase/migrations in order, in the SQL editor.

    001_schema.sql → 012_branches.sql
  3. 3

    Configure

    Copy the example env file and add your Supabase URL and key.

    cp .env.example .env.local
  4. 4

    Run & deploy

    Start locally, then import the repo on Vercel with the same variables.

    npm run dev
Environment variables +
NEXT_PUBLIC_SUPABASE_URLYour Supabase project URLRequired
NEXT_PUBLIC_SUPABASE_ANON_KEYSupabase publishable (anon) keyRequired
NEXT_PUBLIC_SITE_URLPublic URL, used in emails and payment linksRequired
SITE_THEMEDefault theme: machonisa, imali, kwanda, sterling or loan-flowOptional
PAYSTACK_SECRET_KEY / PAYSTACK_WEBHOOK_SECRETEnable online card repaymentsOptional
SUPABASE_SERVICE_ROLE_KEYServer-side webhook processing (Paystack)Optional
SUPPORT_EMAIL / SUPPORT_PHONEShown in the footer and privacy noticeOptional
LENDER_REGISTRATION_NUMBER / COMPANY_REGISTRATION_NUMBERNCR and company numbers in the footerOptional
First admin account +

Add your email to the admin_emails setting before registering. That account opens the admin console. Later you can manage admins in Settings → Admins.

update settings set value = '["you@company.co.za"]' where key = 'admin_emails';
Switching and adding themes +

Set SITE_THEME for the deployment default. Visitors can switch with /theme?set=loan-flow. To add a brand, add an entry to THEMES and a matching CSS block of color tokens.

// src/lib/site-theme.ts
'my-brand': { id: 'my-brand', name: 'My Brand', mark: '/my-logo.svg', ... }

/* src/app/my-brand.css */
[data-theme='my-brand'] { --site-navy: 17 24 39; --site-brand: 234 88 12; }
Online repayments (Paystack) +

Add your Paystack secret and webhook secret, plus the Supabase service role key. Point the Paystack webhook to /api/paystack/webhook. Without keys, payments run in simulated mode.

Project structure +
src/app/            routes: website, (customer), (admin), product, demo
src/app/actions/    server actions (auth, customer, admin, demo)
src/components/     UI kit, shell, calculator, theme + showcase parts
src/lib/            quote maths, SA ID checks, Paystack, session, themes
supabase/migrations SQL schema, business functions, RLS, demo data
Demo data +

Migration 006 creates the demo client, demo admin and six sample borrowers. Migration 007 keeps the demo admin inside demo data and resets it nightly. Reset any time with:

select public.reset_demo();
Technical documentation · Lending Office