Backend Schema
How the prototype becomes a real app.
This page documents the recommended database tables and how the localStorage prototype maps to a real backend.
Recommended Stack
Next.js + Supabase + Stripe + email service.
Use Next.js for the app, Supabase for auth/database/storage, Stripe for memberships, and Resend/Brevo/Mailchimp for notifications and newsletters.
| Table | Purpose | Key Fields | Prototype Source |
|---|---|---|---|
| users | Auth identity | id, email, role, created_at | future auth |
| profiles | Member cards and intake | user_id, pen_name, bio, paths, goals, visibility | bwc_profile, bwc_intake |
| events | Calendar events | title, type, starts_at, location, host_id, capacity, visibility | admin event items |
| rsvps | Event attendance | event_id, user_id, status, created_at | bwc_rsvps |
| projects | Member project shelf | user_id, title, genre, status, current_words, goal_words | bwc_projects |
| drafts | Writer Studio documents | user_id, project_id, title, body, folder, tags, status, word_goal | bwc_drafts |
| tasks | Goals and room tasks | user_id, title, type, room, due_at, done | bwc_tasks |
| sparks | Prompt deck | title, body, lane, created_by, visibility | default/admin sparks |
| saved_sparks | Member prompt bookmarks | user_id, spark_id, created_at | bwc_saved_sparks |
| submissions | Readings, zine, features | user_id, title, type, notes, file_url, status | bwc_submissions |
| critique_items | Feedback queue | user_id, title, genre, words, type, status, notes | bwc_critiques |
| resources | Archive tools | title, lane, body, file_url, visibility | admin resources |
| zine_issues | Cult Quarterly issues | title, theme, deadline, status, published_at | zine notes |
| announcements | Homepage/portal notices | title, body, lane, starts_at, ends_at | admin announcements |