How chikashishirozu/my-kakeibo-laravel05 works
Project type and purpose
• This is a full-stack Laravel web application (“my-kakeibo-laravel05”) for household accounting (tracking expenses, budget goals, daily records, monthly summaries, user profiles, dashboards).
• It uses MVC on the backend (PHP/Laravel), Blade for server-side rendered views, SQLite locally, and typical Laravel services (auth, queue, mail, filesystem, etc.).
File structure
• Top-level:
• app/Http/Controllers → HTTP controllers (Auth, BudgetGoalsController, DailyRecordsController, DashboardsController)
• app/Models → Eloquent models (User, BudgetGoal, DailyRecord, Dashboard, MonthlySummary)
• app/Http/Middleware → request filters (RedirectIfAuthenticated)
• database/migrations & seeders → schema definition and initial data
• resources/views → Blade templates organized by feature (auth, budget_goals, daily_records, dashboard, profile, layouts, components)
• routes/web.php & routes/api.php → route definitions
• public/index.php → front controller
• config/*.php → service and environment config
• Patterns: classic MVC, RESTful resource controllers, Blade component system, standard Laravel middleware pipeline.
README
• Confirms purpose (household accounting), tech stack (Laravel, PHP, SQLite), installation steps (composer, PHP extensions, SQLite setup).
• Mentions migrations, seeding, resource controllers, Blade views, environment switching (SQLite local vs MySQL/PostgreSQL in prod), and dev tools (npm, Vite).
a. Main components to show:
• Client (Browser or API consumer)
• Web Server Entry Point (public/index.php + nginx/apache)
• Laravel Kernel & Middleware Pipeline
• Router (routes/web.php, routes/api.php)
• Controllers (Auth, BudgetGoals, DailyRecords, Dashboards, Profile)
• Service Layer (Eloquent ORM via Models)
• Database (SQLite file, migrations)
• Blade View Engine & Static Assets (CSS/JS via Vite/bundler)
• External Services (Mail, Queue, Cache, Filesystems as configured)
b. Relationships & data flows:
• Static assets loaded directly from public/css and public/js via Vite dev server or build pipeline.
• API endpoints (routes/api.php) bypass Blade, return JSON.
c. Architectural patterns & design principles:
• MVC Separation: Controllers handle HTTP, Models handle data, Views handle rendering.
• RESTful Resource Controllers (CRUD for budgets, records).
• Middleware for auth/guest redirection.
• Configuration driven via .env and config/*.php for environment portability.
• Blade Components for UI reuse & consistency.
d. Key technologies & libraries:
• Laravel framework (HTTP kernel, routing, middleware, service container)
• Eloquent ORM (Models, Migrations, Seeders)
• Blade templating & Blade Components
• SQLite (local DB)
• Laravel Auth scaffolding
• Vite + npm (assets bundling)
• PHPUnit (testing)