A simple RSVP system built on Val Town that allows guests to submit their responses to an event invitation and view all responses.
/index.ts - Main backend file with API endpoints and database setup/frontend/index.html - Frontend RSVP form and response viewerPOST /api/rsvp - Submit a new RSVPGET /api/rsvp - Get all RSVP responsesThe RSVP responses are stored in a SQLite table with the following schema:
CREATE TABLE rsvp_responses (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL,
email TEXT NOT NULL,
attending BOOLEAN NOT NULL,
guests INTEGER DEFAULT 0,
dietary_restrictions TEXT,
message TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
)
To customize this RSVP page for your event:
In a production environment, you might want to: