A full-stack sports event management application built with Next.js 15, TypeScript, Supabase, and Tailwind CSS.
- 🔐 Authentication: Email/password authentication with Supabase Auth (Google OAuth ready)
- 📅 Event Management: Create, view, edit, and delete sports events
- 🏟️ Venue Management: Associate multiple venues with each event
- 🔍 Search & Filter: Search events by name and filter by sport type
- 📱 Responsive Design: Mobile-friendly UI with shadcn/ui components
- 🛡️ Type Safety: Full TypeScript support with generated database types
- 🚀 Server Actions: All database operations through secure server-side actions
- ⚡ Performance: Optimistic UI updates and efficient data fetching
- Framework: Next.js 15 (App Router)
- Language: TypeScript
- Database: Supabase (PostgreSQL)
- Auth: Supabase Auth
- Styling: Tailwind CSS
- UI Components: shadcn/ui
- Forms: React Hook Form + Zod
- Deployment: Vercel
- Node.js 18+ and npm
- A Supabase account and project
-
Clone the repository:
git clone <repository-url> cd fastbreak-events
-
Install dependencies:
npm install
-
Set up environment variables:
cp .env.local.example .env.local
-
Update
.env.localwith your Supabase credentials:NEXT_PUBLIC_SUPABASE_URL=your_supabase_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key SUPABASE_SERVICE_ROLE_KEY=your_service_role_key NEXT_PUBLIC_APP_URL=http://localhost:3000
- Go to your Supabase project's SQL editor
- Run the SQL script from
supabase/schema.sql - This will create:
eventstable with RLS policiesvenuestable with sample dataevent_venuesjunction table- Necessary indexes and triggers
npm run devOpen http://localhost:3000 to see the application.
fastbreak-events/
├── app/ # Next.js app router
│ ├── (auth)/ # Authentication pages
│ ├── (dashboard)/ # Protected dashboard pages
│ ├── actions/ # Server actions
│ └── auth/ # Auth callback route
├── components/ # React components
│ ├── events/ # Event-specific components
│ ├── forms/ # Form components
│ ├── layout/ # Layout components
│ └── ui/ # shadcn/ui components
├── lib/ # Utilities
│ ├── actions/ # Action wrappers
│ └── supabase/ # Supabase clients
├── types/ # TypeScript types
└── supabase/ # Database schema
- Server-First Approach: All database operations happen through Server Actions
- Type Safety: Zod schemas for validation, generated Supabase types
- Error Handling: Consistent error handling with action wrapper
- Auth Middleware: Route protection at middleware level
- Optimistic Updates: Better UX with immediate UI feedback
- Users can sign up/login with email and password
- Protected routes redirect to login if not authenticated
- Auth state is managed by Supabase and persisted in cookies
- Google OAuth is preconfigured but requires Google Cloud setup
id(UUID, primary key)user_id(UUID, foreign key to auth.users)name(varchar)sport_type(varchar)event_date(timestamp)description(text, optional)created_at,updated_at(timestamps)
id(UUID, primary key)name,address,city,country(required)state,postal_code(optional)created_at,updated_at(timestamps)
event_id,venue_id(composite primary key)
- Push your code to GitHub
- Import the project in Vercel
- Add environment variables:
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYSUPABASE_SERVICE_ROLE_KEYNEXT_PUBLIC_APP_URL(your Vercel URL)
- Deploy!
- Update Supabase Auth redirect URLs
- Configure Google OAuth (if using)
- Test auth flows in production
- Row Level Security (RLS) enabled on all tables
- Users can only CRUD their own events
- Service role key never exposed to client
- All forms validated with Zod
- CSRF protection built into Next.js
- Google OAuth integration
- Event attendee management
- Email notifications
- Calendar integration
- Event categories/tags
- Advanced filtering options
- Data export functionality
- Multi-tenant support
The application includes:
- Type checking:
npm run type-check - Linting:
npm run lint - Build verification:
npm run build
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
This project is licensed under the MIT License.