Financial truth layer for schools and SMEs in Ghana
# Reconciliation Engine - Production Foundation
Financial truth layer for schools and SMEs in Ghana.
## Quick Start
### Prerequisites
- Docker & Docker Compose
- Go 1.21+ (for local development)
- Make (optional)
### Run Locally
```bash
# Clone and enter directory
cd reconciliation-engine
# Start all services
docker-compose up -d
# Run migrations
docker-compose exec postgres psql -U recon -d reconciliation -f /docker-entrypoint-initdb.d/001_initial_schema.sql
# Seed demo data
go run ./cmd/seed
# Access API
curl
localhost
```
### Demo Credentials
**School: Bright Future Academy**
- Email: admin@brightfuture.edu.gh
- Password: demo123
**School: Hope International School**
- Email: admin@hopeschool.edu.gh
- Password: demo123
## Project Structure
```
reconciliation-engine/
├── cmd/
│ ├── server/ # HTTP server entrypoint
│ │ └── main.go
│ └── seed/ # Demo data generator
│ └── main.go
├── internal/
│ ├── domain/
│ │ ├── reconciliation/ # Core business logic
│ │ │ └── engine.go
│ │ └── reporting/ # Balance calculations
│ ├── storage/ # Database layer
│ │ └── postgres.go
│ ├── api/ # HTTP handlers
│ │ ├── handlers.go
│ │ └── middleware.go
│ └── auth/ # Authentication
│ └── jwt.go
├── migrations/
│ └── 001_initial_schema.sql
├── web/
│ ├── templates/
│ └── static/
├── docker-compose.yml
├── Dockerfile
├── go.mod
└── README.md
```
## API Endpoints
### Authentication
- `POST /api/v1/auth/login` - Login
- `POST /api/v1/auth/logout` - Logout
### Accounts
- `GET /api/v1/accounts` - List all accounts (students)
- `POST /api/v1/accounts` - Create account
- `GET /api/v1/accounts/{id}` - Get account details
- `GET /api/v1/accounts/{id}/balance` - Get current balance
### Charges
- `POST /api/v1/charges` - Create charge
- `GET /api/v1/charges` - List charges (filter by term, status)
- `GET /api/v1/charges/{id}` - Get char …