Skip to content

345678o/anamika

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

MLRIT College Sports Hub

A comprehensive sports facility booking and management system for MLR Institute of Technology (MLRIT) students and staff.

🏟️ Overview

The MLRIT College Sports Hub is a modern React-based web application designed to streamline multi-sport facility bookings, team formation, and tournament management at MLRIT college. The system provides an intuitive interface for students to book facilities for badminton, tennis, basketball, volleyball, cricket, and football, find teammates, participate in tournaments, and manage their sports activities.

✨ Features

πŸ” Authentication System

  • User Registration: Students can sign up with their college credentials
  • Secure Login: Email-based authentication with password protection
  • User Types: Support for BTech, MBA, and Medical students with different access levels
  • Session Management: Persistent login sessions with localStorage

🏟️ Multi-Sport Facility Booking System

  • 6 Sports Supported: Badminton, Tennis, Basketball, Volleyball, Cricket, and Football
  • 20+ Facilities: Various courts and grounds across different sports
  • Real-time Availability: Live facility availability checking for all sports
  • Smart Restrictions: Sport-specific time-based and student-type-based access rules
  • Booking Management: Create, view, and cancel bookings across all sports
  • Conflict Prevention: Prevents double bookings and enforces sport-specific booking limits
  • Booking History: Complete history of past and upcoming bookings across all sports

πŸ‘₯ Team Formation

  • Player Registration: Register as a player looking for teammates
  • Skill-based Matching: Match players based on skill levels (Beginner, Intermediate, Advanced)
  • Availability Coordination: Schedule-based team formation
  • Team Management: Create and manage badminton teams

πŸ† Tournament Management

  • Tournament Listings: View upcoming tournaments and events
  • Tournament Suggestions: Students can suggest new tournaments
  • Registration System: Easy tournament registration process
  • Event Details: Comprehensive tournament information including dates, locations, and descriptions

πŸ“± User Dashboard

  • Profile Management: Complete user profile with statistics
  • Booking Analytics: Personal booking statistics and favorite courts
  • Activity History: Track all sports-related activities
  • Settings: Update personal information and preferences

πŸ—οΈ Technical Architecture

Frontend Stack

  • React 18 with TypeScript for type safety
  • React Router v6 for navigation
  • Context API + Hooks for state management
  • CSS Modules for styling
  • Responsive Design for mobile compatibility

Key Technologies

  • TypeScript: Enhanced development experience with type safety
  • React Hooks: Modern React patterns for state and lifecycle management
  • Local Storage: Client-side data persistence for demo purposes
  • Date-fns: Date manipulation and formatting
  • CSS Grid & Flexbox: Modern layout techniques
  • Modular Sports Configuration: Easily configurable sports rules and facilities

πŸš€ Getting Started

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn package manager

Installation

  1. Clone the repository
git clone <repository-url>
cd mlrit-sports-hub
  1. Install dependencies
npm install
  1. Start the development server
npm start
  1. Access the application
  • Open your browser and navigate to http://localhost:3000
  • The app will automatically reload when you make changes

Demo Credentials

For testing purposes, you can use these demo credentials:

  • Email: student@mlrit.ac.in
  • Password: password123

Or register a new account using any @mlrit.ac.in email address.

πŸ“ Project Structure

mlrit-sports-hub/
β”œβ”€β”€ public/                     # Static assets
β”‚   β”œβ”€β”€ index.html             # Main HTML template
β”‚   └── manifest.json          # PWA manifest
β”œβ”€β”€ src/                       # Source code
β”‚   β”œβ”€β”€ components/            # Reusable components
β”‚   β”‚   β”œβ”€β”€ Navbar/           # Navigation component
β”‚   β”‚   β”œβ”€β”€ ProtectedRoute/   # Route protection
β”‚   β”‚   └── BookingItem/      # Booking display component
β”‚   β”œβ”€β”€ contexts/             # React contexts
β”‚   β”‚   β”œβ”€β”€ AuthContext.tsx   # Authentication state
β”‚   β”‚   └── BookingContext.tsx # Multi-sport booking state
β”‚   β”œβ”€β”€ data/                 # Configuration and data
β”‚   β”‚   └── sportsConfig.ts   # Sports facilities configuration
β”‚   β”œβ”€β”€ pages/                # Page components
β”‚   β”‚   β”œβ”€β”€ Home/            # Landing page
β”‚   β”‚   β”œβ”€β”€ Auth/            # Login/Register
β”‚   β”‚   β”œβ”€β”€ Booking/         # Legacy badminton booking
β”‚   β”‚   β”œβ”€β”€ MultiSportBooking/ # Multi-sport facility booking
β”‚   β”‚   β”œβ”€β”€ Profile/         # User profile
β”‚   β”‚   β”œβ”€β”€ Team/            # Team formation
β”‚   β”‚   β”œβ”€β”€ Tournaments/     # Tournament management
β”‚   β”‚   β”œβ”€β”€ About/           # About page
β”‚   β”‚   β”œβ”€β”€ Contact/         # Contact information
β”‚   β”‚   └── Rules/           # Rules and regulations
β”‚   β”œβ”€β”€ types/               # TypeScript type definitions
β”‚   β”œβ”€β”€ utils/               # Utility functions
β”‚   β”‚   └── demoData.ts      # Demo data initialization
β”‚   β”œβ”€β”€ App.tsx             # Main app component
β”‚   β”œβ”€β”€ App.css             # Global styles
β”‚   β”œβ”€β”€ index.tsx           # App entry point
β”‚   └── index.css           # Base styles
β”œβ”€β”€ package.json            # Dependencies and scripts
└── README.md              # This file

