Skip to content

Commit 7d50718

Browse files
Merge pull request #7 from Valourite/feature/code-updates
Feature/code updates
2 parents 0e667f6 + ebb4173 commit 7d50718

36 files changed

Lines changed: 2577 additions & 1041 deletions

.aider.chat.history.md

Lines changed: 1417 additions & 0 deletions
Large diffs are not rendered by default.

.aider.input.history

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
2+
# 2025-07-29 10:16:14.389830
3+
+N
4+
5+
# 2025-07-29 10:20:25.071517
6+
+Please review the files, and let me know where I can make changes to improve the performance of this package. The repeater, from the EditRecord is very slow when I try and save a model that has been specified inside the config.
7+
8+
# 2025-07-29 10:35:07.201489
9+
+Update the Form Resource so that only the fields that need to be reactive are reactive. It a filed does not need to be reactive, then don't set it as reactive or live
10+
11+
# 2025-07-29 10:38:15.242235
12+
+Edit the section repeater and the filed repeater to make them optimised, also remove the live and reactive where it is not needed.
13+
14+
# 2025-07-29 10:44:13.865938
15+
+Based on the code provided, and what the README says about how data is stored on a modal. What would be a better way of storing data on a model, keep in mind that the data that is being stores is is modal instance specific, meaning that the instance of the model could have different data and even a different form stored on it
16+
17+
# 2025-07-29 10:44:33.049655
18+
+Y
19+
20+
# 2025-07-29 10:44:43.810567
21+
+/run php artisan make:migration create_form_responses_table
22+
23+
# 2025-07-29 10:44:43.810656
24+
+/run php artisan make:migration create_form_responses_table
25+
26+
# 2025-07-29 10:44:48.627309
27+
+Y
28+
29+
# 2025-07-29 10:44:51.193558
30+
+/run php artisan make:model FormResponse
31+
32+
# 2025-07-29 10:44:51.193664
33+
+/run php artisan make:model FormResponse
34+
35+
# 2025-07-29 10:44:52.988306
36+
+Y
37+
38+
# 2025-07-29 10:59:25.631519
39+
+I need the response to be able to store the schema of the form, so that if the form is updated and the schema changed, if we view the response on a model, we can see what version of the form was used and what schema was used so that the correct schema for that response gets used. Whats the best way of doing that, would it be to copy the form across into the form response or would it be better that when the form gets updated, we create a new record always, ensuring that the form_id that links a form reponse will always include the correct schema as we can never change the schema on a form record.
40+
41+
# 2025-07-29 11:00:44.839789
42+
+Y
43+
44+
# 2025-07-29 11:04:40.505128
45+
+Okay, you didnt listen to what I asked of you. I want to set it so that every form that gets created will create a record with timestamps, however when that form is updated, we create a new record only if the form schema is updated. This will allow the form response to always link to the form_id without having to copy the form schema, version and such into the form response record. Please update the files to handle this, also update the config to remove any refernces to being able to change how a form is version controlled. Also implement a version control on the form so that we can see the different forms over time. Essentially when a form schema gets updated, we need to make a new record. We do not then need to store the form shcema and the form version inside the form response, just the form_id
46+
47+
# 2025-07-30 13:57:28.685710
48+
+Y
49+
50+
# 2025-07-30 13:57:38.378752
51+
+N
52+
53+
# 2025-07-30 13:58:08.680169
54+
+Y
55+
56+
# 2025-07-30 14:00:03.206428
57+
+Based on all the files provided, please update the README.md file to reflect how a user should install and work with this package

.aider.tags.cache.v4/cache.db

68 KB
Binary file not shown.

