Skip to content

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

400 Commits

Folders and files

Repository files navigation

🏟️ CSE Hit The Grounds

The Main Website

Public pages, team listings, registration, and an admin area, all in one place.


Laravel Livewire Tailwind CSS Vite PHP


Prerequisites · Setup · Run · Commands

Access development from another device

Set VITE_DEV_HOST in .env to your computer's LAN IPv4 address (use ipconfig on Windows), then run composer run dev. On another device on the same network, open http://<your-LAN-IP>:8000.

The development servers listen on ports 8000 (Laravel) and 5173 (Vite). Allow those ports through your firewall for your trusted local network if needed. Update VITE_DEV_HOST and restart development if your IP changes. Some shared Wi-Fi networks block connections between devices.


✨ About

The main website for CSE Hit The Grounds, built with Laravel 12, Livewire / Volt + Flux, and Tailwind CSS 4 + daisyUI (bundled with Vite).

It includes:

  • 🌐 Public pages: home, timeline, rules, awards, partners, memories
  • 🎓 Teams: university and industry team listings
  • 📝 Registration: company and team sign-up
  • 🔐 Admin area: for managing teams

📋 Prerequisites

Requirement Notes
PHP 8.2+ with mbstring, xml, dom, and sqlite3 extensions
Composer PHP dependency manager
Node.js & NPM for the Vite / Tailwind frontend
SQLite (default) or MySQL / PostgreSQL

🛠️ Local Development Setup

1️⃣ Clone the Repository

git clone <repository-url>
cd main-website

2️⃣ Install System Extensions (Ubuntu/Debian)

If you hit missing platform extension errors, install them:

sudo apt update
sudo apt install -y php8.3-xml php8.3-mbstring php8.3-sqlite3 composer nodejs npm

3️⃣ Install Dependencies

composer install
npm install

4️⃣ Environment Configuration

cp .env.example .env

The default .env.example uses SQLite. Create the database file:

touch database/database.sqlite

Note

For MySQL/PostgreSQL, update the DB_* values in .env instead.

5️⃣ Generate Application Key

php artisan key:generate

6️⃣ Run Migrations and Seed

php artisan migrate --seed

Note

The seeder creates a test user (test@example.com) and an admin user (admin@example.com). To promote any other user, run php artisan user:set-admin <email>.


🚀 Running the Application

Start the server, queue worker, log viewer, and Vite dev server together:

composer run dev

The site is served at http://localhost:8000.


🧰 Useful Commands

Task Command
Migrate php artisan migrate
Fresh migration + seed php artisan migrate:fresh --seed
Clear caches php artisan optimize:clear
Run tests composer test (or php artisan test)
Build production assets npm run build

Tournament cap rankings use total runs followed by higher strike rate, and total wickets followed by lower economy. Economy uses each match's four- or six-ball over length; partial overs are calculated from legal balls without rounding. Equal rates remain joint ranks. If any player in a tied-total group has incomplete rate inputs, that group remains tied until the figures are complete.

After applying the player ranking rates migration to an existing installation, rebuild the derived summaries for each existing tournament year before serving the updated stats (use the intended database configuration):

php artisan migrate
php artisan tournament:rebuild-summaries 2026 --apply
npm run build

New publications, corrections, and withdrawals recalculate these summaries automatically.


Optional tournament Playoffs

Run php artisan migrate when deploying this change. Playoffs default to off for every tournament year. With the tournament enabled, an admin can use Admin Dashboard > Tournament: Playoffs > Enable Playoffs > Save tournament settings.

When enabled, scorers can select Playoffs under Qualification & bracket and schedule any number of matches between saved group qualifiers, including repeat appearances. Saved group qualifiers and teams with a published, finished Playoff win are eligible for quarter-finals. Group qualifiers can enter directly without playing or winning a Playoff. Semi-finals and the final follow the existing rules. Group qualification has no team limit while Playoffs is enabled; when disabled, the existing eight-team limit applies. Reduce saved qualifiers to eight or fewer before turning Playoffs off; no qualifiers are removed automatically.

Playoffs appear in the public Matches tab and stage filters, and published player figures contribute to Stats. They do not appear in group tables or the public bracket. Turning the switch off hides Playoff fixtures and controls, blocks their scoring actions, and excludes their figures from derived player totals. Saved matches and player figures are retained and included again when enabled. Settings changes refresh public pages through the existing tournament revision polling.

The migration refuses rollback while Playoff match history exists; use the dashboard switch to disable the feature without discarding history.


Made with ❤️ for CSE Hit The Grounds

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages