A web app to track board game results with friends. Records player rankings (1st, 2nd, 3rd, etc.) and optional scores for each game session.
- Runtime: Bun
- Framework: Next.js 16 (App Router)
- Auth: Auth.js v5 (Google OAuth)
- Database: Google Sheets (via Service Account)
- Styling: Tailwind CSS v4
- Linting: Biome
- Bun installed
- Google Cloud project with:
- OAuth 2.0 credentials (Client ID & Secret)
- Service Account with Sheets API access
- A Google Sheet shared with the Service Account
Copy .env.example to .env.local and fill in:
# Auth.js
AUTH_SECRET=your-secret-key
AUTH_GOOGLE_ID=your-oauth-client-id
AUTH_GOOGLE_SECRET=your-oauth-client-secret
# Google Sheets
GOOGLE_SERVICE_ACCOUNT_EMAIL=your-service-account@project.iam.gserviceaccount.com
GOOGLE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"
GOOGLE_SHEET_ID=your-google-sheet-id
# BGG (optional): game search and covers. Register at https://boardgamegeek.com/applications
BGG_API_TOKEN=your-bgg-bearer-tokenBGG token: The XML API requires a Bearer token. Register your app at boardgamegeek.com/applications (choose non-commercial for PlayLog), wait for approval, then create a Token and set BGG_API_TOKEN. Without it, BGG search and covers will not work.
# Install dependencies
bun install
# Start dev server
bun run dev| Command | Description |
|---|---|
bun run dev |
Start dev server |
bun run build |
Production build |
bun run start |
Start production server |
bun run lint |
Check code with Biome |
bun run lint:fix |
Auto-fix lint issues |
bun run format |
Format code with Biome |
See docs/ARCHITECTURE.md for details on:
- Vertical slicing structure
- Container/Presentation pattern
- Repository and Use Case patterns
- Data flow diagrams
- Google Sheets data model
- App uses Google OAuth (test mode: add users in Google Cloud Console)
- Google Sheet is private, accessed via Service Account
- Only authenticated users can view/create plays
Crea un repositorio en GitHub (o GitLab/Bitbucket), luego:
git add .
git commit -m "Initial commit" # si aún no has hecho commit
git remote add origin https://github.com/TU_USUARIO/playlog.git
git branch -M main
git push -u origin mainSustituye TU_USUARIO/playlog por tu usuario y nombre del repo.
- Entra en vercel.com e inicia sesión (con GitHub).
- Add New → Project → importa el repo
playlog. - Environment Variables: añade las mismas que en
.env.local:AUTH_SECRETAUTH_GOOGLE_IDAUTH_GOOGLE_SECRETGOOGLE_SERVICE_ACCOUNT_EMAILGOOGLE_PRIVATE_KEY(pega la clave completa; en Vercel no hace falta escapar\n)GOOGLE_SHEET_IDAUTH_TRUST_HOST=true(recomendado para Auth.js en Vercel)
- Deploy. Vercel detecta Next.js y usa
bun run buildsi hace falta.
Tras el deploy, en Google Cloud Console añade la URL de producción de Vercel (ej. https://playlog-xxx.vercel.app) a los Authorized redirect URIs de tu OAuth client.