Sheet 08 / 10
PEDER
Session management system for counselling training. Clients, trainee counsellors and supervisors match through a shared calendar; session reports go to the supervisor for approval.
- Subject
- Backend · Security
- Platform
- Web · Cloudflare Workers
- Source
- Private repo
- Date
- 2026
- Status
- In development
Peder is a session management system that brings together clients, trainee counsellors and supervisors in counselling education. Trainees enter their weekly availability, a client requests a slot from the shared table, the trainee accepts, and the session is confirmed once the supervisor approves; session reports also go to the supervisor for approval. It runs entirely as one Cloudflare Worker with data in D1. Every request passes several security layers before reaching business logic: a violating IP collects penalty points, and enough points lead to a temporary quarantine. Session reports and messages are stored encrypted, and admins sign in with TOTP. The notes cover the penalty engine, a login endpoint that does not leak whether an account exists, and file access.
01ViewsLocal demo · sample data
02Schema and notes
- Runs entirely in one Cloudflare Worker (Hono); data in D1.
- Every request passes, in order: logging, IP penalty, rate limit, body limit, input filter, country filter.
- Violations add points to the IP; above a threshold the IP is quarantined for a while.
- Session reports, supervisor notes and messages are stored encrypted with AES-GCM.
- TOTP for admins; an email code for other roles when signing in from a new device.
03Parts list5 parts
| Item | Part | Description |
|---|---|---|
| 01 | Worker | Hono, role-based routes |
| 02 | Middleware | Penalty engine, rate limit, WAF filter, country filter |
| 03 | Identity | PBKDF2 passwords, CSRF, TOTP and email codes |
| 04 | Data | Cloudflare D1 · 10 migrations |
| 05 | Notifications | Web Push and email |
04Notes3 notes
| No | Note | Topic |
|---|---|---|
| N1 | IP penalty engine | Scoring violations and quarantining the IP for a while; memory cache + D1, shared IPs |
| N2 | Login endpoint | Not leaking whether an account exists: dummy hash, one error message, fail-closed MFA |
| N3 | File access | Letting only the parties download a shared file while the relationship lasts; safe response headers |
—End of sheetdrawn by MUHAMMEDPYZ



