This page documents all available scripts in the OOOC Fête Finder project. All commands useDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/KingPsychopath/oooc-fete-finder/llms.txt
Use this file to discover all available pages before exploring further.
pnpm as the package manager.
Development
Start development server
- Port: Default 3000
- Hot reload: Enabled
- Turbopack: Optimized bundler for development
Build production bundle
The build uses
--webpack flag explicitly. Turbopack is used only for development.Start production server
pnpm build first.
Testing
Run all tests
- Unit tests in
__tests__/unit/ - Integration tests in
__tests__/integration/ - Coverage tracked for data management, Postgres, and auth features
Watch mode
Watch mode is ideal during active development. It provides immediate feedback on test failures.
Coverage report
- Text summary in terminal
- HTML report in
coverage/directory
features/data-management/**/*.tslib/platform/postgres/**/*.tsfeatures/auth/**/*.ts
Code Quality
Linting
lint:fix variant automatically fixes auto-fixable issues.
Formatting
Combined fix
--write flag to:
- Lint and auto-fix issues
- Format code
- Apply safe fixes
Dead Code Detection
Find unused exports
.next/ build artifacts.
Database Operations
Bootstrap Postgres store
- Creates
app_kv_storetable - Creates
app_event_store_columnstable - Creates
app_event_store_rowstable - Creates
app_event_store_metatable - Creates
app_event_store_settingstable - Seeds data from
data/events.csvor legacy KV store - Initializes users collection
This script is safe to run multiple times. It checks for existing data and skips seeding if tables already contain rows.
scripts/bootstrap-postgres-store.mjs
Seed featured schedule
Featured column values from event rows into the dedicated app_featured_event_schedule table.
What it does:
- Creates
app_featured_event_scheduletable - Extracts events with non-empty
featuredvalues - Inserts schedule entries (skips existing)
- Recomputes effective start/end times using queue allocation
- Max 3 concurrent featured events
- Default duration: 48 hours
- Allocates slots to minimize overlap
scripts/seed-featured-schedule-from-legacy.mjs
Database CLI
Available commands
Available commands
status
Shows Postgres connectivity, KV key counts, and event table row counts.keys [prefix] [limit]
Lists keys from
Fetches and displays the value for a specific KV key.rows
Compares row counts between legacy KV CSV and event tables to verify migration integrity.sample [count]
Prints random event rows from the table store (or legacy KV CSV if tables are empty). Default count: 2, max: 20.health [baseUrl]
Calls
Shows usage information.
Shows Postgres connectivity, KV key counts, and event table row counts.keys [prefix] [limit]
Lists keys from
app_kv_store. Optionally filter by prefix and limit results (default: 100, max: 500).get <key>Fetches and displays the value for a specific KV key.rows
Compares row counts between legacy KV CSV and event tables to verify migration integrity.sample [count]
Prints random event rows from the table store (or legacy KV CSV if tables are empty). Default count: 2, max: 20.health [baseUrl]
Calls
/api/admin/health endpoint. Requires ADMIN_KEY environment variable.helpShows usage information.
scripts/db-cli.mjs
Diagnostics
CSV structure diagnosis
- Rows with extra columns (unquoted commas)
- Rows with missing columns (line breaks inside cells)
- Parser errors
- Header column count
- Total data rows
- Mismatch count and breakdown
- Row previews for first N mismatches
- Public URL (from
REMOTE_CSV_URLor explicit--url) - Google Sheets API (requires
GOOGLE_SERVICE_ACCOUNT_KEY)
scripts/csv-structure-diagnose.mjs
Health check
- Postgres connection
- KV store keys and timestamps
- Legacy CSV row counts (if present)
- Event table row counts
- Table/metadata alignment
- Admin health endpoint (
/api/admin/health) - Postgres KV endpoint (
/api/admin/postgres/kv)
DATABASE_URL(required)ADMIN_KEY(optional, for API checks)BASE_URL(optional, defaults tohttp://localhost:3000)
scripts/health-check.mjs
Type Checking
While not inpackage.json scripts, you can run TypeScript type checking:
Environment Setup
Before running scripts, ensure you have:-
Required environment variables:
AUTH_SECRET(32+ character random string)DATABASE_URL(Postgres connection string)DATA_MODE=remote(for production)
-
Optional for Google integrations:
REMOTE_CSV_URLGOOGLE_SHEET_IDGOOGLE_SERVICE_ACCOUNT_KEYGOOGLE_MAPS_API_KEY