Welcome to Unforgett backend docs
This site explains Unforgett’s backend (hono-backend) in plain language — like you’re learning it for the first time.
What is hono-backend?
Imagine a restaurant:
| Real world | In our project |
|---|---|
| Customer at a table | App (web, admin, Flutter, Chrome extension) |
| Waiter taking orders | HTTP request (GET, POST, …) |
| Kitchen rules (“no refunds after 2 hours”) | Business logic in services/ |
| Pantry / fridge | MongoDB database |
| Recipe cards on the wall | Models in models/ |
| Front door + host stand | index.ts — first file every request hits |
hono-backend is the kitchen + host. Apps only ask and show answers. The server decides what is allowed and stores the truth.
Who should read this?
- New engineers joining Unforgett
- Frontend or mobile devs who want to know what the API really does
- You, future-you, when you forgot where SRS scheduling lives
How to use these docs
- Start with Getting started if terms like JWT, route, or Mongoose feel fuzzy.
- Read Architecture for the big picture.
- Dive into a folder: Routes, Models, Services.
- Use Every file (A–Z) when you know a filename but not what it does.
Run the backend locally
cd hono-backend
cp .env.example .env # if you have an example; fill secrets
npm install
npm run devServer default: http://localhost:3000
Health check: GET /health → { "status": "ok" }
Run these docs locally
cd hono-backend-docs
npm install
npm run devOpen the URL printed in the terminal (usually http://localhost:3000 — if port clashes, Next.js picks another).
Golden rule (architecture)
hono-backend is the single source of truth.
Validation, permissions, SRS, progress, and invariants live here.
Unforgett frontends (vite-frontend,admin-frontend,unforgett-app) call the same HTTP APIs and only handle UX.
When you add a feature: backend first, then wire clients to the same paths and JSON shapes.