# Rwanda Youth Employment Platform
A full-stack web application for managing Rwanda's youth employment program, featuring beneficiary registration, psychometric assessments (SkillCraft), e-learning (Ingazi), business development tracking, and an AI-powered chatbot.
---
## Project Structure
```
rwanda-emp/
├── api/ # FastAPI backend (Python)
│ ├── main.py
│ ├── config.py
│ ├── database.py
│ ├── routes/
│ ├── models/
│ ├── services/
│ ├── middleware/
│ ├── requirements.txt
│ └── start_api.sh
└── data/ # Database setup and seed scripts
├── setup.sh
├── database_schema.sql
├── load_data_to_db.py
├── add_survey_tables.sql
├── create_test_accounts.sql
└── requirements.txt
```
The frontend lives in a separate repository: **Rwandaempapp** (React + Vite + Tailwind CSS).
---
## Prerequisites
- **Python** 3.10+
- **PostgreSQL** 14+
- **Node.js** 18+ and **npm** (for the frontend)
- An **OpenAI API key** (for the chatbot)
- A **SkillCraft API** account (for psychometric assessments)
---
## 1. Database Setup
### 1a. Start PostgreSQL
Make sure PostgreSQL is running on your machine:
```bash
# Linux (systemd)
sudo systemctl start postgresql
# macOS (Homebrew)
brew services start postgresql@15
```
### 1b. Configure data environment variables
```bash
cd rwanda-emp/data
cp .env.example .env
```
Edit `data/.env` and set your test account credentials:
```env
DB_HOST=localhost
DB_PORT=5432
DB_USER=postgres
DB_PASSWORD=
DB_NAME=rwanda_emp
TEST_ADMIN_EMAIL=admin@rwanda.gov.rw
TEST_ADMIN_PASSWORD=Admin@2026
TEST_BENEFICIARY_EMAIL=test@gmail.com
TEST_BENEFICIARY_PASSWORD=User@2026
DEFAULT_BENEFICIARY_PASSWORD=defaultPassword123
```
### 1c. Create the database and load data
```bash
# Install data-script dependencies
pip3 install -r requirements.txt
# Run the full setup: creates DB, loads schema, seeds data, adds test accounts
bash setup.sh
```
The setup script will:
1. Drop and recreate the `rwanda_emp` database
2. Apply `database_sch …