Under the hood
For your IT team
Installation is included in your R5 000 setup fee. If your own developer wants to see how it fits together, it’s all here.
Unzip the package and install dependencies.
npm installMake a free Supabase project and run every file in supabase/migrations in order, in the SQL editor.
001_schema.sql → 012_branches.sqlCopy the example env file and add your Supabase URL and key.
cp .env.example .env.localStart locally, then import the repo on Vercel with the same variables.
npm run dev| NEXT_PUBLIC_SUPABASE_URL | Your Supabase project URL | Required |
| NEXT_PUBLIC_SUPABASE_ANON_KEY | Supabase publishable (anon) key | Required |
| NEXT_PUBLIC_SITE_URL | Public URL, used in emails and payment links | Required |
| SITE_THEME | Default theme: machonisa, imali, kwanda, sterling or loan-flow | Optional |
| PAYSTACK_SECRET_KEY / PAYSTACK_WEBHOOK_SECRET | Enable online card repayments | Optional |
| SUPABASE_SERVICE_ROLE_KEY | Server-side webhook processing (Paystack) | Optional |
| SUPPORT_EMAIL / SUPPORT_PHONE | Shown in the footer and privacy notice | Optional |
| LENDER_REGISTRATION_NUMBER / COMPANY_REGISTRATION_NUMBER | NCR and company numbers in the footer | Optional |
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';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; }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.
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 dataMigration 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();