System Architecture

ThriftBasket — Complete Technical Blueprint v2.2 (Trust & Protection + Item Requests)

7

Architecture Layers

20

Feature Modules

33

Data Entities

16

Journey Steps

Platform Overview

ThriftBasket is a savings-based group buying platform built for Nigerian families. Customers contribute daily or weekly towards essential household baskets. The platform handles the full lifecycle: discovery → savings plan → payment → AI-powered recommendations → fulfillment → delivery tracking → review → gamification rewards → community engagement.

React + Tailwind

Frontend

Base44 BaaS

Backend

LLM / AI

Intelligence

WhatsApp + Email

Channels

jsPDF + html2canvas

Export

React Leaflet

Maps

Recharts

Analytics

Framer Motion

Animations

Architecture Layers

Frontend Layer (React + Tailwind CSS)

Landing Page (Home)
Customer Dashboard
Admin Panel Suite
Community Feed
Referral Hub
AI Basket Creator
Articles / Blog
FAQ Page
Corporate Portal
Driver Portal
Gift Basket Flow
Contribution Pool UI
Savings Calculator
Budget Planner Tool
Savings Plan Recommender
Delivery Survey Form
Auto-Triggered Delivery Survey
Live Delivery Map
Promo Banners
Trust & Protection Hub
ThriftBasket Wallet
KYC Verification Flow
Refund Manager
Substitution Approvals
Item Request Form
My Item Requests
Admin Item Requests

AI & Intelligence Layer (LLM-Powered)

Basket Recommendations (LLM)
AI Delivery Scheduler
Inventory Substitution Engine
Customer Support Chatbot (AIChatbot)
Admin Chatbot (AdminChatbot)
Personalised Savings Plan Recommender
AI Basket Creator (Custom NL input)
Payment Pattern Analysis
Route Optimisation AI
Inventory Forecasting AI
Community Post Moderation
Image Generation (baskets)

Trust & Protection Layer (Policy Engine)

7-Day Full Refund Guarantee
Wallet Balance & Ledger
KYC Identity Verification (NIN/License)
5% Daily Interest Penalty (Overdue)
Basket Substitution Approvals
Refund Workflow (wallet/bank/swap)
Fraud Risk Assessment
Admin Trust Center (refunds/KYC/subs)
Admin Overdue Tracker
Flexible "Other" Payment Duration
Auto-Triggered Post-Delivery Survey
Item Request & Sourcing System

Backend Services (Base44 BaaS)

Authentication & Auth Guards
NoSQL Entity Database
Real-time Subscriptions (subscribe)
File Storage / CDN (UploadFile)
Private File Storage (signed URLs)
Background Tasks
Role-based Access Control
Analytics Event Tracking
Email Delivery (SendEmail)
Audio Transcription (Whisper)

Data Entities (33 Models)

Customer
ContributionPlan
Payment
Basket
Referral
CommunityPost
PostLike
PostReport
Notification
CustomerNotification
UserBadge
PointTransaction
UserPoints
AffiliateAccount
AffiliatePayout
CommissionTransaction
GiftBasket
ContributionPool
CorporateOrder
Review
FavoriteBasket
DeliveryRoute
DeliveryIssue
DriverLocation
DeliveryChat
ChatMessage
User (built-in)
Wallet
RefundRequest
BasketSubstitution
KYCVerification

Integrations & External Channels

Email Notifications (SendEmail)
WhatsApp Business (wa.me links)
LLM / AI (InvokeLLM)
Image Generation (GenerateImage)
Audio Transcription (TranscribeAudio)
File Upload CDN
Private File Storage
Instagram / LinkedIn social links
React Leaflet Maps (delivery tracking)
jsPDF (PDF export)
html2canvas (screenshots)
canvas-confetti (celebrations)

Admin & Operations Layer

Admin Dashboard (stats, KPIs)
Plans Management (PlansTable)
Customer CRM (CustomersTable)
Payments Reconciliation
Inventory Management + Forecasting
Low Stock Alerts
Delivery Scheduler & Route Optimizer
Driver Portal
Community Moderation Panel
Referral & Affiliate Management
Corporate Orders
Notifications Broadcast
Role Management (admin/user)
Admin Analytics (CLV, cohort)

Feature Modules

Customer Management (CRM)

Full CRM with profiles, WhatsApp verification, status, delivery address, notification preferences, notes, and activity history.

Basket Catalogue

