A modern web application for tracking basketball wedgies.
- Next.js 16 - React 19 framework
- Auth.js 5 - Authentication
- Drizzle ORM - Database ORM
- Turso - SQLite database
- Tailwind CSS 4 - Styling
- tRPC 11 - Type-safe API
- TypeScript 6 - Type safety
- tsgo (TypeScript native) - Fast type checking
- oxlint - Fast linting (Rust-based)
- Vitest - Testing
- Vercel - Deployment
- Real-time wedgie tracking and statistics
- Authentication with Google
- Instagram, Twitter, Bluesky, and YouTube integration for sharing wedgies
- Cloudinary media management
- Newsletter subscription with Mailchimp
- Stripe integration for store purchases
- Printful integration for t-shirt orders
- Responsive design with custom animations
- Admin dashboard for managing wedgies
src/
├── app/ # Next.js App Router pages
│ ├── admin/ # Admin dashboard pages
│ ├── api/ # API routes (stripe, social media, etc.)
│ ├── blog/ # Blog pages
│ ├── store/ # Store pages
│ └── ... # Public pages (standings, all-wedgies, etc.)
├── components/
│ ├── admin/ # Admin-specific components
│ ├── home/ # Homepage components (Stats, Wave, WedgieList)
│ ├── layout/ # Layout components (Header, Footer, PageLayout)
│ ├── shared/ # Shared reusable components (Loader, Cta, etc.)
│ ├── standings/ # Standings page components
│ └── ui/ # shadcn/ui components
├── config/ # App configuration (metadata, dev routes)
├── context/ # React context providers
├── hooks/ # Custom React hooks
├── server/
│ ├── api/ # tRPC routers and configuration
│ ├── auth/ # Auth.js configuration
│ ├── services/ # External service clients (Stripe, Cloudinary, etc.)
│ └── ... # DB, schema, cache, helpers
├── types/ # Shared TypeScript types
└── utils/ # Pure utility functions
- Clone the repository:
git clone https://github.com/wedgietracker/wedgietracker.git
cd wedgietracker- Install dependencies:
pnpm install- Create a
.envfile based on.env.exampleand add your environment variables:
cp .env.example .env-
Set up the database. Two paths depending on access:
Without Turso access (recommended for new contributors). Bootstrap a local SQLite copy from the committed seed:
sh/start-database.sh
Then point
.envat the local file:TURSO_DATABASE_URL="file:./local.db" TURSO_AUTH_TOKEN=""With Turso access. Push the schema to your Turso database:
pnpm db:push
-
Start the development server:
pnpm dev| Script | Description |
|---|---|
pnpm dev |
Start dev server with Turbo and HTTPS |
pnpm build |
Production build |
pnpm start |
Start production server |
pnpm lint |
Run oxlint |
pnpm lint:fix |
Run oxlint with auto-fix |
pnpm typecheck |
Run type checking with tsgo (native) |
pnpm format:check |
Check Prettier formatting |
pnpm format:write |
Fix Prettier formatting |
pnpm test |
Run tests once |
pnpm test:watch |
Run tests in watch mode |
pnpm test:coverage |
Run tests with coverage |
pnpm check |
Run oxlint + tsgo + tests |
pnpm db:push |
Push schema changes to database |
pnpm db:generate |
Generate database migrations |
pnpm db:studio |
Open Drizzle Studio |
pnpm db:dump |
Refresh database-backups/seed.sql |
This project uses lefthook to enforce code quality on every commit:
- TypeScript/TSX files: oxlint auto-fix + Prettier formatting
- JS/JSON/MD/CSS files: Prettier formatting
Dependencies are kept up to date with Dependabot, configured to open weekly PRs grouping minor and patch updates together.
Tests are written with Vitest and @testing-library/react.
pnpm test # Run all tests
pnpm test:watch # Watch mode
pnpm test:coverage # With coverage reportTest files use the *.test.ts / *.test.tsx convention and live alongside the code they test.
PR Checks (opt-in): Add the run-ci label to a PR to trigger the CI workflow, which runs type checking, linting, format checking, and tests. You can also use these PR comment commands:
| Command | Description |
|---|---|
/ci |
Add the run-ci label to trigger the CI workflow |
/preview |
Push the PR branch to the deploy repo for a preview |
Both commands are restricted to repo owners, members, and collaborators.
Auto-labeling: PRs are automatically labeled based on changed files (e.g. ci, docs, tests, admin, api, components, server, config, dependencies).
Releases: Automatic semantic versioning on push to main based on commit message prefixes (feat: for minor, BREAKING for major, otherwise patch).
Contributions are welcome! Please feel free to submit a Pull Request or open an issue. See our CONTRIBUTING.md for more details.
Created by riccardo.lol
This project is licensed under the MIT License - see the LICENSE file for details.