ledgerrz/DECISIONS.md
2026-06-15 00:30:57 +02:00

65 lines
2.5 KiB
Markdown

# Decisions
This document outlines the decisions made during the development of the Ledgerrz application.
## Core Concepts
* **Dynamic:** A relationship between two or more users. This will be the core container for interactions.
* **Ledger:** A score-tracking entity within a Dynamic. The name "Ledger" will be used instead of "Score" to establish a more distinct domain language.
* **Mutation:** An event that modifies a Ledger. It can be a direct modification or a suggestion requiring approval.
* **Participant:** A user's role within a Dynamic. This will be used to manage permissions.
## Technology Stack
* **Backend:** Laravel
* **Frontend:** Vue.js with Inertia.js
* **Real-time:** Laravel Reverb for notifications and real-time updates.
* **Testing:** Pest for PHP tests.
* **Styling:** Tailwind CSS (based on the presence of `tailwindcss-development` skill).
## Initial Database Schema
I will start with a basic schema and evolve it as I build features.
* `users`: Standard Laravel users table.
* `dynamics`:
* `id`
* `name`
* `rules` (TEXT)
* `created_at`, `updated_at`
* `ledgers`:
* `id`
* `dynamic_id`
* `name`
* `rules` (TEXT)
* `score` (INTEGER, default 0)
* `created_at`, `updated_at`
* `mutations`:
* `id`
* `ledger_id`
* `user_id` (author)
* `type` (e.g., 'addition', 'subtraction')
* `amount` (INTEGER)
* `description` (TEXT)
* `status` (e.g., 'approved', 'pending', 'rejected')
* `created_at`, `updated_at`
* `participants`: (Pivot table for users and dynamics)
* `user_id`
* `dynamic_id`
* `role` (e.g., 'owner', 'editor', 'viewer')
* `media`: For handling media uploads associated with mutations.
* `chats`: For the chat streams on Dynamics and Mutations.
## Development Approach
1. **Setup:** Set up basic project structure, including models and migrations for the initial schema.
2. **Dynamics:** Implement the creation and management of Dynamics.
3. **Ledgers:** Implement the creation and management of Ledgers within a Dynamic.
4. **Mutations:** Implement the core functionality of adding and suggesting mutations.
5. **UI:** Build out the Vue components for each feature, focusing on a clean, dark, BDSM-themed aesthetic.
6. **Real-time:** Integrate Laravel Reverb for notifications.
7. **Testing:** Write Pest tests for all new backend functionality.
8. **Git:** Use feature branches and make regular commits.
This is a living document and will be updated as the project progresses.