DunApp PWA - Project Constraints
⚠️ KRITIKUS DOKUMENTUM Ez a fájl tartalmazza azokat a constraint-eket amelyeket MINDEN session elején be kell vezetni Claude Code-nak.
Létrehozva: 2025-11-03 Utolsó frissítés: 2025-11-03 Verzió: 1.0
🚨 DEPLOYMENT CONSTRAINTS
❌ NO NETLIFY DEPLOYMENT
Constraint:
NINCS NETLIFY TOKEN
→ NEM lehet Netlify-ra deploy-olni
→ NEM használható Netlify CLI
→ NEM lehet production build push
Miért:
- Nincs Netlify hozzáférési token
- Nincs fizetős Netlify subscription
- Lokális fejlesztési környezet
Mit lehet csinálni:
- ✅ Lokális tesztelés:
npm run dev(port 5173) - ✅ Build ellenőrzés:
npm run build(bundle size check) - ✅ Git commit & push: GitHub repository sync
- ✅ Manual browser testing: localhost:5173
- ✅ Bundle analysis:
npm run buildoutput
Mit NEM lehet csinálni:
- ❌
netlify deploy - ❌
netlify dev - ❌ Netlify CLI commands
- ❌ Production URL generation
- ❌ Netlify Functions deployment
- ❌ Netlify environment variables setup
🧪 TESTING CONSTRAINTS
LOCAL TESTING ONLY
Testing workflow:
# 1. Start development server
npm run dev
# 2. Open browser
# http://localhost:5173
# 3. Manual testing
# - Test all 3 modules (Meteorology, Water Level, Drought)
# - Check responsive design (mobile, tablet, desktop)
# - Verify data loading/error states
# - Test user interactions (selectors, maps, charts)
# 4. Build verification
npm run build
# Check bundle size in output
# 5. Type check
npm run type-check
# Ensure 0 TypeScript errors
Test verification:
- ✅ Visual inspection in browser (localhost:5173)
- ✅ Console log checking (no errors)
- ✅ Network tab inspection (API calls)
- ✅ Responsive design testing (DevTools)
- ✅ Bundle size verification (< 200KB gzipped main)
No automated deployment:
- ❌ NO Lighthouse CI (requires production URL)
- ❌ NO Netlify preview deployments
- ❌ NO staging environment
🔧 DEVELOPMENT WORKFLOW
Approved Workflow
1. Development:
npm run dev
# Develop locally at localhost:5173
2. Type checking:
npm run type-check
# Ensure TypeScript strict mode compliance
3. Linting:
npm run lint
# Check code quality
4. Build verification:
npm run build
# Verify bundle size and build success
5. Git workflow:
git add .
git commit -m "feat: Your feature description"
git push origin main
# GitHub repository sync ONLY
NOT Approved Workflow
❌ Deployment attempts:
# DO NOT RUN THESE:
netlify deploy # ❌ No token
netlify deploy --prod # ❌ No token
netlify dev # ❌ Not needed
netlify functions:deploy # ❌ Use Supabase Edge Functions
🌐 API & BACKEND CONSTRAINTS
Supabase Backend ONLY
What we use:
- ✅ Supabase PostgreSQL - Database
- ✅ Supabase Edge Functions - Serverless backend
- ✅ pg_cron - Scheduled jobs
- ✅ pg_net - HTTP requests from database
Deployment method:
# Edge Functions deployment (Supabase CLI)
supabase functions deploy fetch-meteorology
supabase functions deploy fetch-water-level
supabase functions deploy fetch-drought
supabase functions deploy check-water-level-alerts
supabase functions deploy send-push-notification
# Database migrations
supabase db push
NOT using:
- ❌ Netlify Functions (használjuk Supabase Edge Functions helyett)
- ❌ Vercel Serverless Functions
- ❌ AWS Lambda
- ❌ Google Cloud Functions
📦 MCP CONFIGURATION CONSTRAINTS
Project-Specific MCP ONLY
Configuration file:
.claude/mcp_servers.json
What this means:
- ✅ MCP config a projekt mappában (
.claude/) - ✅ Verziókezelhető (git-ben benne van)
- ✅ Projekt-specifikus (más projekteket nem érint)
- ✅ Könnyen megosztható
NOT using:
- ❌ Global Claude Desktop config (
~/Library/Application Support/Claude/) - ❌ System-wide MCP settings
- ❌ User-specific MCP config
Configured MCP servers:
hydroinfo- Water level scraping (hydroinfo.hu)aszalymonitoring- Drought monitoring (sample data)
💰 COST CONSTRAINTS
Zero-Cost Development
Free tier usage:
- ✅ Supabase Free Tier (500MB DB, 2GB bandwidth)
- ✅ GitHub Free (unlimited public repos)
- ✅ OpenWeatherMap Free (1,000 calls/day)
- ✅ Yr.no API Free (no limit)
- ✅ Local development (no hosting cost)
Not using paid services:
- ❌ Netlify Pro ($19/month)
- ❌ Vercel Pro ($20/month)
- ❌ Sentry paid plan ($26/month)
- ❌ Semgrep Team ($80/month)
🧠 AGENT USAGE CONSTRAINTS
Available Agents
Configured agents (9 total):
- Master Architect (Opus 4.1)
- Frontend Engineer (Sonnet 4.5)
- Backend Engineer (Sonnet 4.5)
- Data Engineer (Sonnet 4.5)
- QA Tester (Sonnet 4.5)
- Security Analyst (Sonnet 4.5)
- DevOps Engineer (Haiku)
- UI/UX Designer (Sonnet 4.5)
- Documentation Writer (Haiku)
Agent invocation:
# Use Task tool with subagent_type
Task(subagent_type="frontend-engineer", prompt="...")
Task(subagent_type="master-architect", prompt="...")
NOT using:
- ❌ External AI services (GPT-4, etc.)
- ❌ Paid agent orchestration platforms
- ❌ Third-party agent frameworks
📝 DOCUMENTATION CONSTRAINTS
Required Documentation Files
Must maintain:
- ✅
CLAUDE.md- Central reference (update after each phase) - ✅
SESSION_PROGRESS_YYYY-MM-DD.md- Daily session logs - ✅
PROJECT_CONSTRAINTS.md- This file - ✅
PROGRESS_LOG.md- Overall progress tracking - ✅
.claude/README_MCP.md- MCP usage guide
Update frequency:
- End of each session: SESSION_PROGRESS file
- End of each phase: CLAUDE.md
- When constraints change: PROJECT_CONSTRAINTS.md
- Weekly: PROGRESS_LOG.md
🔒 SECURITY CONSTRAINTS
No Secrets in Repository
What to protect:
- ❌ API keys (OpenWeatherMap, Meteoblue)
- ❌ Supabase service role key
- ❌ VAPID private key
- ❌ Database passwords
- ❌ Authentication tokens
How to protect:
# .gitignore includes:
.env
.env.local
.env.vapid
*.key
secrets/
Safe practices:
- ✅ Use environment variables
- ✅ Store secrets in Supabase Vault
- ✅ Use Supabase secrets for Edge Functions
- ✅ Never hardcode API keys in code
🎯 PERFORMANCE CONSTRAINTS
Bundle Size Budget
Targets:
Main bundle: < 200 KB gzipped ✅ (currently 99.54 KB)
Total JavaScript: < 500 KB gzipped ✅ (currently ~297 KB)
Module chunks: < 20 KB each ✅ (currently 16.66 KB)
If exceeded:
- ⚠️ Analyze bundle with
npm run build - ⚠️ Check for duplicate dependencies
- ⚠️ Consider code splitting (React.lazy)
- ⚠️ Review third-party library usage
🧪 TESTING CONSTRAINTS
Deferred Testing
E2E tests:
- ⏳ DEFERRED until Phase 4-5 complete
- ⏳ Target: 80%+ coverage
- ⏳ Framework: Playwright (when implemented)
Current testing:
- ✅ Manual browser testing (localhost:5173)
- ✅ TypeScript strict mode (0 errors)
- ✅ Visual regression (manual inspection)
- ✅ 94 test files exist (not verified)
📞 SESSION START CHECKLIST
Before EVERY session, verify:
- Read
SESSION_PROGRESS_YYYY-MM-DD.md(latest session log) - Read
PROJECT_CONSTRAINTS.md(this file) - Understand: NO NETLIFY DEPLOYMENT
- Understand: LOCAL TESTING ONLY
- Check
CLAUDE.mdfor latest project status - Review git log (
git log --oneline -5)
Remind Claude Code:
CONSTRAINT: NINCS Netlify token → csak lokális tesztelés (npm run dev)
NO DEPLOYMENT to Netlify, csak GitHub push!
🔄 HOW TO UPDATE THIS FILE
When to update:
- New constraint discovered
- Workflow change required
- Tool/service change
- Cost considerations change
Who can update:
- Project owner (Endre)
- Lead developer
- Master Architect agent (with approval)
Update process:
- Identify new constraint
- Add to appropriate section
- Update version number (top of file)
- Update "Utolsó frissítés" date
- Commit with message:
docs: Update PROJECT_CONSTRAINTS - [reason] - Inform all team members / AI agents
✅ SUMMARY TL;DR
Kritikus constraint-ek:
- ❌ NO NETLIFY - nincs token, csak local testing
- ✅ Supabase backend ONLY - Edge Functions, PostgreSQL
- ✅ Project-specific MCP -
.claude/mcp_servers.json - ✅ Zero-cost development - free tier services only
- ✅ Manual testing -
npm run dev+ browser - ✅ Git workflow - commit & push only
Testing workflow:
npm run dev # Start local server (localhost:5173)
npm run build # Verify bundle size
npm run type-check # Check TypeScript errors
git push origin main # GitHub sync ONLY (no Netlify)
Verzió: 1.0 Következő review: 2025-11-10 (ha változás van) Contact: DunApp PWA project team
🤖 Generated with Claude Code
Co-Authored-By: Claude noreply@anthropic.com
Related Documents
Technical Constraints & Requirements
This document defines the technical constraints, requirements, and architecture decisions for the Scottish Mountain Weather App development.
Specifying version constraints
lastupdated: "2025-11-18"
Token Constraints Implementation
This document describes the token constraint system implemented to ensure that input to the local LLM (served via Ollama) never exceeds the model's maximum token limit.