Backend:
- Add Groq LLM client (llama-3.3-70b) for recipe generation with JSON
retry strategy (retries only on parse errors, not API errors)
- Add Pexels client for parallel photo search per recipe
- Add saved_recipes table (migration 004) with JSONB fields
- Add GET /recommendations endpoint (profile-aware prompt building)
- Add POST/GET/GET{id}/DELETE /saved-recipes CRUD endpoints
- Wire gemini, pexels, recommendation, savedrecipe packages in main.go
Flutter:
- Add Recipe, SavedRecipe models with json_serializable
- Add RecipeService (getRecommendations, getSavedRecipes, save, delete)
- Add RecommendationsNotifier and SavedRecipesNotifier (Riverpod)
- Add RecommendationsScreen with skeleton loading and refresh FAB
- Add RecipeDetailScreen (SliverAppBar, nutrition tooltip, steps with timer)
- Add SavedRecipesScreen with Dismissible swipe-to-delete and empty state
- Update RecipesScreen to TabBar (Recommendations / Saved)
- Add /recipe-detail route outside ShellRoute (no bottom nav)
- Extend ApiClient with getList() and deleteVoid()
Project:
- Add CLAUDE.md with English-only rule for comments and commit messages
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
36 lines
961 B
Go
36 lines
961 B
Go
package config
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/kelseyhightower/envconfig"
|
|
)
|
|
|
|
type Config struct {
|
|
Port int `envconfig:"PORT" default:"8080"`
|
|
DatabaseURL string `envconfig:"DATABASE_URL" required:"true"`
|
|
|
|
// Firebase
|
|
FirebaseCredentialsFile string `envconfig:"FIREBASE_CREDENTIALS_FILE" required:"true"`
|
|
|
|
// JWT
|
|
JWTSecret string `envconfig:"JWT_SECRET" required:"true"`
|
|
JWTAccessDuration time.Duration `envconfig:"JWT_ACCESS_DURATION" default:"15m"`
|
|
JWTRefreshDuration time.Duration `envconfig:"JWT_REFRESH_DURATION" default:"720h"`
|
|
|
|
// CORS
|
|
AllowedOrigins []string `envconfig:"ALLOWED_ORIGINS" default:"http://localhost:3000"`
|
|
|
|
// External APIs
|
|
GeminiAPIKey string `envconfig:"GEMINI_API_KEY" required:"true"`
|
|
PexelsAPIKey string `envconfig:"PEXELS_API_KEY" required:"true"`
|
|
}
|
|
|
|
func Load() (*Config, error) {
|
|
var cfg Config
|
|
if err := envconfig.Process("", &cfg); err != nil {
|
|
return nil, err
|
|
}
|
|
return &cfg, nil
|
|
}
|