Schema-driven sign-up fields
Why this choice
Organisations need different fields for different user types. Developers or tech-savvy users can add any field they need.
Trade-off
Extra fields are harder to query.
Open-source membership platform on one Cloudflare Worker: accounts, membership types with their own sign-up fields, CMS pages and newsletter sign-up, on React Router v7, TypeScript, Tailwind CSS, D1 and KV. An early idea with known bugs.
Stack
Key outcomes
Expand a section for architecture detail, trade-offs, and evidence. Written for technical hiring managers.
Community Hub is an open-source, reusable membership platform. It began during my time at UKSEDS (UK Students for the Exploration and Development of Space), and I continued it as an open-source project so charities and other organisations could use it instead of paying very high prices for similar platforms.
Charities, societies and other organisations need member accounts, editable pages and different sign-up requirements for different user types, but platforms that do this can be very expensive.
- Registration and login with bcrypt password hashing, and dashboard routes behind a session check - Membership types, each with its own sign-up form defined as data and validated on the server - CMS pages by slug, saved navigation, and newsletter sign-up with an optional confirmation email through Resend - A service layer kept free of HTTP concerns, with all database access through parameterised statements - Runs fully locally with local D1 and KV, so anyone can fork it without a Cloudflare account
| What | Why |
|---|---|
| App: React Router v7 on a single Cloudflare Worker | Server-rendered pages and JSON routes in one deploy |
| Data: D1 with foreign keys, indexes and unique constraints | Data integrity enforced in SQL |
| Sign-up fields: Field definitions stored on each membership type; known keys map to columns, the rest to an extra profile field | Developers or tech-savvy users can add the fields each user type needs without changing the schema |
| Sessions: Opaque ID in a cookie, session data in KV with a 7-day expiry | An experiment; migration to JWT is planned |
A fixed SQLite schema; altering tables for each organisation is risky.
Field definitions per membership type, validated on the server: up to 50 fields, key format rules, reserved keys and 5 field types.
Extra fields are not indexed and are harder to query in SQL.
Why this choice
Organisations need different fields for different user types. Developers or tech-savvy users can add any field they need.
Trade-off
Extra fields are harder to query.
Why this choice
Trying KV for session storage. An experiment.
Trade-off
Migration to JWT planned.
Why this choice
Similar platforms are expensive for charities and other organisations. Free for organisations to use and adapt.
Trade-off
Progress depends on my spare time.
- Learned: data-driven sign-up fields handle different user types without schema changes, at the cost of easy querying - Known issues: the project has known bugs and security issues, mainly around access control and session handling, that I have not yet had time to fix - Next steps: fix the known security issues and bugs, add automated tests, and migrate sessions from KV to JWT - Not built: events, ticketing and scheduled email are not part of the project - Not yet: never deployed with real users, and no automated tests yet