From a1adf1da1c584cdac3b62b99fd53c37062abeea8 Mon Sep 17 00:00:00 2001 From: Daan Meijer Date: Mon, 15 Jun 2026 22:30:17 +0200 Subject: [PATCH] added media, mutation events, agent instructions --- AGENTS.md | 5 + DECISIONS.md | 18 +- GEMINI.md | 17 + app/Events/MessageSent.php | 2 +- app/Events/MutationCreated.php | 45 ++ app/Events/MutationUpdated.php | 45 ++ app/Http/Controllers/DynamicController.php | 7 +- app/Http/Controllers/LedgerController.php | 37 +- app/Http/Controllers/MessageController.php | 16 +- app/Http/Controllers/MutationController.php | 93 +++- app/Http/Requests/StoreLedgerRequest.php | 2 + app/Http/Requests/StoreMessageRequest.php | 2 + app/Http/Requests/StoreMutationRequest.php | 2 + app/Models/Dynamic.php | 2 +- app/Models/Ledger.php | 5 + app/Models/Media.php | 27 + app/Models/Message.php | 5 + app/Models/Mutation.php | 5 + app/Policies/MutationPolicy.php | 19 + app/Providers/AuthServiceProvider.php | 3 + database/factories/ChatFactory.php | 3 +- database/factories/DynamicFactory.php | 9 +- database/factories/LedgerFactory.php | 13 +- database/factories/MessageFactory.php | 6 +- database/factories/MutationFactory.php | 9 +- .../2026_06_15_223630_create_media_table.php | 22 + database/seeders/DatabaseSeeder.php | 321 ++++++++++- resources/js/app.ts | 12 +- resources/js/components/AppContent.vue | 14 +- resources/js/components/AppLogo.vue | 32 +- resources/js/components/AppSidebarHeader.vue | 18 +- resources/js/components/AppearanceTabs.vue | 38 +- resources/js/components/Chat.vue | 378 ++++++++++++- resources/js/components/Heading.vue | 36 +- resources/js/components/InputError.vue | 12 +- resources/js/components/PasswordInput.vue | 34 +- resources/js/components/TextLink.vue | 10 +- resources/js/components/UserInfo.vue | 30 +- .../js/layouts/auth/AuthSimpleLayout.vue | 73 ++- resources/js/pages/Dynamics/Create.vue | 76 ++- resources/js/pages/Dynamics/Index.vue | 58 +- resources/js/pages/Dynamics/Show.vue | 281 ++++++++-- resources/js/pages/Ledgers/Show.vue | 525 ++++++++++++++++-- vite.config.ts | 3 + 44 files changed, 2083 insertions(+), 287 deletions(-) create mode 100644 GEMINI.md create mode 100644 app/Events/MutationCreated.php create mode 100644 app/Events/MutationUpdated.php create mode 100644 app/Models/Media.php create mode 100644 app/Policies/MutationPolicy.php create mode 100644 database/migrations/2026_06_15_223630_create_media_table.php diff --git a/AGENTS.md b/AGENTS.md index d1aa2a2..29ef02b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -5,6 +5,11 @@ The Laravel Boost guidelines are specifically curated by Laravel maintainers for this application. These guidelines should be followed closely to ensure the best experience when building Laravel applications. +## Persistent Project Context (IMPORTANT) + +- You MUST read, understand, and strictly follow the underlying business logic and feature requests documented in `IDEA.md` in every session. +- You MUST adhere to all style architecture, backend transaction, and integration decisions recorded in `DECISIONS.md`. Update `DECISIONS.md` when any major design decisions are made during a session. + ## Foundational Context This application is a Laravel application and its main Laravel ecosystems package & versions are below. You are an expert with them all. Ensure you abide by these specific packages & versions. diff --git a/DECISIONS.md b/DECISIONS.md index 0410b93..dfaac3b 100644 --- a/DECISIONS.md +++ b/DECISIONS.md @@ -13,9 +13,23 @@ This document outlines the decisions made during the development of the Ledgerrz * **Backend:** Laravel * **Frontend:** Vue.js with Inertia.js -* **Real-time:** Laravel Reverb for notifications and real-time updates. +* **Real-time:** Laravel Echo via `@laravel/echo-vue` for notifications and real-time updates. * **Testing:** Pest for PHP tests. -* **Styling:** Tailwind CSS (based on the presence of `tailwindcss-development` skill). +* **Styling:** **BEM (Block, Element, Modifier)** methodology. Replaced verbose inline Tailwind classes in custom HTML templates with semantic BEM classes (e.g., `.c-chat`, `.user-info__avatar`), and mapped them to CSS rules using Tailwind v4's `@apply` directive inside scoped ` diff --git a/resources/js/components/AppLogo.vue b/resources/js/components/AppLogo.vue index bc79527..313eff5 100644 --- a/resources/js/components/AppLogo.vue +++ b/resources/js/components/AppLogo.vue @@ -3,14 +3,30 @@ import AppLogoIcon from '@/components/AppLogoIcon.vue'; + + diff --git a/resources/js/components/AppSidebarHeader.vue b/resources/js/components/AppSidebarHeader.vue index db6c0c8..1af9362 100644 --- a/resources/js/components/AppSidebarHeader.vue +++ b/resources/js/components/AppSidebarHeader.vue @@ -14,10 +14,8 @@ withDefaults( + + diff --git a/resources/js/components/UserInfo.vue b/resources/js/components/UserInfo.vue index 0bd0494..c9a3f2e 100644 --- a/resources/js/components/UserInfo.vue +++ b/resources/js/components/UserInfo.vue @@ -22,17 +22,35 @@ const showAvatar = computed( + + diff --git a/resources/js/layouts/auth/AuthSimpleLayout.vue b/resources/js/layouts/auth/AuthSimpleLayout.vue index b54c094..5de2c37 100644 --- a/resources/js/layouts/auth/AuthSimpleLayout.vue +++ b/resources/js/layouts/auth/AuthSimpleLayout.vue @@ -10,28 +10,19 @@ defineProps<{ + + diff --git a/resources/js/pages/Dynamics/Create.vue b/resources/js/pages/Dynamics/Create.vue index ecd0bd0..042150a 100644 --- a/resources/js/pages/Dynamics/Create.vue +++ b/resources/js/pages/Dynamics/Create.vue @@ -26,33 +26,67 @@ function submit() { diff --git a/resources/js/pages/Dynamics/Index.vue b/resources/js/pages/Dynamics/Index.vue index 3a37a9d..99b9cb0 100644 --- a/resources/js/pages/Dynamics/Index.vue +++ b/resources/js/pages/Dynamics/Index.vue @@ -17,30 +17,48 @@ const breadcrumbs = [ diff --git a/resources/js/pages/Dynamics/Show.vue b/resources/js/pages/Dynamics/Show.vue index 9bf167a..faf3bda 100644 --- a/resources/js/pages/Dynamics/Show.vue +++ b/resources/js/pages/Dynamics/Show.vue @@ -1,11 +1,23 @@ - diff --git a/vite.config.ts b/vite.config.ts index 51262af..5dbc299 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -7,6 +7,9 @@ import { bunny } from 'laravel-vite-plugin/fonts'; import { defineConfig } from 'vite'; export default defineConfig({ + resolve: { + dedupe: ['@laravel/echo-vue'], + }, plugins: [ laravel({ input: ['resources/css/app.css', 'resources/js/app.ts'],