# fri25/baobab-dev architecture

> Architecture diagram of the GitHub repository fri25/baobab-dev, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/fri25/baobab-dev
- Repository: https://github.com/fri25/baobab-dev

## Overview

Baobab Dev is a community platform for African developers, organized around helping, building, recognition, and earning. Developers sign in, contribute and collaborate, then access paid work and professional opportunities. The graph preserves documented product branches even where their route implementations were not sampled. Sampled source confirms several Griot, auth, cron, and Supabase connections; other feature relationships are documented in the README. Some capabilities and integrations are represented at route-directory level because their implementation files were not read.

Main entry points: [`src/lib/griot.ts`](https://github.com/fri25/baobab-dev/blob/main/src/lib/griot.ts) (Griot engine), [`src/lib/radar.ts`](https://github.com/fri25/baobab-dev/blob/main/src/lib/radar.ts) (Opportunity radar), [`src/lib/supabase/admin.ts`](https://github.com/fri25/baobab-dev/blob/main/src/lib/supabase/admin.ts) (Supabase data), [`src/app/api/cron/route.ts`](https://github.com/fri25/baobab-dev/blob/main/src/app/api/cron/route.ts) (Scheduled work)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_community["Community &amp; identity"]
  node_community_hub["Profiles &amp; feed<br/>[page.tsx]"]
  node_questions["Questions &amp; answers"]
  node_discussions["Discussions"]
  node_leaderboards["Leaderboards<br/>[page.tsx]"]
  node_griot_api["Griot endpoints<br/>[route.ts]"]
  node_griot_engine["Griot engine<br/>[griot.ts]"]
  node_whatsapp_webhook["WhatsApp webhook<br/>[route.ts]"]
end

subgraph group_build["Building together"]
  node_showroom["Project showroom"]
  node_squads["Squads"]
  node_debugging["Pair debugging"]
  node_challenges["Challenges"]
  node_african_stack["African tech stack"]
  node_abandoned_projects["Project recovery<br/>[abandoned.ts]"]
end

subgraph group_income["Work &amp; income"]
  node_micro_bourse["Micro-bourse"]
  node_clones["Expert AI clones<br/>[clone.ts]"]
  node_radar["Opportunity radar<br/>[radar.ts]"]
  node_forensic["Code Forensic<br/>[forensic.ts]"]
  node_centrale["Buying cooperative<br/>[centrale.ts]"]
  node_recruiters["Recruiters"]
  node_wallet["Wallet<br/>[page.tsx]"]
end

subgraph group_platform["Platform services"]
  node_auth["Authentication<br/>[auth.ts]"]
  node_supabase[("Supabase data<br/>[admin.ts]")]
  node_cron["Scheduled work<br/>[route.ts]"]
end

node_developer(("Developer"))
node_organizations(("Organizations"))
node_github(("GitHub"))
node_whatsapp_service["WhatsApp"]
node_ai_services["AI services"]

node_developer -->|"builds profile"| node_community_hub
node_developer -->|"asks and answers"| node_questions
node_developer -->|"starts discussions"| node_discussions
node_developer -->|"asks Griot"| node_griot_api
node_griot_api -->|"calls"| node_griot_engine
node_griot_engine -->|"searches and stores"| node_supabase
node_griot_engine -->|"generates answer"| node_ai_services
node_griot_engine -->|"cites answers"| node_questions
node_whatsapp_service -->|"sends messages"| node_whatsapp_webhook
node_whatsapp_webhook -->|"calls"| node_griot_engine
node_whatsapp_webhook -->|"sends reply"| node_whatsapp_service
node_developer -->|"publishes projects"| node_showroom
node_developer -->|"forms teams"| node_squads
node_developer -->|"debugs together"| node_debugging
node_developer -->|"submits solutions"| node_challenges
node_developer -->|"reviews tools"| node_african_stack
node_showroom -->|"detects stale projects"| node_abandoned_projects
node_abandoned_projects -->|"reads project data"| node_supabase
node_organizations -->|"posts opportunities"| node_radar
node_radar -->|"extracts requirements"| node_ai_services
node_radar -->|"sends opted-in alerts"| node_whatsapp_service
node_developer -->|"funds and solves tickets"| node_micro_bourse
node_developer -->|"asks expert clone"| node_clones
node_developer -->|"requests or audits"| node_forensic
node_developer -->|"joins purchasing"| node_centrale
node_organizations -->|"searches talent"| node_recruiters
node_developer -->|"checks balance"| node_wallet
node_github -->|"provides profile"| node_auth
node_auth -->|"loads session"| node_supabase
node_cron -->|"checks stale projects"| node_abandoned_projects
node_cron -->|"collects sources"| node_radar
node_cron -->|"runs scheduled tasks"| node_supabase

click node_community_hub "https://github.com/fri25/baobab-dev/blob/main/src/app/u/%5Busername%5D/page.tsx"
click node_questions "https://github.com/fri25/baobab-dev/tree/main/src/app/questions"
click node_discussions "https://github.com/fri25/baobab-dev/tree/main/src/app/discussions"
click node_leaderboards "https://github.com/fri25/baobab-dev/blob/main/src/app/classements/page.tsx"
click node_griot_api "https://github.com/fri25/baobab-dev/blob/main/src/app/api/griot/route.ts"
click node_griot_engine "https://github.com/fri25/baobab-dev/blob/main/src/lib/griot.ts"
click node_whatsapp_webhook "https://github.com/fri25/baobab-dev/blob/main/src/app/api/whatsapp/route.ts"
click node_showroom "https://github.com/fri25/baobab-dev/tree/main/src/app/showroom"
click node_squads "https://github.com/fri25/baobab-dev/tree/main/src/app/squads"
click node_debugging "https://github.com/fri25/baobab-dev/tree/main/src/app/debug"
click node_challenges "https://github.com/fri25/baobab-dev/tree/main/src/app/defis"
click node_african_stack "https://github.com/fri25/baobab-dev/tree/main/src/app/stack"
click node_abandoned_projects "https://github.com/fri25/baobab-dev/blob/main/src/lib/abandoned.ts"
click node_micro_bourse "https://github.com/fri25/baobab-dev/tree/main/src/app/bourse"
click node_clones "https://github.com/fri25/baobab-dev/blob/main/src/lib/clone.ts"
click node_radar "https://github.com/fri25/baobab-dev/blob/main/src/lib/radar.ts"
click node_forensic "https://github.com/fri25/baobab-dev/blob/main/src/lib/forensic.ts"
click node_centrale "https://github.com/fri25/baobab-dev/blob/main/src/lib/centrale.ts"
click node_recruiters "https://github.com/fri25/baobab-dev/tree/main/src/app/recruteurs"
click node_wallet "https://github.com/fri25/baobab-dev/blob/main/src/app/portefeuille/page.tsx"
click node_auth "https://github.com/fri25/baobab-dev/blob/main/src/lib/auth.ts"
click node_supabase "https://github.com/fri25/baobab-dev/blob/main/src/lib/supabase/admin.ts"
click node_cron "https://github.com/fri25/baobab-dev/blob/main/src/app/api/cron/route.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_community_hub,node_questions,node_discussions,node_leaderboards,node_griot_api,node_griot_engine,node_whatsapp_webhook toneBlue
class node_showroom,node_squads,node_debugging,node_challenges,node_african_stack,node_abandoned_projects toneAmber
class node_micro_bourse,node_clones,node_radar,node_forensic,node_centrale,node_recruiters,node_wallet toneMint
class node_auth,node_supabase,node_cron toneRose
class node_developer,node_organizations,node_github,node_whatsapp_service,node_ai_services toneIndigo
```

## Components

### Community & identity

- [Profiles & feed](https://github.com/fri25/baobab-dev/blob/main/src/app/u/%5Busername%5D/page.tsx): `src/app/u/[username]/page.tsx`
- [Questions & answers](https://github.com/fri25/baobab-dev/tree/main/src/app/questions): `src/app/questions`
- [Discussions](https://github.com/fri25/baobab-dev/tree/main/src/app/discussions): `src/app/discussions`
- [Leaderboards](https://github.com/fri25/baobab-dev/blob/main/src/app/classements/page.tsx): `src/app/classements/page.tsx`
- [Griot endpoints](https://github.com/fri25/baobab-dev/blob/main/src/app/api/griot/route.ts): `src/app/api/griot/route.ts`
- [Griot engine](https://github.com/fri25/baobab-dev/blob/main/src/lib/griot.ts): `src/lib/griot.ts`
- [WhatsApp webhook](https://github.com/fri25/baobab-dev/blob/main/src/app/api/whatsapp/route.ts): `src/app/api/whatsapp/route.ts`

### Building together

- [Project showroom](https://github.com/fri25/baobab-dev/tree/main/src/app/showroom): `src/app/showroom`
- [Squads](https://github.com/fri25/baobab-dev/tree/main/src/app/squads): `src/app/squads`
- [Pair debugging](https://github.com/fri25/baobab-dev/tree/main/src/app/debug): `src/app/debug`
- [Challenges](https://github.com/fri25/baobab-dev/tree/main/src/app/defis): `src/app/defis`
- [African tech stack](https://github.com/fri25/baobab-dev/tree/main/src/app/stack): `src/app/stack`
- [Project recovery](https://github.com/fri25/baobab-dev/blob/main/src/lib/abandoned.ts): `src/lib/abandoned.ts`

### Work & income

- [Micro-bourse](https://github.com/fri25/baobab-dev/tree/main/src/app/bourse): `src/app/bourse`
- [Expert AI clones](https://github.com/fri25/baobab-dev/blob/main/src/lib/clone.ts): `src/lib/clone.ts`
- [Opportunity radar](https://github.com/fri25/baobab-dev/blob/main/src/lib/radar.ts): `src/lib/radar.ts`
- [Code Forensic](https://github.com/fri25/baobab-dev/blob/main/src/lib/forensic.ts): `src/lib/forensic.ts`
- [Buying cooperative](https://github.com/fri25/baobab-dev/blob/main/src/lib/centrale.ts): `src/lib/centrale.ts`
- [Recruiters](https://github.com/fri25/baobab-dev/tree/main/src/app/recruteurs): `src/app/recruteurs`
- [Wallet](https://github.com/fri25/baobab-dev/blob/main/src/app/portefeuille/page.tsx): `src/app/portefeuille/page.tsx`

### Platform services

- [Authentication](https://github.com/fri25/baobab-dev/blob/main/src/lib/auth.ts): `src/lib/auth.ts`
- [Supabase data](https://github.com/fri25/baobab-dev/blob/main/src/lib/supabase/admin.ts): `src/lib/supabase/admin.ts`
- [Scheduled work](https://github.com/fri25/baobab-dev/blob/main/src/app/api/cron/route.ts): `src/app/api/cron/route.ts`

### Other components

- **Developer**
- **Organizations**
- **GitHub**
- **WhatsApp**
- **AI services**

## Connections

- Developer → Profiles & feed: builds profile
- Developer → Questions & answers: asks and answers
- Developer → Discussions: starts discussions
- Developer → Griot endpoints: asks Griot
- Griot endpoints → Griot engine: calls (evidence: `src/app/api/griot/route.ts`)
- Griot engine → Supabase data: searches and stores (evidence: `src/lib/griot.ts`)
- Griot engine → AI services: generates answer (evidence: `src/lib/griot.ts`)
- Griot engine → Questions & answers: cites answers
- WhatsApp → WhatsApp webhook: sends messages
- WhatsApp webhook → Griot engine: calls (evidence: `src/app/api/whatsapp/route.ts`)
- WhatsApp webhook → WhatsApp: sends reply (evidence: `src/app/api/whatsapp/route.ts`)
- Developer → Project showroom: publishes projects
- Developer → Squads: forms teams
- Developer → Pair debugging: debugs together
- Developer → Challenges: submits solutions
- Developer → African tech stack: reviews tools
- Project showroom → Project recovery: detects stale projects
- Project recovery → Supabase data: reads project data (evidence: `src/lib/abandoned.ts`)
- Organizations → Opportunity radar: posts opportunities
- Opportunity radar → AI services: extracts requirements
- Opportunity radar → WhatsApp: sends opted-in alerts
- Developer → Micro-bourse: funds and solves tickets
- Developer → Expert AI clones: asks expert clone
- Developer → Code Forensic: requests or audits
- Developer → Buying cooperative: joins purchasing
- Organizations → Recruiters: searches talent
- Developer → Wallet: checks balance
- GitHub → Authentication: provides profile
- Authentication → Supabase data: loads session (evidence: `src/lib/auth.ts`)
- Scheduled work → Project recovery: checks stale projects (evidence: `src/app/api/cron/route.ts`)
- Scheduled work → Opportunity radar: collects sources (evidence: `src/app/api/cron/route.ts`)
- Scheduled work → Supabase data: runs scheduled tasks (evidence: `src/app/api/cron/route.ts`)
