EpicEsports India is a comprehensive platform for competitive gaming in India, designed to connect gamers, colleges, and industry stakeholders in a vibrant online ecosystem. The platform facilitates tournaments, community building, and performance tracking for esports enthusiasts.
- User Authentication: Secure registration and login system
- Game Categories: Browse various game categories including Valorant, BGMI, and more
- Tournament System: View, register, and participate in upcoming tournaments
- Community Features: Connect with other gamers and teams
- Performance Tracking: Track player and team statistics
- Career Opportunities: Browse and apply for positions in the esports industry
- Responsive Design: Mobile-friendly interface for all devices
- Admin Dashboard: Manage tournaments and player profiles
- Frontend: Next.js, React, TypeScript, Tailwind CSS
- Backend: Next.js API routes
- Database: Supabase
- Authentication: JWT, bcrypt for password hashing
- Deployment: Vercel (recommended)
- Node.js 18.x or higher
- npm or yarn
- A Supabase account (for database)
-
Clone the repository:
git clone https://github.com/your-username/epicesports-production.git cd epicesports-production -
Install dependencies:
npm install # or yarn install -
Configure environment variables:
- Copy
.env.exampleto.env.local - Update the variables with your own values
- Copy
-
Set up Supabase Database:
- Create a new Supabase project at https://supabase.com
- Get your project URL and anon key from the API settings
- Add these to your
.env.localfile - Create the
tournamentstable in Supabase with the following SQL:
CREATE TABLE tournaments (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
name TEXT NOT NULL,
game TEXT NOT NULL,
gameImage TEXT,
startDate TEXT NOT NULL,
endDate TEXT NOT NULL,
registrationDeadline TEXT NOT NULL,
prizePool TEXT NOT NULL,
teamSize INTEGER NOT NULL,
maxTeams INTEGER NOT NULL,
currentTeams INTEGER DEFAULT 0,
location TEXT,
status TEXT DEFAULT 'upcoming' CHECK (status IN ('upcoming', 'ongoing', 'completed')),
registrationFee INTEGER DEFAULT 0,
format TEXT,
description TEXT,
rules TEXT,
organizer JSONB,
prizes JSONB,
schedule JSONB,
created_at TIMESTAMP WITH TIME ZONE DEFAULT now()
);
-- Enable row-level security
ALTER TABLE tournaments ENABLE ROW LEVEL SECURITY;
-- Create policies
CREATE POLICY "Allow public read access"
ON tournaments FOR SELECT USING (true);
CREATE POLICY "Allow authenticated insert"
ON tournaments FOR INSERT WITH CHECK (auth.role() = 'authenticated');
CREATE POLICY "Allow owners to update"
ON tournaments FOR UPDATE USING (
auth.uid() = (organizer->>'id')::uuid
);-
Run the development server:
npm run dev # or yarn dev -
Seed the database with sample tournaments:
- Visit http://localhost:3000/api/seed/tournaments in your browser
- In your Supabase dashboard, go to Authentication > Providers
- Enable Email/Password provider
- Configure Google OAuth if desired
epicesports-production/
├── public/ # Static assets
│ └── images/ # Image assets
├── src/
│ ├── app/ # Next.js App Router
│ │ ├── api/ # API routes
│ │ ├── pages/ # Page routes
│ │ ├── layout.tsx # Root layout
│ │ └── page.tsx # Home page
│ ├── components/ # Reusable components
│ ├── lib/ # Utilities and shared code
│ └── backend/ # Backend services
└── README.md # Project documentation
- POST /api/register: User registration
- POST /api/login: User authentication
- GET /api/tournaments: Get tournament listings
- GET /api/games: Get game categories
- POST /api/tournaments/register: Register for tournaments
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your 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 questions or support, please contact:
- Email: [email protected]
- Phone: 8824013820
If you encounter database connection issues:
- Check your Supabase URL and API key
- Ensure your IP is allowed in Supabase
- Check database policies for proper access control
Follow these steps to set up the user profile and member dashboard with real-time data instead of mock data:
Run the following SQL scripts in your Supabase SQL Editor:
-
First create the user profiles table:
-- Run the content of src/sql/user_profiles_table.sql -
Create the member stats table:
-- Run the content of src/sql/member_stats_table.sql -
Create the tournament registrations table:
-- Run the content of src/sql/tournaments_registrations_table.sql
After setting up the tables, you can seed initial data for testing:
-
Start the development server:
npm run dev
-
Log in to your account
-
Visit the seed endpoint in your browser or use a tool like Postman:
POST /api/seed/profileOr simply navigate to: http://localhost:3000/api/seed/profile
Once the data is seeded, you can access your profile and member dashboard with real-time data at:
- Dashboard: http://localhost:3000/dashboard
- Profile: http://localhost:3000/profile/[your-username]
- Account: http://localhost:3000/account
If you're still seeing mock data instead of real data from the database:
- Check the console logs for any errors related to database connections
- Verify that your Supabase environment variables are correctly set in
.env.local - Ensure that your user account is authenticated
- Try refreshing the page or signing out and back in