LeagueUp is a comprehensive web application for managing sports leagues and pickup games. Built with Next.js, MongoDB, and modern web technologies, it provides a platform for players to connect, organize games, and track their sports activities.
- β User registration and login with JWT authentication
- β User profile management and dashboard
- β Responsive design with Tailwind CSS
- β Protected routes with JWT middleware
- β Password hashing with bcrypt
- β Create and manage pickup games with full form
- β Browse pickup games with advanced filtering
- β Join/leave games with waitlist support
- β Real-time player count updates
- β Game status management (upcoming, completed, cancelled)
- β Location-based game discovery
- Stripe integration for league creation payments
- League creation and management
- Team creation and player management
- Automatic round-robin schedule generation
- Referee portal for game management
- Real-time stats tracking
- Game results and statistics
- League standings and leaderboards
- Player performance tracking
- Frontend: Next.js 15 with React 19, TypeScript, Tailwind CSS
- Backend: Next.js API Routes with Node.js
- Database: Supabase (PostgreSQL)
- Authentication: JWT (JSON Web Tokens)
- Payments: Stripe integration
- Styling: Tailwind CSS with responsive design
- Personal information (name, email, age, contact)
- Sports interests and preferences
- Team memberships
- Game details (location, date/time, competitiveness)
- Player management (join/leave functionality)
- Creator information
- League organization and management
- Team associations
- Schedule management
- Team information and captain
- Player roster management
- League association
- Game scheduling and management
- Team matchups
- Referee assignments
- Detailed game statistics
- Goals, assists, and cards tracking
- Referee notes
- Node.js 18+
- Supabase account (free tier available at https://supabase.com)
- npm or yarn package manager
-
Clone the repository
git clone <repository-url> cd leagueup
-
Install dependencies
npm install
-
Set up Supabase
- Create a new project at https://supabase.com
- Go to Project Settings > API to get your URL and anon key
- In the SQL Editor, run the migration script from
supabase-migration.sqlto create the tables
-
Set up environment variables Copy the example environment file and update the values:
cp env.example .env.local
Or create a
.env.localfile manually in the root directory:# Supabase Configuration NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key # JWT - Generate a secure random string for production JWT_SECRET=your-super-secret-jwt-key-change-this-in-production-please-make-it-long-and-random # Stripe (add your keys when ready for payment features) STRIPE_SECRET_KEY=your_stripe_secret_key STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key # Next.js NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_SECRET=your-nextauth-secret-make-this-random-too
-
Run the development server
npm run dev
-
Open your browser Navigate to http://localhost:3000
The project uses Supabase (PostgreSQL) as the database. After creating your Supabase project, run the SQL migration script located at supabase-migration.sql in your Supabase SQL Editor to create all necessary tables and indexes.
- users: User accounts with authentication details
- pickup_games: Pickup game listings with location and player management
- leagues: League organization (coming soon)
- teams: Team management (coming soon)
- games: Scheduled games (coming soon)
- game_stats: Game statistics tracking (coming soon)
π The application is fully functional! All core features are implemented and working:
- Homepage: Beautiful landing page with navigation
- Authentication: Working registration and login system
- Pickup Games: Create, browse, filter, and join games
- Dashboard: User dashboard with game statistics
- API: Complete REST API with all endpoints functional
/- Homepage with features overview/login- User login page/register- User registration page/pickup- Browse all pickup games with filtering/pickup/create- Create new pickup games/dashboard- User dashboard (shows mock data for now)
- Visit the homepage at
http://localhost:3000 - Click "Sign Up" to register a new account
- Browse pickup games at
/pickup - Create a new game at
/pickup/create - View your dashboard at
/dashboard
POST /api/auth/register- User registration with validationPOST /api/auth/login- User login with JWT tokenGET /api/auth/me- Get current user profile (protected)PUT /api/auth/me- Update user profile (protected)
GET /api/pickup- Get all pickup games with filteringPOST /api/pickup- Create new pickup game (protected)GET /api/pickup/[id]- Get specific pickup game detailsPUT /api/pickup/[id]- Update pickup game (creator only)DELETE /api/pickup/[id]- Delete pickup game (creator only)POST /api/pickup/[id]/join- Join pickup game or waitlistDELETE /api/pickup/[id]/join- Leave pickup game or waitlist
GET /api/health- API health status
GET /api/leagues- Get all leaguesPOST /api/leagues- Create leagueGET /api/leagues/[id]- Get league details
GET /api/teams- Get all teamsPOST /api/teams- Create teamGET /api/teams/[id]- Get team details
GET /api/games- Get all gamesPOST /api/games/[id]/stats- Update game stats
leagueup/
βββ src/
β βββ app/
β β βββ api/ # API routes
β β β βββ auth/ # Authentication endpoints
β β β βββ pickup/ # Pickup game endpoints
β β β βββ leagues/ # League endpoints
β β β βββ teams/ # Team endpoints
β β β βββ games/ # Game endpoints
β β βββ dashboard/ # User dashboard
β β βββ login/ # Login page
β β βββ register/ # Registration page
β β βββ profile/ # User profile page
β β βββ pickup/ # Pickup games pages
β β βββ page.tsx # Homepage
β βββ lib/
β βββ models/ # Mongoose models
β βββ utils/ # Utility functions
βββ public/ # Static assets
βββ package.json
βββ README.md
- Project setup with Next.js 15 and TypeScript
- Supabase database integration with PostgreSQL
- Complete JWT authentication system with bcrypt password hashing
- User registration and login with validation
- User dashboard with game statistics
- Pickup game creation with comprehensive form
- Pickup game browsing with filtering (sport, skill level, location)
- Join/leave pickup games with waitlist functionality
- Beautiful responsive UI with Tailwind CSS and dark mode
- Complete API endpoints for auth and pickup games
- Error handling and form validation
- Navigation and routing between all pages
- Stripe payment integration
- League creation and management
- Team management system
- Automatic schedule generation
- Referee portal
- Game statistics tracking
- Real-time notifications
- Mobile app development
- Advanced analytics
- Social features
- Tournament management
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support, email support@leagueup.com or join our Discord community.
- Built with Next.js and React
- Styled with Tailwind CSS
- Database powered by Supabase (PostgreSQL)
- Authentication with JWT
- Payments processed by Stripe