Sheet indexIndex Sheet 08 / 10 ← previousnext → TR / EN

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

Peder home page: capybara illustration, counsellor search box and short intro
AWeb · home
Peder weekly table: available counsellors per hour and free slots
BWeb · weekly table
Peder trainee counsellor profile: supervisor, interests, experience and booking button
CWeb · counsellor profile
Peder supervisor panel: students, pending approvals, notifications and upcoming sessions
DWeb · supervisor panel

02Schema and notes

BROWSER3 roles CLOUDFLARE WORKER · HONO MIDDLEWAREpenalty · rate limit · filter ROUTESrole checks · record ownership ENCRYPTIONAES-GCM · PBKDF2 D1SQLite EMAILcodes · alerts PERSONAL DATA · UNDER KVKK
  1. Runs entirely in one Cloudflare Worker (Hono); data in D1.
  2. Every request passes, in order: logging, IP penalty, rate limit, body limit, input filter, country filter.
  3. Violations add points to the IP; above a threshold the IP is quarantined for a while.
  4. Session reports, supervisor notes and messages are stored encrypted with AES-GCM.
  5. TOTP for admins; an email code for other roles when signing in from a new device.

03Parts list5 parts

ItemPartDescription
01WorkerHono, role-based routes
02MiddlewarePenalty engine, rate limit, WAF filter, country filter
03IdentityPBKDF2 passwords, CSRF, TOTP and email codes
04DataCloudflare D1 · 10 migrations
05NotificationsWeb Push and email

04Notes3 notes

NoNoteTopic
N1IP penalty engineScoring violations and quarantining the IP for a while; memory cache + D1, shared IPs
N2Login endpointNot leaking whether an account exists: dummy hash, one error message, fail-closed MFA
N3File accessLetting only the parties download a shared file while the relationship lasts; safe response headers

—End of sheetdrawn by MUHAMMEDPYZ