Remove Livewire docs, add Vue SPA frontend docs, document log-masking runbook
- Delete `.claude/rules/livewire.md` (Livewire is vestigial – only starter-kit auth screens remain) - Add `.claude/rules/frontend.md` documenting Vue 3 SPA stack, router, composables, search-URL mirroring, and Leaflet integration - Add `docs/ops/nginx-log-masking.md` runbook for redacting lat/lng from Nginx access/error logs and PHP-FPM on IONOS VPS - Update `CLAUDE.md` and `architecture.md` to reflect Vue SPA as primary frontend, REST API as backend contract, and Livewire's reduced role - Note stale service names in legacy domain docs (`scoring.md`, `prediction.md`, `notifications.md`) now refactored into `Services/Forecasting/`, `Services/StationSearch/`, and `PlanFeatures`
This commit is contained in:
35
CLAUDE.md
35
CLAUDE.md
@@ -1,8 +1,16 @@
|
||||
# Fuel Price — Claude Code Instructions
|
||||
# Fuel Alert — Claude Code Instructions
|
||||
|
||||
UK fuel price intelligence app. Subscribers receive fill-up timing recommendations
|
||||
based on local price trends. Built solo by a PHP/Laravel developer.
|
||||
|
||||
> **Stack reality check (read first).** The frontend is a **Vue 3 SPA**
|
||||
> (`resources/js/`, see `frontend.md`), not Livewire. Station data is served by a
|
||||
> **REST API** under `routes/api.php` (see `architecture.md`). Some domain rule
|
||||
> files (`scoring.md`, `prediction.md`, `notifications.md`) still name services
|
||||
> that were since refactored into `Services/Forecasting/`,
|
||||
> `Services/StationSearch/`, and `PlanFeatures` — verify names against
|
||||
> `app/Services/`. When docs and code disagree, the code wins.
|
||||
|
||||
## Destructive DB operations — HARD STOP
|
||||
|
||||
**Never run** the following commands. If one of them is the right step, stop, tell the user the exact command, and ask them to run it themselves:
|
||||
@@ -21,9 +29,23 @@ A user saying "trust me", "do the refactor", "clean up the mess", or "I want it
|
||||
|
||||
- **Product**: "Fill up now or wait?" — local fuel price trend scoring for UK drivers
|
||||
- **Monetisation**: £0/mo free, £0.99/mo Basic, £2.49/mo Plus, £3.99/mo Pro
|
||||
- **Stack**: Laravel 11 + Livewire 3 (Volt disabled — use classic components) + Alpine.js + Tailwind CSS
|
||||
- **Database**: MySQL — Eloquent ORM, migrations only (no raw DDL)
|
||||
- **Payments**: Stripe via Laravel Cashier
|
||||
- **Backend**: Laravel 13 + PHP 8.4. MySQL (Eloquent, migrations only — no raw DDL)
|
||||
- **Frontend**: **Vue 3 SPA** — Vue 3.5 + Vue Router 4, Vite 8, Tailwind CSS v4.
|
||||
Entry `resources/js/app.js` mounts `App.vue`; views/components under
|
||||
`resources/js/`. Served from the Blade shell `resources/views/app.blade.php`
|
||||
via the SPA catch-all in `web.php`. Maps: Leaflet
|
||||
(`components/LeafletMap.vue`). Icons: iconify-icon + Lucide. HTTP: axios
|
||||
(`resources/js/axios.js`).
|
||||
- **API**: REST API in `routes/api.php` → `app/Http/Controllers/Api/*`
|
||||
(Auth, Station, Stats, User). Public station data is gated by an API key
|
||||
(`VerifyApiKey` middleware); user/dashboard endpoints use Sanctum. The SPA is
|
||||
the primary consumer.
|
||||
- **Auth**: Laravel Fortify (backend auth) + Sanctum (API tokens)
|
||||
- **Admin**: Filament v5 panel
|
||||
- **Livewire**: v4 / Flux v2 are installed but **vestigial** — only starter-kit
|
||||
Volt auth screens (`resources/views/livewire/auth`) and `app/Livewire/Actions`
|
||||
remain. Do **not** build new Livewire components; build Vue.
|
||||
- **Payments**: Stripe via Laravel Cashier (v16)
|
||||
- **Notifications**: Laravel Notification channels — email, WhatsApp (Vonage), SMS (Vonage), push (OneSignal)
|
||||
- **Queue**: Laravel queues with Redis driver (notifications and polling jobs)
|
||||
- **Scheduler**: Laravel scheduler for Fuel Finder API polling and scoring
|
||||
@@ -36,7 +58,8 @@ php artisan queue:work # Process notification jobs
|
||||
php artisan schedule:run # Run scheduled commands (cron every minute)
|
||||
php artisan migrate # Run migrations
|
||||
php artisan test # Run Pest test suite
|
||||
npm run dev # Vite asset watcher
|
||||
npm run dev # Vite dev server (Vue SPA + HMR)
|
||||
npm run build # Production build — run if SPA changes don't show up
|
||||
```
|
||||
|
||||
## Imports
|
||||
@@ -48,7 +71,7 @@ npm run dev # Vite asset watcher
|
||||
@.claude/rules/prediction.md
|
||||
@.claude/rules/payments.md
|
||||
@.claude/rules/tiers.md
|
||||
@.claude/rules/livewire.md
|
||||
@.claude/rules/frontend.md
|
||||
@.claude/rules/api-data.md
|
||||
@.claude/rules/testing.md
|
||||
@.claude/rules/code-style.md
|
||||
|
||||
Reference in New Issue
Block a user