Skip to content

Repository files navigation

NLNOG Ride Share

Carpooling web app for NLNOG events. Attendees can offer rides, request rides, and claim seats - all authenticated via Pretix ticket codes.

Features

  • Pretix authentication - log in with your order code and secret, no separate account needed
  • Offer a ride - post your departure location, time, available seats, and return time
  • Request a ride - post where you need a pickup from
  • Claim seats - request a seat on an offered ride (requires driver approval)
  • Ride offers - drivers can offer their ride to open requests (requires requester approval)
  • Contact exchange - phone/Telegram/Signal details are shared only between confirmed driver and passengers
  • Email notifications - SMTP notifications for seat requests, approvals, ride changes, and cancellations
  • Multi-event support - each Pretix event gets its own ride board
  • Multi-attendee orders - group ticket holders pick which attendee they are

Quick start

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
# Edit .env with your Pretix API token, organizer slug, and a secret key
uvicorn main:app --reload

Then distribute auth links to attendees:

https://ride.nlnog.net/auth/<event-slug>/<order-code>/<order-secret>

These can be included in Pretix confirmation emails using placeholder variables.

Attendees can also paste a Pretix link straight into the form on the front page. Both shapes Pretix hands out work: the order link (/<organizer>/<event>/order/<code>/<secret>/) and the per-ticket link (/<organizer>/<event>/ticket/<code>/<position>/<secret>/), which logs that one attendee in directly instead of asking who they are.

A ticket link's secret is the position's web_secret, which the Pretix REST API does not expose, so it cannot be checked against the API. Those links are validated by requesting the ticket page from the shop itself — it renders only for the correct secret — and the order details are then read from the API as usual. This means the app needs to be able to reach the ticket shop, not just the API; set PRETIX_PRESALE_URL if the shop does not live at the API URL minus /api/v1.

Configuration

All configuration is via environment variables (or a .env file):

Variable Description
PRETIX_API_URL Pretix API base URL (default: https://pretix.eu/api/v1)
PRETIX_API_TOKEN Pretix API token with read access to orders and events
PRETIX_ORGANIZER Pretix organizer slug
SECRET_KEY Random string for signing session cookies
DATABASE_URL SQLAlchemy database URL (default: sqlite:///./rideshare.db)
BASE_URL Public URL of the app, used in email links
SMTP_HOST SMTP server hostname (emails disabled if empty)
SMTP_PORT SMTP port (default: 587)
SMTP_USER SMTP username
SMTP_PASSWORD SMTP password
SMTP_FROM From address for emails
SMTP_STARTTLS Use STARTTLS (default: true)
CLEANUP_INTERVAL_SECONDS How often to purge data for finished events (default: 86400)

Running tests

python tests.py

Tech stack

License

MIT

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages