The Sierra Leone Oral Wiki provides resources and tools that poorly-schooled adults can safely and conveniently use, and a discussion forum for practitioners. All OIM materials will be easily captured, uploaded, tagged, stored, and retrieved on demand. There will be an archive where earlier iterations of various designs are easily retrievable.
# SLOW (Salone OIM Library)
How to run this project locally.
## Backend (OIM visual resource API)
The current MVP is built around:
- visual/icon resource uploads stored in **PostgreSQL** + **local disk**
- password-based sign up / login with database-backed sessions
- profile basics, comments, resource detail, and admin user listing
### Run Postgres + backend (Docker Compose)
If you have Docker available:
```bash
export OIM_API_KEY=change-me
export OIM_ADMIN_EMAILS=brett@example.com
docker compose up -d postgres oim_backend
```
The API runs at `
127.0.0.1`.
### Run backend locally (without Docker)
1. Start Postgres (via Docker or your own installation).
2. In `backend/`:
```bash
cp .env.example .env
npm install
npm run prisma:generate
npm run prisma:migrate
npm run dev
```
Set `OWNER_EMAILS` / `ADMIN_EMAILS` in `backend/.env` to whichever emails should sign in as elevated users.
## Web UI (sign in + icon uploads + admin)
1. Create `web/config.local.json`:
```bash
cp web/config.local.json.example web/config.local.json
```
Set:
- `backendBaseUrl` (default `
127.0.0.1`)
2. Start the web server:
```bash
python3 web/server.py
```
3. Open `
127.0.0.1`
4. Create an account from the web UI, then sign in with the same email and password.
If the email matches `OWNER_EMAILS` or `ADMIN_EMAILS`, the app exposes the admin page.
## Main API endpoints
- `POST /api/auth/signup`
- `POST /api/auth/login`
- `GET /api/auth/me`
- `POST /api/auth/sign-out`
- `POST /api/auth/profile`
- `GET /api/users` (admin only)
- `GET /api/resources`
- `GET /api/resources/search`
- `GET /api/resources/:id`
- `POST /api/resources`
- `PUT /api/resources/:id`
- `DELETE /api/resources/:id`
- `GET /api/resources/:id/comments`
- `POST /api/resources/:id/comments`
- `GET /api/resources/:id/file`
## Deployment / sharing
For fast testing this week:
1. Run backend on a reachable host or tunnel:
```bash
ngrok http 3001
```
2. Update `web/config.lo …