# BSL Season V Tournament Website

Static premium website for Badminton Shots League Season V, organized by BSLACA Sports Pvt. Ltd.

## What is included

- Premium responsive one-page tournament website: `index.html`
- Registration form with validation, doubles partner logic, payment screenshot requirement, age calculation, and confirmation modal
- Confirmation page: `success.html`
- Optional static admin dashboard: `admin.html`
- Google Sheets and Drive upload backend template: `google-apps-script/Code.gs`
- Success email template: `templates/success-email.html`
- No server-side app architecture required for hosting

## Asset replacement

Place the official files here:

- `assets/bsl-logo.png`
- `assets/bsl-season-v-flyer.png` - shareable announcement flyer
- `assets/bsl-season-v-date-flyer.png` - shareable date flyer
- `assets/bsl-season-v-flyer.svg` - editable announcement flyer source
- `assets/bsl-season-v-date-flyer.svg` - editable date flyer source
- `assets/payment-qr.png`

The gallery is wired to these folders:

- `gallery/tournaments/1.png` through `gallery/tournaments/39.png`
- `gallery/winners/1.png` through `gallery/winners/16.png`
- `gallery/bslteam/1.png` through `gallery/bslteam/56.png`
- `gallery/badminton-shots-logo.png`

The page lazy-loads images and shows them in batches so the large media library does not load all at once.

## Google Sheets setup

1. Create a Google Sheet for registrations.
2. Open Extensions > Apps Script.
3. Paste `google-apps-script/Code.gs`.
4. In Apps Script, open Project Settings > Script Properties and add:
   - `SPREADSHEET_ID`: your Google Sheet ID
   - `ADMIN_TOKEN`: a strong private token for `admin.html`
   - `UPLOAD_FOLDER_ID`: optional Drive folder ID for uploads
   - `MAKE_UPLOADS_PUBLIC`: optional, set `true` if the static admin page should open screenshot links directly
5. Deploy > New deployment > Web app.
6. Set "Execute as" to "Me".
7. Set "Who has access" to "Anyone".
8. Copy the Web App URL.
9. Paste the URL into `js/main.js` in `googleScriptUrl`.

The public form submits with a no-CORS POST so it can work from static hosting. The admin dashboard uses JSONP-style reads and mutations with `ADMIN_TOKEN`.

## Admin dashboard

Open `admin.html`, paste the Google Apps Script URL and admin token, then click Save and Load Data.

Features:

- Search registrations
- Filter by category
- Filter verified and pending payments
- Mark payment verified or pending
- Export CSV
- Download Excel-compatible `.xls`
- View uploaded file URLs when Apps Script returns Drive links
- Delete registrations from the sheet

## Static deployment

Upload the full `bslseason5` folder to any static host:

- Netlify
- Vercel static output
- GitHub Pages
- Cloudflare Pages
- AWS S3 + CloudFront
- Any cPanel static hosting

Use `index.html` as the entry file. No Node.js, database, or server process is required.

## Performance notes

- Bootstrap 5.3.8 is loaded from jsDelivr CDN.
- The production UI uses a custom static CSS layer instead of Tailwind's browser compiler, because Tailwind's official Play CDN is development-only.
- Animations use CSS and small vanilla JavaScript only.
- Images are lazy or placeholder-driven and can be optimized before upload.
- Uploaded files are capped at 5 MB by the frontend.

## Before going live

- Replace all official assets.
- Configure the Google Apps Script URL.
- Submit one test registration.
- Confirm a row appears in Google Sheets.
- Confirm the payment screenshot lands in Drive.
- Open `admin.html`, load data, mark one payment verified, and export CSV.
- Update footer social links.