🎯 Usage Guide

For Students

  1. Registration

    • Visit the login page and click "Sign Up"
    • Fill in your college details (Roll Number, Email, Phone, etc.)
    • Select your student type (BTech/MBA/Medical)
    • Create a secure password
  2. Booking a Court

    • Navigate to "Book Court"
    • Select your preferred date and time
    • Choose an available court (restrictions apply based on student type)
    • Confirm your booking details
    • Receive booking confirmation
  3. Finding Teammates

    • Go to "Find Team"
    • Register your availability and skill level
    • Browse other players looking for teammates
    • Connect with compatible players
  4. Tournament Participation

    • Check "Tournaments" for upcoming events
    • Submit tournament suggestions
    • Register for tournaments when available

🏟️ Multi-Sport Facilities

Available Sports

  1. 🏸 Badminton - 10 indoor courts with professional setup
  2. 🎾 Tennis - 4 outdoor courts with synthetic surface
  3. πŸ€ Basketball - 3 courts (1 indoor, 2 outdoor)
  4. 🏐 Volleyball - 1 indoor court with professional setup
  5. 🏏 Cricket - 1 main ground + practice nets area
  6. ⚽ Football - 1 main ground with natural grass

Sport-Specific Rules

Each sport has its own booking rules and restrictions:

  • Badminton: Max 1 booking/day, 3 hours max, operates 7 AM - 10 PM
  • Tennis: Max 1 booking/day, 2 hours max, operates 6 AM - 8 PM
  • Basketball: Max 1 booking/day, 2 hours max, operates 6 AM - 9 PM
  • Volleyball: Max 1 booking/day, 2 hours max, operates 7 AM - 9 PM
  • Cricket: Max 1 booking/day, 4 hours max, operates 6 AM - 6 PM
  • Football: Max 1 booking/day, 3 hours max, operates 6 AM - 7 PM

🏸 Booking Rules

General Rules

  • One booking per day: Each student can book maximum one court per day
  • Advance booking: Bookings must be made at least 10 minutes before slot time
  • Cancellation policy: Cancel at least 30 minutes before your slot
  • Maximum duration: 3 hours per booking

Time-based Restrictions

  • 1:00 PM - 3:00 PM: Restricted for BTech/MBA students
  • 3:00 PM - 6:00 PM: Courts 1-2 restricted for BTech/MBA students
  • 3:00 PM - 6:00 PM: Courts 3-10 restricted for Medical students

Student Type Access

  • BTech Students: Limited access during peak hours
  • MBA Students: Limited access during peak hours
  • Medical Students: Priority access to courts 1-2 during afternoon hours

πŸ§ͺ Testing

Available Scripts

# Run all tests
npm test

# Run unit tests
npm run test:unit

# Run component tests
npm run test:components

# Run property-based tests
npm run test:properties

Testing Strategy

  • Unit Tests: Individual component and function testing
  • Integration Tests: Component interaction testing
  • Property-Based Tests: Using fast-check for robust testing
  • User Interaction Tests: React Testing Library for user behavior

πŸ“± Mobile Responsiveness

The application is fully responsive and optimized for:

  • Desktop: Full-featured interface with all functionality
  • Tablet: Adapted layout with touch-friendly controls
  • Mobile: Streamlined interface with essential features
  • Progressive Web App: Can be installed on mobile devices

πŸ”’ Security Features

  • Input Validation: Comprehensive validation on both client and server
  • XSS Protection: Content Security Policy and input encoding
  • Authentication: Secure session handling with automatic expiry
  • Data Privacy: Minimal data collection and secure storage

🚧 Current Limitations

This is a frontend-only demo application with the following limitations:

  • Data Persistence: Uses localStorage instead of a real database
  • Authentication: Simulated authentication without real security
  • Real-time Updates: No WebSocket integration for live updates
  • File Uploads: No image upload functionality
  • Email Notifications: No actual email sending capability

πŸ›£οΈ Future Roadmap

Phase 1: Backend Integration

  • Node.js/Express backend development
  • MongoDB database integration
  • JWT-based authentication
  • RESTful API development

Phase 2: Enhanced Features

  • Real-time notifications
  • Advanced analytics dashboard
  • Mobile app development
  • Integration with college ERP system

Phase 3: Advanced Features

  • AI-powered scheduling suggestions
  • Performance tracking and insights
  • Advanced tournament management
  • Multi-sport facility support

🀝 Contributing

Development Workflow

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

Code Standards

  • TypeScript: Strict type checking enabled
  • ESLint: Code linting and formatting
  • React: Functional components with hooks
  • CSS: BEM methodology for class naming
  • Testing: Comprehensive test coverage required

πŸ“ž Support & Contact

Technical Support

Sports Department

  • Email: sportsdesk@mlrit.ac.in
  • Location: MLRIT Indoor Stadium, Main Campus
  • Address: Dundigal, Hyderabad, Telangana 500043

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • MLRIT Administration: For supporting the digital transformation initiative
  • Sports Department: For providing requirements and feedback
  • Student Community: For testing and feature suggestions
  • Development Team: For their dedication to creating this platform

Made with ❀️ for MLRIT College Community

For more information or to report issues, please contact the development team or create an issue in the repository.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors