A sports league management portal for tracking teams, players, matches, and standings — built with Next.js and Payload CMS.
- Framework: Next.js 16 (React 19, TypeScript)
- CMS: Payload CMS 3
- Database: MongoDB
- Storage: Vercel Blob
- Styling: Tailwind CSS 4, Radix UI (shadcn/ui)
- State: Zustand, TanStack React Query
- Package Manager: Yarn 4
- Node.js 18+
- Yarn
- MongoDB instance (local or Atlas)
- Vercel Blob store (public access)
yarn installCreate a .env.local file in the project root:
DATABASE_URL=your_mongodb_connection_string
PAYLOAD_SECRET=your_secret_key
BLOB_READ_WRITE_TOKEN=your_vercel_blob_tokenyarn seed:super-admin
yarn seed:teamsyarn devThe app will be available at http://localhost:3000.
| Command | Description |
|---|---|
yarn dev |
Start development server |
yarn build |
Build for production |
yarn start |
Start production server |
yarn lint |
Run ESLint |
yarn seed:super-admin |
Seed super admin user |
yarn seed:teams |
Seed teams data |
src/
├── app/
│ ├── (client)/ # Public-facing routes (table, login, team pages)
│ └── (payload)/ # Payload CMS admin panel (/admin)
├── collections/ # Payload collection schemas (Users, Teams, Players, Matches, Media)
├── components/ # React components (ui, auth, teams, matches, stats)
├── hooks/ # Custom React hooks
├── lib/ # API clients & utilities
├── store/ # Zustand state management
├── types/ # TypeScript type definitions
└── styles/ # Global styles
The project is deployed on Vercel. Push to main to trigger a production deployment.
Required Vercel environment variables:
DATABASE_URLPAYLOAD_SECRETBLOB_READ_WRITE_TOKEN