Dynamic basket types with inventory levels, low-stock thresholds, SKU tracking, image upload, categories (food, household, baby, health, custom), and estimated delivery.

Contribution & Payments

Multi-plan savings with daily/weekly/flexible schedules, bank transfer tracking, payment confirmation workflow, adjusted pricing, and contribution history.

Fulfillment & Delivery

Driver assignment, delivery routes, AI route optimisation, real-time driver location tracking, ETA estimates, delivery chat, issue reporting, and status updates.

Gift Baskets

Full gifting flow: sender/recipient details, occasion selection, personalised messages, email notifications to recipients, and payment status tracking.

Referral & Affiliate System

Unique referral codes, Bronze/Silver/Gold/Platinum affiliate tiers, commission tracking, payout management, referral leaderboard, and reward automation.

Contribution Pools (Ajo/Esusu)

Group savings pools with invite codes, member management, target sharing, total paid tracking, and collaborative basket funding.

Gamification & Rewards

Points system with 5 tiers (Bronze→Diamond), 19 badge types, streak tracking, achievement showcase, leaderboard, and redemption engine.

Community & Social

Community feed with tips, questions, milestones, and basket shares. Post likes, reports, moderation queue, featured posts, and admin controls.

Admin Analytics

Customer Lifetime Value, cohort analysis, customer journey funnel, revenue trends, basket popularity, delivery performance, and affiliate analytics.

Notifications System

Multi-channel notifications (email, WhatsApp), segmented campaigns, contribution reminders, badge alerts, referral updates, and user notification preferences.

Financial Planning Tools

Savings calculator with goal projections, household budget planner, AI-powered personalised savings plan recommender based on income/expense analysis.

Reviews & Delivery Survey

Post-delivery star rating, aspect-based feedback (timeliness, packaging, accuracy, driver), written comments, and admin visibility into satisfaction scores.

Inventory & Forecasting

Real-time stock levels, low-stock alerts on admin dashboard, AI-powered demand forecasting, restock recommendations, and SKU management.

Basket Customisation

Users can modify default basket items, adjust quantities, AI substitutions for unavailable items, and share personalised basket plans via unique links.

Corporate Orders

B2B gifting for companies: multi-recipient basket orders, branded digital cards, custom messages, bulk invoicing, and delivery coordination.

Articles & Content Hub

Financial literacy articles, grocery hacks, Nigerian budgeting tips, savings strategies, filterable by category, with full-article reader view.

Role-based Access Control

Admin roles with granular module permissions, AdminAuthGuard on all protected routes, RoleGuard per sidebar module, and audit trails.

Trust & Protection Layer

7-day full refund guarantee, ThriftBasket wallet with credit ledger, KYC identity verification (NIN/license/passport), basket substitution approvals, 5% daily interest penalty for overdue payments, and admin Trust Center for processing.

Item Request & Sourcing System

Customers request out-of-stock or unlisted items with category, quantity, estimated price, and reference image. Admin tracks status from submitted → reviewing → sourcing → available → fulfilled, with quoted pricing and vendor sourcing notes.

Data Model — 33 Entities

Customer

full_name, whatsapp_number, email, delivery_address, status, total_contributions, plans_count, notification_preferences

ContributionPlan

basket_type, schedule, delivery_location, status, delivery_status, assigned_driver, custom_items, adjusted_price, paused_at, pause_reason

Payment

amount, payment_date, status, method, customer_phone, contribution_plan_id, reference, notes

Basket

name, price, description, items[], category, inventory_count, low_stock_threshold, sku, image_url, estimated_delivery, is_active

Referral

referrer_phone, referred_phone, referral_code, status, reward_amount, commission_rate, total_commission_earned

AffiliateAccount

affiliate_code, tier, commission_rate, total_earnings, available_balance, bank_name, account_number

CommissionTransaction

affiliate_phone, payment_amount, commission_rate, commission_amount, type, status

AffiliatePayout

affiliate_phone, amount, bank_name, account_number, status, reference, processed_at

GiftBasket

sender_name, sender_phone, recipient_name, recipient_phone, basket_type, gift_message, occasion, status, notification_sent

ContributionPool

pool_name, basket_type, target_amount, creator_phone, members (JSON), invite_code, total_paid, status

CorporateOrder

company_name, contact_phone, basket_type, recipients_count, total_amount, custom_message, recipients_data (JSON), status

UserBadge

customer_phone, badge_type (19 types), badge_name, earned_at

UserPoints

customer_phone, total_points, available_points, level (bronze→diamond), contribution_points, referral_points, community_points

