SudarshanaSRao/sports-on-the-go-4c575e84
A full-stack web app (built with React, TypeScript, Supabase, and OpenStreetMap for real-time game discovery) for discovering and organizing local pickup sports games with real-time maps and user authentication.
SquadUp πββοΈ
Find and join pickup sports games in your area
SquadUp is a community-driven platform that connects athletes and sports enthusiasts for pickup games. Whether you're looking to join a basketball game, host a soccer match, or find tennis partners, SquadUp makes it easy to discover and organize local sports activities.
Find more information about this website here
π Features
For Players
- Discover Games: Browse and search for pickup games in your area using an interactive map
- Filter by Sport & Skill Level: Find games that match your preferences and abilities
- Join Games: Sign up for games with one click and connect with other players
- Review System: Rate and review players after games to build community trust
- Friend System: Connect with regular players and build your sports network
- Leaderboard: Track your stats including games played, ratings, and community standing
- AI Assistant: Sporty is a Gemini AI chatbot for personalized game recommendations and natural-language match search
For Hosts
- Host Games: Create and organize pickup games with detailed information
- Auto-Location: Geocoding integration to automatically map your game location
- Community Creation: Each game automatically creates a community for participants
- Player Management: Track who's joining your games and manage participants
- Flexible Settings: Set skill levels, player limits, duration, and game rules
Social Features
- Friend Requests: Send and receive friend requests from other players
- User Profiles: View player stats, ratings, and game history
- Community Pages: Each game has its own community page for discussions
- Notifications: Stay updated on friend requests and game activities
π Getting Started
Prerequisites
Before you begin, ensure you have the following installed:
Installation
-
Clone the repository
git clone https://github.com/SudarshanaSRao/sports-on-the-go-4c575e84.git cd sports-on-the-go-4c575e84 -
Install dependencies
npm install # or bun install -
Set up environment variables
The project uses Lovable Cloud (Supabase) for backend services. The
.envfile is auto-configured when deployed through Lovable, but for local development, you'll need:VITE_SUPABASE_URL=your_supabase_url VITE_SUPABASE_PUBLISHABLE_KEY=your_supabase_anon_key VITE_SUPABASE_PROJECT_ID=your_project_id
-
Start the development server
npm run dev # or bun run dev -
Open your browser
Navigate to
http://localhost:5173to see the application running.
ποΈ Architecture
The following diagram illustrates the system architecture and data flow of SquadUp:
Architecture Overview
SquadUp follows a modern client-server architecture with the following key components:
- Client Side: React frontend built with Vite and TypeScript, handling user interactions and UI rendering
- Authentication Context: Manages user authentication state with email and Google OAuth support
- Content Moderation: Edge function that filters user-generated content for safety
- Geocode Function: Edge function that converts addresses to coordinates for map display
- Row Level Security: PostgreSQL database with RLS policies ensuring secure data access
- Core Database Tables:
- profiles: Stores user profile information
- games: Stores game details and statistics
- rsvps: Manages event attendance
- communities: Auto-created for each game
- reviews: Player ratings and feedback
Data Flow
- User Authentication: Users sign up/login via Lovable Cloud Auth (email or Google)
- Game Creation: Host creates game β Geocode function validates address β Game stored in database
- Game Discovery: Users browse games β Map displays locations β Filter by sport/skill level
- RSVP System: User joins game β RSVP recorded β Player count updated β Community auto-created
- Social Features: Friend requests β Accepted friendships β Enhanced game visibility
- Review System: Post-game reviews β Ratings calculated β User profiles updated
π οΈ Tech Stack
Frontend
- React 18 - UI library
- TypeScript - Type safety
- Vite - Build tool and dev server
- Tailwind CSS - Utility-first styling
- Shadcn/ui - Accessible component library
- React Router - Client-side routing
- React Query - Server state management
- React Leaflet - Interactive maps
Backend (Lovable Cloud/Supabase)
- PostgreSQL - Database
- Row Level Security - Data security
- Edge Functions - Serverless functions
- Authentication - User management
- Storage - File storage
Key Libraries
- Zod - Schema validation
- React Hook Form - Form management
- date-fns - Date manipulation
- Leaflet - Map visualization
- Lucide React - Icon library
π Project Structure
squadup/
βββ src/
β βββ components/ # Reusable UI components
β β βββ ui/ # Shadcn UI components
β β βββ Navbar.tsx # Navigation component
β β βββ GameMap.tsx # Map component
β β βββ ...
β βββ pages/ # Page components
β β βββ Index.tsx # Home page
β β βββ Discover.tsx # Game discovery
β β βββ HostGame.tsx # Host a game
β β βββ MyGames.tsx # User's games
β β βββ Friends.tsx # Friends management
β β βββ ...
β βββ contexts/ # React contexts
β β βββ AuthContext.tsx
β βββ hooks/ # Custom React hooks
β βββ utils/ # Utility functions
β βββ integrations/ # Third-party integrations
β β βββ supabase/ # Supabase client
β βββ main.tsx # Application entry point
βββ supabase/
β βββ functions/ # Edge functions
β β βββ geocode/ # Geocoding service
β β βββ moderate-content/ # Content moderation
β βββ config.toml # Supabase configuration
βββ public/ # Static assets
βββ ...
π― How It Works
For New Users
- Sign Up: Create an account using email or Google authentication
- Set Username: Choose your unique username
- Discover: Browse the map or list view to find games
- Join: Click on games that interest you and join them
- Connect: Add friends and build your sports network
- Play: Attend games and meet fellow athletes
- Review: Rate your experience and help build community trust
For Game Hosts
- Create Game: Click "Host Game" and fill in details
- Sport type and skill level
- Date, time, and duration
- Location (auto-geocoded)
- Player limits and requirements
- Manage: Track participants and game details
- Community: Use the auto-created community page to communicate
- Review: Rate players after the game
π Security & Privacy
- Row Level Security (RLS): All database tables are protected with RLS policies
- Authentication Required: Most features require user authentication
- Data Privacy: User data is protected and only shared with game participants
- Content Moderation: Edge functions help moderate user-generated content
π€ Contributing
We welcome contributions from the community! Please see our CONTRIBUTING.md guide for details on:
- Code of conduct
- How to submit issues
- How to submit pull requests
- Coding standards
π License
This project is licensed under the MIT License - see the LICENSE file for details.
π Acknowledgments
- Built with Lovable - AI-powered web app builder
- UI components from Shadcn/ui
- Maps powered by Leaflet
- Backend infrastructure by Supabase
π Support
If you encounter any issues or have questions:
- Open an issue
- Check existing discussions
πΊοΈ Roadmap
Future features we're considering:
- Mobile app (React Native)
- Team tournaments
- Weather integration
- Push notifications
- Multi-language support
- Advanced matchmaking algorithms
π» Development
Running Tests
npm run test
# or
bun testBuilding for Production
npm run build
# or
bun run buildLinting
npm run lint
# or
bun run lintπ Deployment
This project can be deployed on various platforms:
- Lovable (Recommended): One-click deployment
- Vercel: Import GitHub repository
- Netlify: Connect GitHub repository
- Self-hosted: Build and deploy to your own server
For detailed deployment instructions, see DEPLOYMENT.md.
Made with β€οΈ by the SquadUp community
