# Dira.ke — UZIA Academy MVP

Build the MVP MSME learning and business-capability platform: a free 12-category growth assessment, a course catalog with lesson progress, and a personal dashboard — mobile-first, high-trust, distinctly African.

## Design system

- Palette: deep indigo base, emerald secondary, warm gold/terracotta accent reserved for CTAs. Light and dark values, all semantic tokens (no hardcoded colors in components).
- Type: clean geometric sans (Space Grotesk headings / DM Sans body), generous whitespace.
- Subtle abstract geometric motif as section dividers and low-opacity background texture. No blue gradients, no clutter.

## Public pages

- **Home** (`/`) — hero: "Assess your business. Close the gaps. Grow with confidence." with a prominent "Take the Free Assessment" CTA; how it works (Assess → Learn → Grow); featured course categories; trust stats; final CTA.
- **Assessment intro** (`/assessment`) — what the MSME Growth Assessment covers, ~10–15 min, what you get (score, maturity level, personalized course plan), start CTA (routes to sign-in if not logged in).
- **Courses** (`/courses`) — grid, filter by category, cards show title, category, level, free/premium tag.
- **Course detail** (`/courses/$id`) — public description and lesson titles; enroll requires sign-in.
- **Auth** (`/auth`) — email + password sign-up/sign-in.

## Authenticated pages (under a protected layout)

- **Dashboard** — big maturity score + level badge, bar chart of the 12 category scores, top 3 recommended courses from lowest-scoring categories, retake link. Empty state prompting the assessment when none exists.
- **Take assessment** (`/app/assessment/take`) — one category per screen, progress bar, 1–5 Likert questions, resumable, submits and computes results.
- **Results** (`/app/assessment/results`) — category breakdown, maturity level explanation, recommended courses.
- **Course detail (enrolled)** — lesson list with mark-complete checkboxes and progress bar.
- **Profile** — full name, business name, sector, business size, county.
- Empty placeholder routes for **Mentors** and **Opportunities** so later phases layer in cleanly.

## Data model (Lovable Cloud)

`profiles`, `assessment_categories`, `assessment_questions`, `assessment_responses`, `assessment_results`, `courses`, `enrollments`, `course_progress` — exactly as specified. RLS: user-owned rows scoped to `auth.uid()`; categories, questions and courses readable publicly. Profile row auto-created on signup via trigger.

Seeded in the migration: 12 categories, 36 questions (3 each), and 9 sample courses across Entrepreneurship, Financial Management, Digital Transformation, Marketing, Operations and Compliance, each with 2–3 short placeholder lessons.

## Scoring

Each category averages its 3 answers to 0–100; overall is the mean of the 12. Levels: 0–40 Foundational, 41–60 Developing, 61–80 Growing, 81–100 Established. Recommendations = courses matching the 3 lowest-scoring categories.

## Technical notes

- Stack stays React + TanStack Start + Tailwind + Lovable Cloud (Supabase) — the requested Laravel backend isn't available on this platform; Cloud provides the same auth/database/storage/serverless capability.
- Data access through typed server functions; authenticated reads/writes use the auth middleware, public catalog reads use a publishable-key client.
- Scoring computed server-side on submit and persisted to `assessment_results`.
- Charts via Recharts (already available). Per-route SEO metadata on every public page.

## Out of scope (later)

Mentor marketplace, business support directory, M-Pesa/payments, live classes, AI advisor, admin portal, certificates. The `is_premium` flag and placeholder routes keep these seams open.
