diff --git a/.env.example b/.env.example index 6634f7a..75b3d32 100644 --- a/.env.example +++ b/.env.example @@ -1,54 +1,20 @@ -# Pantry - Environment Variables Template -# Copy to .env.development for local development -# Copy to .env.production for production deployment +# Supabase Local Development Environment +# Copy this file to .env and adjust as needed -# ============================================== -# Supabase Configuration -# ============================================== +# PostgreSQL +POSTGRES_PASSWORD=postgres -# Supabase API URL (from Coolify service) -SUPABASE_URL=https://your-supabase-instance.example.com +# JWT Secret (generate with: openssl rand -base64 32) +# Default is fine for local dev, change for production +JWT_SECRET=super-secret-jwt-token-with-at-least-32-characters-long -# Supabase Anon Key (public, safe to expose to frontend) -SUPABASE_ANON_KEY=your-anon-key-here +# API Keys +# These are Supabase's default demo keys - OK for local development +# For production, generate new keys: https://supabase.com/docs/guides/self-hosting#api-keys +ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0 -# Supabase Service Role Key (SECRET - server-side only, never expose to frontend) -SUPABASE_SERVICE_ROLE_KEY=your-service-role-key-here +SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU -# JWT Secret (for Supabase Auth) -SUPABASE_JWT_SECRET=your-jwt-secret-here - -# Database Password (for direct PostgreSQL access if needed) -POSTGRES_PASSWORD=your-postgres-password-here - -# ============================================== -# Application Configuration -# ============================================== - -# Public app URL (where the Nuxt app is hosted) -PUBLIC_APP_URL=http://localhost:3000 - -# Node environment -NODE_ENV=development - -# ============================================== -# External APIs -# ============================================== - -# Open Food Facts API (no auth required) -OPENFOODFACTS_API_URL=https://world.openfoodfacts.org - -# ============================================== -# Optional: Auth Providers (OIDC) -# ============================================== - -# Google OAuth (optional - configure in Supabase if needed) -AUTH_GOOGLE_ENABLED=false -AUTH_GOOGLE_CLIENT_ID= -AUTH_GOOGLE_SECRET= - -# Authentik (optional) -AUTH_AUTHENTIK_ENABLED=false -AUTH_AUTHENTIK_URL= -AUTH_AUTHENTIK_CLIENT_ID= -AUTH_AUTHENTIK_SECRET= +# Nuxt App Configuration (also copy to app/.env) +NUXT_PUBLIC_SUPABASE_URL=http://localhost:54321 +NUXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0 diff --git a/.env.example.bak b/.env.example.bak new file mode 100644 index 0000000..6634f7a --- /dev/null +++ b/.env.example.bak @@ -0,0 +1,54 @@ +# Pantry - Environment Variables Template +# Copy to .env.development for local development +# Copy to .env.production for production deployment + +# ============================================== +# Supabase Configuration +# ============================================== + +# Supabase API URL (from Coolify service) +SUPABASE_URL=https://your-supabase-instance.example.com + +# Supabase Anon Key (public, safe to expose to frontend) +SUPABASE_ANON_KEY=your-anon-key-here + +# Supabase Service Role Key (SECRET - server-side only, never expose to frontend) +SUPABASE_SERVICE_ROLE_KEY=your-service-role-key-here + +# JWT Secret (for Supabase Auth) +SUPABASE_JWT_SECRET=your-jwt-secret-here + +# Database Password (for direct PostgreSQL access if needed) +POSTGRES_PASSWORD=your-postgres-password-here + +# ============================================== +# Application Configuration +# ============================================== + +# Public app URL (where the Nuxt app is hosted) +PUBLIC_APP_URL=http://localhost:3000 + +# Node environment +NODE_ENV=development + +# ============================================== +# External APIs +# ============================================== + +# Open Food Facts API (no auth required) +OPENFOODFACTS_API_URL=https://world.openfoodfacts.org + +# ============================================== +# Optional: Auth Providers (OIDC) +# ============================================== + +# Google OAuth (optional - configure in Supabase if needed) +AUTH_GOOGLE_ENABLED=false +AUTH_GOOGLE_CLIENT_ID= +AUTH_GOOGLE_SECRET= + +# Authentik (optional) +AUTH_AUTHENTIK_ENABLED=false +AUTH_AUTHENTIK_URL= +AUTH_AUTHENTIK_CLIENT_ID= +AUTH_AUTHENTIK_SECRET= diff --git a/README.md b/README.md index 0189705..7b1dd70 100644 --- a/README.md +++ b/README.md @@ -22,18 +22,28 @@ A simple, modern kitchen inventory app that the whole family can actually use. B - πŸ”’ **Self-hosted** β€” Your data stays yours - 🌐 **Open Food Facts** β€” Auto-fill product data from barcodes -## πŸš€ Quick Start +## πŸš€ Quick Start (Local Development) ```bash -# Clone +# Clone repository git clone https://gitea.jeanlucmakiola.de/pantry-app/pantry.git +cd pantry -# Start services (Docker Compose) -docker-compose up -d - -# Access at http://localhost:3000 +# One-command startup +./dev.sh ``` +**What this does:** +1. Starts Supabase (PostgreSQL + API + Auth + Studio) +2. Installs frontend dependencies +3. Launches Nuxt dev server + +**Access:** +- App: `http://localhost:3000` +- Supabase Studio: `http://localhost:54323` + +**See [DEV_SETUP.md](DEV_SETUP.md) for detailed setup guide.** + ## πŸ“š Documentation - [**Project Plan**](docs/PROJECT_PLAN.md) β€” Vision, roadmap, phases @@ -73,18 +83,32 @@ pantry/ 3. **Extendable** β€” Clean architecture for future features 4. **Self-hosted first** β€” No SaaS plans, no lock-in -## πŸ“‹ MVP Status +## πŸ“‹ MVP Status (14/34 Complete - 41.2%) -**Target:** v0.1 (6-week sprint) +**Current Phase:** Week 2 βœ… Complete, Week 3 πŸ”„ In Progress + +βœ… **Week 1 - Foundation (6/6)** +- Database schema + RLS policies +- Nuxt 4 app scaffold +- Supabase integration +- App layout + +βœ… **Week 2 - Core Inventory (8/8)** +- SQL helper functions +- Seed data (units + tags) +- Inventory CRUD UI +- Add/Edit/Delete components + +πŸ”„ **Week 3 - Barcode Scanning (1/5)** +- BarcodeScanner component +- html5-qrcode integration +- Product lookup (pending) +- Scan-to-add flow (pending) + +⏸️ **Week 4-6** - Tag UI, PWA, Deployment (20 issues) See [PROJECT_PLAN.md](docs/PROJECT_PLAN.md) for detailed roadmap. -- [ ] Foundation (Nuxt + Supabase + Auth) -- [ ] Core inventory (CRUD, tags, units) -- [ ] Barcode scanning (PWA camera + Open Food Facts) -- [ ] Mobile polish (PWA, offline) -- [ ] Docker deployment - ## 🀝 Contributing This is an early-stage project. Contributions welcome once v0.1 ships.