Spark Bytes is a web application that helps Boston University students discover and attend free food events on campus. Users can browse upcoming events, RSVP, and receive alerts about their favorite events.
- BU email-based authentication (requires @bu.edu email)
- Magic link login (no passwords required)
- User profiles with customizable information
- Browse public events with food
- Create and manage your own events
- RSVP to events
- Filter events by date, location, and tags
- View event details including time, location, and remaining portions
- Customizable user profiles
- Add your name, bio, major, and graduation year
- Set interests and social links
- Receive alerts when your favorite events are about to start (within 1 hour)
- Get notified when an event's available portions drop to 10 or fewer
- Real-time notification system
- Next.js with React
- TypeScript
- Ant Design for UI components
- Supabase for authentication and database
- PostgreSQL database
- Row Level Security (RLS) for data protection
The application uses the following main tables:
Stores user profile information linked to Supabase Auth.
CREATE TABLE profiles (
id UUID REFERENCES auth.users(id) PRIMARY KEY,
name TEXT,
email TEXT UNIQUE,
bio TEXT DEFAULT '',
avatar_url TEXT DEFAULT '',
major TEXT DEFAULT '',
graduation_year INT,
interests TEXT[] DEFAULT '{}',
social_links JSONB DEFAULT '{}',
created_at TIMESTAMP WITH TIME ZONE DEFAULT now(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT now()
);Stores event information including food details.
CREATE TABLE events (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
title TEXT NOT NULL,
description TEXT NOT NULL,
date DATE NOT NULL,
start_time TEXT NOT NULL,
end_time TEXT NOT NULL,
location TEXT NOT NULL,
user_id UUID REFERENCES auth.users(id) NOT NULL,
capacity INT DEFAULT 0,
image_url TEXT DEFAULT '',
is_public BOOLEAN DEFAULT true,
is_archived BOOLEAN DEFAULT false,
tags TEXT[] DEFAULT '{}',
created_at TIMESTAMP WITH TIME ZONE DEFAULT now(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT now()
);Tracks RSVPs for events.
CREATE TABLE guests (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
event_id UUID REFERENCES events(id) ON DELETE CASCADE NOT NULL,
user_id UUID REFERENCES auth.users(id),
name TEXT,
email TEXT NOT NULL,
status TEXT DEFAULT 'pending',
rsvp_date TIMESTAMP WITH TIME ZONE DEFAULT now(),
notes TEXT DEFAULT '',
created_at TIMESTAMP WITH TIME ZONE DEFAULT now(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT now()
);Stores notifications for users about events.
CREATE TABLE alerts (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
user_id UUID REFERENCES auth.users(id) NOT NULL,
event_id UUID REFERENCES events(id) ON DELETE CASCADE,
type TEXT NOT NULL, -- 'upcoming_favorite', 'low_capacity', etc.
message TEXT NOT NULL,
is_read BOOLEAN DEFAULT false,
created_at TIMESTAMP WITH TIME ZONE DEFAULT now(),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT now()
);The application uses Supabase's magic link authentication, which sends a login link to the user's BU email. No passwords are required, enhancing security and user experience.
The alerts system uses PostgreSQL triggers to automatically generate notifications when:
- A user's favorite event is about to start (within 1 hour)
- An event's available portions drops to 10 or fewer
Users can customize their profiles, including:
- Name (can be updated during login or from profile page)
- Bio and major
- Graduation year
- Interests and social links
- Node.js (v14 or higher)
- Supabase account
- PostgreSQL knowledge (for database management)
- Clone the repository
- Install dependencies:
npm install - Configure environment variables:
- NEXT_PUBLIC_SUPABASE_URL
- NEXT_PUBLIC_SUPABASE_ANON_KEY
- Run the development server:
npm run dev
- Create a new Supabase project
- Run the SQL scripts provided in
schema.sqlto set up the database tables - Configure Row Level Security policies
- Set up authentication providers (Email)
spark-bytes/
├── public/
├── src/
│ ├── app/ # Next.js app router
│ │ ├── auth/ # Authentication pages
│ │ ├── profile/ # Profile pages
│ │ ├── favorites/ # Favorites pages
│ │ └── ...
│ ├── components/ # Reusable components
│ │ ├── NavBar.tsx # Navigation bar with alerts
│ │ ├── AlertsMenu.jsx # Alerts dropdown menu
│ │ └── ...
│ ├── utils/ # Utility functions
│ │ ├── supabaseClient.ts # Supabase configuration
│ │ ├── eventApi.tsx # Event-related API functions
│ │ └── ...
│ └── ...
└── ...
- Mobile application
- Integration with BU calendar
- Social features for sharing and inviting friends
- Advanced filtering and search capabilities
- Event ratings and reviews
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Supabase for authentication and database
- Next.js for the React framework
- Ant Design for UI components