PointTransaction

customer_phone, points, action_type, description, reference_id

CommunityPost

customer_phone, content, post_type, likes_count, moderation_status, is_featured, is_flagged, reports_count

PostLike

post_id, customer_phone

PostReport

post_id, reporter_phone, reason, details, status

Review

plan_id, customer_phone, customer_name, rating, comment, basket_type

FavoriteBasket

customer_phone, basket_id, basket_name

DeliveryRoute

route_name, neighborhood, assigned_driver, delivery_date, plan_ids (JSON), stop_count, status, ai_summary

DriverLocation

plan_id, driver_name, latitude, longitude, area_label, eta_minutes, is_active

DeliveryChat

plan_id, sender_role (customer/driver), sender_name, message, is_read

DeliveryIssue

plan_id, driver_name, customer_name, issue_type, description, photo_url, status, resolved_note

Notification

title, message, recipient_type, channel, status, scheduled_at, sent_at

CustomerNotification

customer_phone, title, message, type, is_read, link

ChatMessage

customer_phone, content, sender (customer/admin), is_read, timestamp

Wallet

customer_phone, balance, total_credited, total_spent, total_refunded

RefundRequest

customer_phone, plan_id, amount_requested, amount_confirmed, refund_type, destination, admin_fee_percent, status, processed_at

BasketSubstitution

plan_id, original_item, replacement_item, reason, user_response, chosen_alternative, credit_amount, status, expires_at

KYCVerification

customer_phone, id_type, id_number, id_document_url, selfie_url, address_proof_url, status, risk_level, verified_at

ItemRequest

customer_phone, customer_name, item_name, item_description, category, quantity, estimated_price, image_url, reason, preferred_delivery, status, admin_note, quoted_price, vendor_name

End-to-End Customer Journey

1

Customer visits landing page, browses basket catalogue, reads articles/FAQ

2

Customer selects basket & fills ContributionForm (schedule, delivery, contact)

3

ContributionPlan created (status: pending), referral code tracked if applicable

4

Admin reviews plan in Admin Panel, activates it (status: active)

5

Customer makes bank transfer, submits payment proof via Dashboard

6

Admin confirms payment — points/badges awarded, referral commission triggered

7

Admin assigns delivery route, driver portal activated, ETA set

8

Customer receives real-time delivery updates, live map, chat with driver

9

Basket delivered — auto-triggered delivery survey shown, review requested

9b

Customer may request out-of-stock/unlisted items via Item Request Form → admin sources → status updates

10

Plan completed — gamification rewards, reorder prompt, referral commissions paid

11

Customer engages community, earns points, climbs leaderboard, shares plans

12

AI analyses patterns → personalised recommendations, savings advice generated

13

Overdue payments tracked → 5% daily interest penalty applied, admin alerted via Overdue Tracker

14

Customer may request refund (7-day full / after-7-day partial) or swap basket via Trust Center

15

Admin processes refund/KYC/substitution in Trust Center → wallet credited, identity verified

Customer action
Admin action
Driver action
System/AI action
Trust & Protection

Admin Panel Suite

Dashboard

KPIs, stats, recent plans, popular baskets, low-stock alerts

Plans Management

View, filter, activate, assign, update all contribution plans

Customer CRM

Full customer profiles, history, notes, status management

Payments

Confirm payments, reconcile transfers, view payment history

Inventory

Manage baskets, adjust stock, add/edit/delete basket types

Inventory Forecaster

AI-powered demand forecasting and restock recommendations

Delivery Scheduler

Create delivery routes, assign drivers, set time windows

Route Optimizer

AI-optimised multi-stop delivery routes with map view

Community Moderation

Review flagged posts, approve/reject, feature content

Referrals & Affiliates

Track referrals, manage affiliate tiers, process payouts

Corporate Orders

B2B basket orders, bulk invoicing, recipient management

Notifications

Broadcast campaigns, schedule messages, multi-channel

Analytics

CLV analysis, cohort reports, funnel tracking, revenue charts

Role Management

Assign admin roles, manage permissions per module

Admin Chat

Real-time support inbox, respond to customer messages

Admin Trust Center

Process refunds, approve KYC, resolve basket substitutions

Admin Overdue Tracker

Monitor members under 5% daily penalty, calculate dues, contact

Admin Item Requests

Review customer item requests, source from vendors, quote prices, update status

ThriftBasket System Architecture — Confidential

base44
Edit with Base44