Contributors
Welcome! Railway is the volunteer registration front-end and admin for Oslo Røde Kors, packaged for UIS. This guide explains how to set up the project locally and how to contribute changes back.
Ways to Contribute
| Contribution | Description | Start here |
|---|---|---|
| Fix bugs | Resolve issues in the Next.js app or admin surfaces | Getting Started, then open a PR |
| Add features | Build new pages, admin tools, or API integrations | Read Project Conventions first |
| Improve docs | Fix errors, add examples, clarify instructions | See Documentation |
| File issues | Report bugs or suggest improvements | Open an issue in the repo |
Quick Start
# 1. Clone the repository
git clone <repo-url>
cd railway
# 2. Install dependencies
npm install
# 3. Configure environment
cp .env.example .env
# Edit .env and set POSTGREST_URL / POSTGREST_ANON_JWT
# 4. Run the dev server
npm run dev # http://localhost:3010
# 5. Sanity checks before committing
npm run lint
npm run build
Guides
- Getting Started — local development setup, environment variables, ports
- Project Conventions — hard rules (PostgREST-only data access) and Next.js gotchas
- PostgreSQL roles — the four DB roles (
railway_owner,anon,authenticated,authenticator) and how PostgREST uses them - API surface — every Next.js
/api/*route + the PostgREST tables and RPCs the app calls - Data model — ERD + table reference for the
railwayandauthschemas - Testing the dummy login picker — per-role test checklist for
/admin/login - Documentation — how to add or edit docs on this site
- Writing user docs — style guide for the Norwegian user-doc tree under
users/ - Screenshots and video — how to capture and refresh the PNGs + promo MP4s
Before You Submit a Pull Request
- Run
npm run lintandnpm run buildlocally — both must pass - Keep changes scoped — separate refactors from feature work
- For data access changes, re-read Project Conventions — this is a hard rule
- Update or add docs under
website/docs/if behaviour changes