feat: implement Iteration 0 foundation (backend + Flutter client)

Backend (Go):
- Project structure with chi router, pgxpool, goose migrations
- JWT auth (access/refresh tokens) with Firebase token verification
- NoopTokenVerifier for local dev without Firebase credentials
- PostgreSQL user repository with atomic profile updates (transactions)
- Mifflin-St Jeor calorie calculation based on profile data
- REST API: POST /auth/login, /auth/refresh, /auth/logout, GET/PUT /profile, GET /health
- Middleware: auth, CORS (localhost wildcard), logging, recovery, request_id
- Unit tests (51 passing) and integration tests (testcontainers)
- Docker Compose setup with postgres healthcheck and graceful shutdown

Flutter client:
- Riverpod state management with GoRouter navigation
- Firebase Auth (email/password + Google sign-in with web popup support)
- Platform-aware API URLs (web/Android/iOS)
- Dio HTTP client with JWT auth interceptor and concurrent refresh handling
- Secure token storage
- Screens: Login, Register, Home (tabs: Menu, Recipes, Products, Profile)
- Unit tests (17 passing)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
dbastrikin
2026-02-20 13:14:58 +02:00
commit 24219b611e
140 changed files with 13062 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
import 'package:flutter/material.dart';
abstract class AppColors {
// Primary
static const primary = Color(0xFF4CAF50);
static const primaryLight = Color(0xFF81C784);
static const primaryDark = Color(0xFF388E3C);
// Accent
static const accent = Color(0xFFFF9800);
// Background
static const background = Color(0xFFF5F5F5);
static const surface = Color(0xFFFFFFFF);
// Text
static const textPrimary = Color(0xFF212121);
static const textSecondary = Color(0xFF757575);
// Status
static const error = Color(0xFFE53935);
static const warning = Color(0xFFFFA726);
static const success = Color(0xFF66BB6A);
// Shelf life indicators
static const freshGreen = Color(0xFF4CAF50);
static const warningYellow = Color(0xFFFFC107);
static const expiredRed = Color(0xFFE53935);
}

View File

@@ -0,0 +1,31 @@
import 'package:flutter/material.dart';
import 'app_colors.dart';
ThemeData appTheme() {
return ThemeData(
useMaterial3: true,
colorSchemeSeed: AppColors.primary,
scaffoldBackgroundColor: AppColors.background,
appBarTheme: const AppBarTheme(
centerTitle: true,
elevation: 0,
backgroundColor: AppColors.surface,
foregroundColor: AppColors.textPrimary,
),
bottomNavigationBarTheme: const BottomNavigationBarThemeData(
selectedItemColor: AppColors.primary,
unselectedItemColor: AppColors.textSecondary,
type: BottomNavigationBarType.fixed,
),
inputDecorationTheme: InputDecorationTheme(
border: OutlineInputBorder(borderRadius: BorderRadius.circular(12)),
contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
),
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
minimumSize: const Size(double.infinity, 48),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
),
),
);
}