Logo Lanfrica

Abdool1500/cyberdefend-africa-academy

Domaine:

education

Type de record:

software
Créateur:
Abd
Hôte:
# CyberDefend Africa Academy A production-ready cybersecurity training platform: a public marketing site, a 25-item student dashboard, and a 16-item admin dashboard, built on Next.js and Supabase. ## Tech Stack - **Framework:** Next.js 16 (App Router, Turbopack), TypeScript, Tailwind CSS v4 - **UI:** shadcn/ui (Radix primitives), Lucide icons, Framer Motion - **Backend:** Supabase (Postgres, Auth, Storage, Realtime) with Row Level Security as the primary authorization model - **Forms:** React Hook Form + Zod - **Documents:** `@react-pdf/renderer` (admission letters, ID cards, receipts), `qrcode` + `bwip-js` (QR/barcodes) - **Charts & calendar:** Recharts, `react-big-calendar` - **Deployment:** Vercel ## Prerequisites - Node.js 20+ - npm - A Supabase account (free tier is enough to run this) ## 1. Install dependencies ```bash npm install ``` ## 2. Create a Supabase project 1. Create a new project at supabase.com. 2. In **Project Settings → API**, copy the **Project URL**, **anon public key**, and **service_role key** (keep the service role key secret — it's server-only). 3. In **Authentication → Providers**, confirm Email is enabled. 4. In **Authentication → Multi-Factor**, enable **TOTP** (required for the app's Two-Factor Authentication flow). 5. In **Authentication → URL Configuration**, set the Site URL and add `localhost` as a redirect URL for local development (add your production URL here too once deployed — see Deployment). ## 3. Apply the database schema In the Supabase dashboard, open **SQL Editor** and run each file in `supabase/migrations/` **in order** (0001 through 0012), then run `supabase/seed/seed.sql`. This creates every table, RLS policy, trigger, view, and storage bucket (`avatars`, `documents`) the app depends on, and seeds catalog data (courses, resources, articles, webinars, achievements, site settings). It does **not** seed user-linked data (enrollments, certificates, invoices, etc.) — those only make sens …