The company website and learning platform for **CAXTON SOFTWARE DEV HUB** — a business name registered in Nigeria with the Corporate Affairs Commission under the Companies and Allied Matters Act 2020 (registration number 9675871), operating from Kaduna.
# Caxton Software Dev Hub
The company website and learning platform for **CAXTON SOFTWARE DEV HUB** — a
business name registered in Nigeria with the Corporate Affairs Commission under
the Companies and Allied Matters Act 2020 (registration number 9675871),
operating from Kaduna.
It is one application doing two jobs:
- **A studio site** — services, case studies, a verifiable registration record,
and an enquiry pipeline that lands in an admin inbox.
- **A learning platform** — cohort courses and mentorship plans that people pay
for in naira through Flutterwave, with progress tracking and an AI study
assistant scoped to each learner's curriculum.
---
## Stack
| Concern | Choice | Why |
|---|---|---|
| Framework | Next.js 16 (App Router, Turbopack) | Server Components, Server Actions, one deploy for site + app |
| Language | TypeScript (strict) | — |
| Styling | Tailwind CSS v4 | Design tokens live in `src/app/globals.css` under `@theme` |
| Database | PostgreSQL + Prisma 6 | Money and enrolments need real transactions |
| Auth | Hand-rolled: `bcryptjs` + `jose` JWT in an httpOnly cookie | No third-party dependency for something this small; see note below |
| Payments | **Flutterwave** (NGN) | Recommended: settles to a Nigerian account, supports card / transfer / USSD out of the box |
| AI | Anthropic Claude (`claude-opus-5`), streamed | The study assistant |
| Email | Resend, or console when unconfigured | Local development needs no email provider |
**On auth:** sessions are signed JWTs in an httpOnly, SameSite=Lax cookie.
`src/proxy.ts` does a cheap signature check at the edge; every page and route
handler behind it re-resolves the user from the database before trusting
anything. If you would rather use Auth.js/Clerk later, `src/lib/auth.ts` is the
only file that needs replacing.
---
## Getting started
### 1. Requirements
- Node.js 20+ (developed on 23)
- PostgreSQL 14+
### 2. Install
```bash
npm install
```
### 3. Environment
```bash
cp .env.example .e …