.aider/CONVENTIONS.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Programming Rules & Guidelines
2+
3+
**Aider, read and internalize these rules. You MUST adhere to them strictly.**
4+
5+
## General Directives
6+
7+
1. **Surgical Precision:** Make only the exact changes explicitly requested. Do not add, remove, or modify any code that
8+
is not directly pertinent to the current task.
9+
2. **No Extraneous Changes:** Do not auto-format, re-indent, reorder, or refactor code unless specifically instructed.
10+
Preserve the existing code style, formatting, and structure.
11+
3. **No Unsolicited Refactoring:** Do not introduce new classes, methods, or architectural patterns unless explicitly
12+
outlined in the task. If a suggestion for refactoring is implicit, ask for explicit approval first.
13+
4. **Prioritize Clarity over Brevity:** Code must be clear, readable, and maintainable. Do not optimize for line count
14+
at the expense of understanding.
15+
16+
## Filament v4 Specific Directives (CRITICAL)
17+
18+
1. **Exact Method Signatures:** When modifying or implementing Filament resource methods (`form()`, `table()`,
19+
`getColumns()`, `getActions()`, `getPages()`, `getHeaderActions()`, etc.), you **MUST** preserve their exact Filament
20+
v4 method signatures, including type hints and return types (e.g., `public static function form(Form $form): Form`,
21+
`public static function table(Table $table): Table`, `public static function makeHeaderActions(Page $page): array`).
22+
2. **Filament `Action` Syntax:** Use the correct Filament v4 `Action` syntax (`Action::make(...)`) with its fluent
23+
methods (`->label()`, `->icon()`, `->action()`, `->modal()`, `->requiresConfirmation()`, and dynamic properties using
24+
`fn (Model $record): type => ...`).
25+
3. **Resource `getPages()`:** When modifying `getPages()`, ensure it only lists the specified page routes. **Do NOT**
26+
automatically add `Create` or `Edit` pages unless explicitly instructed for that specific resource.
27+
4. **No Raw `created_at` or `updated_at` in Tables/Infolists:** Avoid directly displaying
28+
`TextColumn::make('created_at')` or `TextEntry::make('created_at')`. Use dedicated timestamp columns or accessors if
29+
temporal data is needed.
30+
31+
## Database & Model Strictness
32+
33+
1. **No `timestamps()` or `softDeletes()` in Migrations (Unless Specified):** Unless explicitly told otherwise for a
34+
specific table, new migrations and modifications to existing migrations **MUST NOT** include `->timestamps()` or
35+
`->softDeletes()`.
36+
2. **No `$fillable` Array in Models:** Models **MUST NOT** use the `$fillable` property. Rely on specific factory
37+
methods, service methods, or guarded properties if absolutely necessary.
38+
3. **No `timestamps` or `softDeletes` Properties/Traits in Models:** Unless explicitly told otherwise for a specific
39+
model, models **MUST NOT** use the `$timestamps = false;` property or the `SoftDeletes` trait.
40+
4. **Type Hinting & Casts:** Use native PHP type hints for properties and method arguments/return types. Utilize
41+
`$casts` for Enum fields and JSON columns.
42+
43+
## SOLID Principles & Dynamic Programming
44+
45+
1. **Single Responsibility Principle (SRP):** Each class and method should have only one reason to change. Break down
46+
complex logic into smaller, focused units.
47+
2. **Open/Closed Principle (OCP):** Software entities should be open for extension, but closed for modification. Favor
48+
composition and interfaces over inheritance where appropriate.
49+
3. **Liskov Substitution Principle (LSP):** Objects in a program should be replaceable with instances of their subtypes
50+
without altering the correctness of that program. Ensure proper use of polymorphism.
51+
4. **Interface Segregation Principle (ISP):** Clients should not be forced to depend on interfaces they do not use.
52+
Create small, role-specific interfaces.
53+
5. **Dependency Inversion Principle (DIP):**
54+
* Use interfaces where appropriate to define contracts for services and clients.
55+
6. **Dynamic & Flexible Code:**
56+
* **Enums for Fixed Options:** Use PHP Enums for fixed sets of options (e.g., `TranscriptStatus`, `AIProvider`).
57+
* **Factories for Implementations:** Use factory classes/methods to retrieve specific implementations of
58+
interfaces (e.g., `AIClientFactory`).
59+
60+
## API Clients
61+
62+
1. **All API Calls Through Clients:** Any interaction with external APIs (e.g., OpenAI, AWS, Salesforce) **MUST** go
63+
through a dedicated API client class (e.g., `OpenAIApiClient`, `AwsS3Client`, `SalesforceTaskApiClient`). These
64+
clients should wrap the HTTP calls and handle API-specific details.
65+
66+
## Testing
67+
68+
1. **Test Coverage:** For any new feature or significant refactoring, consider how unit and integration tests would be
69+
written. The design should facilitate easy testing through proper dependency injection.
70+
71+
## Error Handling & Resilience
72+
73+
1. **Explicit Error Handling:** Implement robust `try-catch` blocks for external API calls and critical operations. Log
74+
errors clearly.
75+
2. **Asynchronous Operations for External Systems:** For operations involving external APIs (especially write operations
76+
like Salesforce sync), favor asynchronous processing via jobs to prevent UI blocking and allow for retries.
77+
78+
## Configuration
79+
80+
1. **Use Configuration Files/Environment Variables:** All API keys, endpoint URLs, and changeable settings must be
81+
defined in `.env` and accessed via `config()` helpers, not hardcoded.
82+
83+
---
84+
85+
## Api client -Specific Rules
86+
87+
1. DTOs **must NOT have constructors** — all population happens in Transformers.
88+
2. Transformers use `toDto()` and `toSpotify()`.
89+
3. All mass data Clients use:
90+
91+
```php
92+
public function getMassData(): Collection;
93+
public function saveMassData(object $dto): mixed;

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
## 📝 Pull Request Summary
2+
3+
Please provide a clear and concise description of the changes made in this PR.
4+
5+
- What does this PR fix or add?
6+
- Why is this change needed?
7+
8+
---
9+
10+
## 📌 Type of Change
11+
12+
Please check all that apply:
13+
14+
- [ ] 🐛 Bugfix
15+
- [ ] ✨ New feature
16+
- [ ] ♻️ Refactor (non-breaking changes)
17+
- [ ] 🧪 Tests
18+
- [ ] 📝 Documentation
19+
- [ ] 🧹 Code cleanup or formatting
20+
- [ ] 🚀 Build or deployment changes
21+
22+
---
23+
24+
## ✅ Checklist
25+
26+
- [ ] I have tested my code
27+
- [ ] I have updated the documentation (if necessary)
28+
- [ ] This PR follows the team’s code style guidelines
29+
- [ ] I have added necessary tests or explained why not
30+
31+
---
32+
33+
## 🔗 Related Issues
34+
35+
Closes #[issue_number] (if applicable)

.github/workflows/laravel-pr.yml

Lines changed: 0 additions & 57 deletions
This file was deleted.

.github/workflows/pint.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/push-to-main.yml

Lines changed: 0 additions & 58 deletions
This file was deleted.

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.aider*
2+
.aider.*
3+
.aider.conf.yml
4+
.aider.input.history
5+
.aider.chat.history.md

0 commit comments

Comments
 (0)