# We Are Daraja Africa Network
A React application for anonymous emotional expression and youth mental health support, built with Supabase as the backend.
## Project Overview
Daraja Africa Network is a mental health initiative that bridges the youth mental health gap through empathy-driven education, peer connection, and professional guidance. This application provides:
- **The Pit** — Anonymous cathartic sharing with a moderated community feed
- **The Void** — Private, unsaved emotional releases with zero audience
- **Get Help** — Curated Kenyan mental health resources and support request intake
- **Programs & Resources** — Static informational pages for outreach
All user-generated content flows through a server-side moderation pipeline before reaching the database.
## Architecture Overview
```
Client (Vite + React)
│
├── Direct SELECT queries (public data)
│ └── Supabase RLS-enforced reads
│
└── Writes via Edge Function
└── moderate-entry (Supabase Edge Function)
├── Rate limit check (moderation_logs)
├── Duplicate check (pit_entries)
├── Content pattern check (security rules)
├── moderation_logs INSERT
└── Database INSERT (service_role)
```
**Key principle:** All database writes bypass the client and pass through a single server-side moderation function.
## Folder Structure
```
├── supabase/
│ ├── functions/
│ │ └── moderate-entry/
│ │ └── index.ts # Unified moderation Edge Function
│ └── migrations/
│ └── 20240101000000_production_hardening.sql
├── src/
│ ├── api/
│ │ └── moderation.js # Client-side API wrapper
│ ├── components/
│ │ ├── pit/
│ │ │ ├── PitWheel.jsx
│ │ │ ├── WitnessWall.jsx
│ │ │ ├── EntryForm.jsx
│ │ │ ├── ReleaseFlow.jsx
│ │ │ ├── ConductModal.jsx
│ │ │ └── GhostBackground.jsx
│ │ ├── layout/
│ │ │ ├── MainLayout.jsx
│ │ │ ├── Navbar.jsx
│ │ │ └── Footer.jsx
│ │ ├── ErrorBoundary.jsx
│ │ └── LoadingSkeleton.jsx
│ …