Skip to content

WedgieTracker/wedgietracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

161 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Logo for WedgieTracker

A modern web application for tracking basketball wedgies.

Tech Stack

Features

  • 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

Project Structure

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

Local Development Setup

  1. Clone the repository:
git clone https://github.com/wedgietracker/wedgietracker.git
cd wedgietracker
  1. Install dependencies:
pnpm install
  1. Create a .env file based on .env.example and add your environment variables:
cp .env.example .env
  1. 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 .env at 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
  2. Start the development server:

pnpm dev

Available Scripts

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

Development Workflow

Pre-commit Hooks

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

Dependency Management

Dependencies are kept up to date with Dependabot, configured to open weekly PRs grouping minor and patch updates together.

Testing

Tests are written with Vitest and @testing-library/react.

pnpm test          # Run all tests
pnpm test:watch    # Watch mode
pnpm test:coverage # With coverage report

Test files use the *.test.ts / *.test.tsx convention and live alongside the code they test.

CI/CD

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).

Contributing

Contributions are welcome! Please feel free to submit a Pull Request or open an issue. See our CONTRIBUTING.md for more details.

License

Created by riccardo.lol

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

About

A modern web application for tracking basketball wedgies.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Contributors