Skip to content

Recentlystarted/tunda-sports

Repository files navigation

Tunda Sports Club

A comprehensive sports club management system built with Next.js, featuring tournament management, player registration, image galleries, and admin controls.

๐Ÿš€ Quick Start

Development

pnpm install
pnpm run dev

Production Build

pnpm run build
pnpm start

โœจ Features

  • Landing Page: Responsive design with dynamic content sections
  • Tournament Management: Create and manage cricket tournaments
  • Player Registration: Universal registration system for players
  • Image Gallery: Upload and manage tournament photos via Google Drive
  • Admin Panel: Complete admin interface for content management
  • Real-time Updates: Dynamic content loading with caching
  • Dark/Light Mode: Full theme support using shadcn/ui

๐Ÿ› ๏ธ Tech Stack

  • Frontend: Next.js 14, TypeScript, Tailwind CSS, shadcn/ui
  • Backend: Next.js API Routes, Prisma ORM
  • Database: MySQL (SQLite for development)
  • Authentication: NextAuth.js with role-based access
  • Email: Nodemailer with SMTP
  • Storage: Google Drive API integration
  • UI Components: shadcn/ui (no custom colors, full theme compliance)

๐Ÿ“ฑ Mobile Optimized

  • Touch-friendly interactions
  • Responsive image galleries
  • Mobile-first design
  • PWA support with service worker
  • Optimized loading and caching

๐ŸŽจ Design System

  • Colors: Only shadcn/ui color variables (no custom colors)
  • CSS: Single globals.css file
  • Components: Consistent shadcn/ui components
  • Themes: Perfect dark/light mode support

URLs

Prerequisites

  • Node.js 18+
  • pnpm (recommended) or npm
  • MySQL 8.0+ (or SQLite for development)
  • Git

Setup Commands

# Clone repository
git clone https://github.com/Recentlystarted/tunda-suports-club.git
cd tunda-suports-club

# Install dependencies
pnpm install

# Environment setup
cp .env.example .env
# Edit .env with your configuration

# Database setup
pnpm prisma generate
pnpm prisma migrate dev

# Start development server
pnpm dev

Visit http://localhost:3000 to see the application.


๐Ÿš€ Production Deployment

For OpenLiteSpeed VPS

This project includes a complete deployment solution for OpenLiteSpeed servers:

  1. Use the deployment script:

    .\deploy-to-openlitespeed.ps1 -Mode full
  2. Follow the VPS setup guide: See VPS_SETUP_GUIDE.md for detailed instructions

Environment Configuration

Create .env file with production values:

DATABASE_URL="mysql://username:password@localhost:3306/tunda_sports_club"
NEXTAUTH_SECRET="your-production-secret-key"
NEXTAUTH_URL="https://yourdomain.com"
SMTP_HOST="smtp.gmail.com"
SMTP_PORT=587
SMTP_USER="your-email@gmail.com"
SMTP_PASS="your-app-password"
EMAIL_FROM="your-email@gmail.com"

๐Ÿ“‚ Project Structure

tunda-sports-club/
โ”œโ”€โ”€ app/                          # Next.js App Router
โ”‚   โ”œโ”€โ”€ admin/                    # Admin dashboard
โ”‚   โ”‚   โ”œโ”€โ”€ auction-live/         # Live auction management
โ”‚   โ”‚   โ”œโ”€โ”€ tournaments/          # Tournament management
โ”‚   โ”‚   โ””โ”€โ”€ players/              # Player management
โ”‚   โ”œโ”€โ”€ auction/                  # Auction portals
โ”‚   โ”‚   โ””โ”€โ”€ [tournamentId]/       
โ”‚   โ”‚       โ”œโ”€โ”€ admin/            # Admin auction interface
โ”‚   โ”‚       โ””โ”€โ”€ owner/            # Team owner interface
โ”‚   โ”œโ”€โ”€ api/                      # API routes
โ”‚   โ”‚   โ”œโ”€โ”€ tournaments/          # Tournament APIs
โ”‚   โ”‚   โ””โ”€โ”€ auth/                 # Authentication APIs
โ”‚   โ””โ”€โ”€ tournament/               # Public tournament pages
โ”œโ”€โ”€ components/                   # React components
โ”‚   โ”œโ”€โ”€ ui/                       # shadcn/ui components
โ”‚   โ””โ”€โ”€ registration/             # Auction components
โ”œโ”€โ”€ prisma/                       # Database schema & migrations
โ”œโ”€โ”€ lib/                          # Utility functions
โ””โ”€โ”€ public/                       # Static assets

๐ŸŽฎ Usage Guide

Admin Users

  • Access: /admin
  • Create and manage tournaments
  • Conduct live auctions with real-time controls
  • Monitor all system activities

Team Owners

  • Access: /auction/[tournamentId]/owner?token=SECURE_TOKEN
  • Register team and get admin verification
  • Participate in real-time bidding
  • Manage team composition

Players

  • Complete registration with detailed profiles
  • Join tournaments and track auction status
  • View team assignments

๐Ÿ”ง API Documentation

Core Auction APIs

GET  /api/tournaments/[id]/auction/live    # Live auction data
POST /api/tournaments/[id]/auction/live    # Manage auction
GET  /api/tournaments/[id]/auction/bid     # Bidding status
POST /api/tournaments/[id]/auction/bid     # Place bids

Tournament APIs

GET  /api/tournaments              # List tournaments
POST /api/tournaments              # Create tournament
GET  /api/tournaments/[id]         # Tournament details

๐Ÿ“ˆ Latest Updates (v2.0)

โœ… Real-Time Auction System Complete

  • Live bidding with 3-second auto-refresh
  • Fixed database relationships for proper team assignment
  • Enhanced UI/UX for admin and owner portals
  • Live budget tracking and team composition updates

โœ… Performance Optimizations

  • Fixed dynamic server usage errors
  • Optimized API routes for production
  • Clean build process with no compilation errors
  • Improved image handling

๐Ÿค Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/AmazingFeature)
  3. Commit changes (git commit -m 'Add AmazingFeature')
  4. Push to branch (git push origin feature/AmazingFeature)
  5. Open Pull Request

๐Ÿ“ License

MIT License - see LICENSE file for details.


๐Ÿ› Support


๐Ÿ™ Acknowledgments


Made with โค๏ธ for the cricket community in Tunda Village, Gujarat

๐Ÿ Ready for Live Cricket Auctions! โšก

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors