Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
94acb27
Add comprehensive test coverage for all Hydrates classes
oguzhanbukcuoglu Feb 9, 2026
5248c08
Complete all 10 incomplete Hydrates tests
oguzhanbukcuoglu Feb 9, 2026
f8a2a85
Enhance Hydrate tests with additional assertions and structure verifi…
oguzhanbukcuoglu Feb 9, 2026
05376bf
feat: Add comprehensive test suite for modularity components, traits,…
oguzhanbukcuoglu Feb 12, 2026
db150ec
test: Update PHPUnit configuration to use custom bootstrap file and e…
oguzhanbukcuoglu Feb 13, 2026
f391f42
fix(BaseServiceProvider): update package name from 'Modularity' to 'M…
oguzhanbukcuoglu Feb 16, 2026
9832621
refactor(Module): streamline ModuleActivator initialization and enhan…
oguzhanbukcuoglu Feb 16, 2026
82f1dc8
refactor(Modularity): simplify module management methods, enhance aut…
oguzhanbukcuoglu Feb 16, 2026
61228a9
refactor(Connector): consolidate object and collection handling in ru…
oguzhanbukcuoglu Feb 16, 2026
c0494b9
refactor(ServiceProvider): replace deprecated Config facade with help…
oguzhanbukcuoglu Feb 16, 2026
e7a4e89
refactor(sources): remove backslash from Cache facade usage for consi…
oguzhanbukcuoglu Feb 16, 2026
f9c75ef
refactor(BaseCommand): streamline stub base path configuration by tri…
oguzhanbukcuoglu Feb 16, 2026
e7b3e4d
refactor(CreateVueTestCommand): remove unnecessary blank line for cle…
oguzhanbukcuoglu Feb 16, 2026
2f61436
feat(ModuleMakeCommand): add 'test' option for enabling test mode in …
oguzhanbukcuoglu Feb 16, 2026
d55abf2
fix(MigrateRollbackCommand): check for repository existence before ha…
oguzhanbukcuoglu Feb 16, 2026
047f897
feat(Generator): add setName and getName methods for improved name ha…
oguzhanbukcuoglu Feb 16, 2026
3d98ccc
fix(Generators): correct file convention typo and update return types…
oguzhanbukcuoglu Feb 16, 2026
cbac97e
refactor(RouteGenerator): streamline method signatures, enhance clari…
oguzhanbukcuoglu Feb 16, 2026
ed29587
fix(composer): adjust installed path resolution for Testbench compati…
oguzhanbukcuoglu Feb 16, 2026
9a98b38
feat(RegexReplacement): enhance path validation and improve glob to r…
oguzhanbukcuoglu Feb 16, 2026
7550420
refactor(FileLoader): replace glob with RecursiveDirectoryIterator fo…
oguzhanbukcuoglu Feb 16, 2026
38a0706
refactor(module): clean up getModularityTraits function and update re…
oguzhanbukcuoglu Feb 16, 2026
c85b4e3
test(Case): add TestModulesCase class and enhance configuration for m…
oguzhanbukcuoglu Feb 16, 2026
0fee8a9
refactor(tests): replace ModularityActivatorTest with a new implement…
oguzhanbukcuoglu Feb 16, 2026
d80f487
test(ModuleActivator): add comprehensive test suite for ModuleActivat…
oguzhanbukcuoglu Feb 16, 2026
e07d2d3
test(Modularity): add comprehensive test suite for Modularity class, …
oguzhanbukcuoglu Feb 16, 2026
ce6a483
chore(dependencies): update composer.json to include paratest, adjust…
oguzhanbukcuoglu Feb 16, 2026
160dbc9
chore(.gitignore): add /tmp-modules/ to ignore list for temporary mod…
oguzhanbukcuoglu Feb 16, 2026
a89d2b9
test: introduce MockModuleManager for enhanced module testing capabil…
oguzhanbukcuoglu Feb 16, 2026
95429e0
test(ModuleTest): add comprehensive test suite for module functionali…
oguzhanbukcuoglu Feb 16, 2026
93b1459
test(modules): initialize SystemModule with configuration, routes, co…
oguzhanbukcuoglu Feb 16, 2026
5868548
test(ConsoleCommandTest): add initial test suite for console command …
oguzhanbukcuoglu Feb 16, 2026
0cecd56
test(FacadesTest): add comprehensive test suite for various facades, …
oguzhanbukcuoglu Feb 16, 2026
06bd188
test(Generators): add comprehensive test suites for various generator…
oguzhanbukcuoglu Feb 16, 2026
51212ce
test(Helpers): add comprehensive test suites for various helper funct…
oguzhanbukcuoglu Feb 16, 2026
df44786
test(NavigationMiddleware): add unit tests for NavigationMiddleware f…
oguzhanbukcuoglu Feb 16, 2026
20e5f06
test(Listener): add comprehensive test suite for Listener functionali…
oguzhanbukcuoglu Feb 16, 2026
2e9069a
test(ModularityLogHandler): add comprehensive test suite for Modulari…
oguzhanbukcuoglu Feb 16, 2026
9a545c8
test(Notifications): add comprehensive test suites for EmailVerificat…
oguzhanbukcuoglu Feb 16, 2026
54290ea
test(Schedulers): add comprehensive test suites for ChatableScheduler…
oguzhanbukcuoglu Feb 16, 2026
226d2c9
test(Services): add comprehensive test suites for various services in…
oguzhanbukcuoglu Feb 16, 2026
75f61c1
test(Support): add comprehensive test suites for CoverageAnalyzer, Fi…
oguzhanbukcuoglu Feb 16, 2026
9e87a5a
test(Traits): add comprehensive test suites for Cache, ManageNames, M…
oguzhanbukcuoglu Feb 16, 2026
c2be79b
refactor(Handler): update exception handling methods to improve authe…
oguzhanbukcuoglu Feb 16, 2026
3cfcf74
test(Exceptions): add comprehensive test suites for AuthConfiguration…
oguzhanbukcuoglu Feb 16, 2026
f2912e4
test: Exclude StubsGeneratorTest from PHPUnit configuration and disab…
oguzhanbukcuoglu Feb 16, 2026
714c51b
ci: update Laravel test command to `composer test:fast`
oguzhanbukcuoglu Feb 16, 2026
4087e61
Merge pull request #335 from unusualify/test/complete-modularity-tests
unusual-enterprise Feb 16, 2026
895a515
Merge pull request #336 from unusualify/test/complete-hydrate-tests
unusual-enterprise Feb 16, 2026
61f65a1
Merge branch '0.x' into dev
oguzhanbukcuoglu Feb 18, 2026
cd8aff5
refactor(auth): remove deprecated controllers and implement new regis…
oguzhanbukcuoglu Feb 19, 2026
37682ee
feat(auth): add deferred configuration for auth component and pages
oguzhanbukcuoglu Feb 21, 2026
8d44e4a
fix(auth): update Turkish login title for clarity
oguzhanbukcuoglu Feb 21, 2026
aacf4bf
feat(auth): add 2FA login routes for enhanced security
oguzhanbukcuoglu Feb 21, 2026
b0ee58a
feat(auth): add publishing for modularity authentication views
oguzhanbukcuoglu Feb 21, 2026
2a26e1d
refactor(Form): correct class binding for bottom section and button a…
oguzhanbukcuoglu Feb 21, 2026
3d8a159
fix(useForm): enhance schema input source loading check
oguzhanbukcuoglu Feb 21, 2026
bfa0d1c
docs(auth): add custom auth pages documentation
oguzhanbukcuoglu Feb 21, 2026
5c51fd0
feat(icons): remove unused SVG icons and update existing ones
oguzhanbukcuoglu Feb 21, 2026
8c9a061
test(AuthConroller): add comprehensive tests for authentication contr…
oguzhanbukcuoglu Feb 21, 2026
b3e035b
Merge pull request #339 from unusualify/feature/custom-auth-pages
unusual-enterprise Feb 23, 2026
acf321b
feat(styles): add default font size variable and apply it to html ele…
oguzhanbukcuoglu Feb 23, 2026
64540b6
feat(ui): implement user interface preferences management
oguzhanbukcuoglu Feb 24, 2026
98a49c6
test(layouts): add unit tests for Main, Sidebar, SidebarContent, and …
oguzhanbukcuoglu Feb 24, 2026
b422ef2
test(ModularityTest): handle changed default use_inertia behavior
oguzhanbukcuoglu Feb 24, 2026
b187e59
Merge pull request #340 from unusualify/feature/add-navigation-options
unusual-enterprise Feb 24, 2026
9584629
Merge branch '0.x' into dev
oguzhanbukcuoglu Mar 3, 2026
cc77676
fix(CreateSuperAdminCommand): update user creation method to use upda…
oguzhanbukcuoglu Mar 9, 2026
9ba8ab3
feat(ziggy): integrate Ziggy support into Vue application
oguzhanbukcuoglu Mar 9, 2026
0792176
refactor(migrations): update field lengths and types in companies, ch…
oguzhanbukcuoglu Mar 9, 2026
02ab929
fix(QueryBuilder): ensure columns are set correctly for list method
oguzhanbukcuoglu Mar 9, 2026
e8ddae7
refactor(RouteGenerator): clean up code and update method return type
oguzhanbukcuoglu Mar 9, 2026
56cf385
refactor(SpreadHydrate): improve hydration logic and handle reserved …
oguzhanbukcuoglu Mar 9, 2026
cb5c56d
feat(CommandDiscovery): implement command discovery functionality
oguzhanbukcuoglu Mar 10, 2026
ba35bd7
refactor(ConsoleCommands): introduce console command naming conventio…
oguzhanbukcuoglu Mar 10, 2026
213572b
feat(RouteStatusCommand): add command to list route enable/disable st…
oguzhanbukcuoglu Mar 12, 2026
456cfa4
feat(ModularityException): add custom exception class for modularity …
oguzhanbukcuoglu Mar 12, 2026
17631c8
refactor(Helpers): replace debugging code with structured logging and…
oguzhanbukcuoglu Mar 12, 2026
9a3e905
feat(CurrencyProvider): implement currency provider interface and rel…
oguzhanbukcuoglu Mar 12, 2026
f068ae9
fix(API Merges): add routes configuration option for additional API r…
oguzhanbukcuoglu Mar 12, 2026
b5b4771
feat(Config): add optional currency provider configuration
oguzhanbukcuoglu Mar 12, 2026
529ea25
fix(ImagesTrait): handle missing media locales gracefully
oguzhanbukcuoglu Mar 12, 2026
be154b2
chore(Repository): add create and update lifecycle docs
oguzhanbukcuoglu Mar 12, 2026
aeb4eb9
refactor(Module): replace debugging with structured logging and custo…
oguzhanbukcuoglu Mar 12, 2026
77796ad
refactor(ModularityRoutes): enhance route middleware handling and typ…
oguzhanbukcuoglu Mar 12, 2026
0bd11a3
refactor(HostRouting): improve type handling and method calls
oguzhanbukcuoglu Mar 12, 2026
b68d9f5
refactor(Component): add setComponent method for improved component n…
oguzhanbukcuoglu Mar 12, 2026
0e80641
docs(Console): add comprehensive guide for console command structure …
oguzhanbukcuoglu Mar 12, 2026
e972b92
refactor(RelationshipMap, ResolveConnector, WarmupCache): enhance err…
oguzhanbukcuoglu Mar 12, 2026
c37aa0b
fix(QueryBuilder): add paginate method for dynamic pagination based o…
oguzhanbukcuoglu Mar 12, 2026
43af2cc
docs(InputHydrate): add class-level documentation for input schema hy…
oguzhanbukcuoglu Mar 12, 2026
c90258d
refactor(BaseController): extract AJAX handling into ManageIndexAjax …
oguzhanbukcuoglu Mar 12, 2026
b341311
docs(AGENTS): update package structure and add schema hydration guide…
oguzhanbukcuoglu Mar 12, 2026
12f5642
refactor(vuetify-standards): update form validation and component org…
oguzhanbukcuoglu Mar 12, 2026
5c7fad6
docs(FRONTEND_SUGGESTIONS): add comprehensive frontend enhancement su…
oguzhanbukcuoglu Mar 12, 2026
a9e203a
refactor(CardTypeSeeder, PaymentServiceSeeder): simplify constructor …
oguzhanbukcuoglu Mar 12, 2026
903e375
refactor(PermissionController, RoleController): remove unused API con…
oguzhanbukcuoglu Mar 12, 2026
3aef10b
test(Modules): enhance test coverage and add new tests for various co…
oguzhanbukcuoglu Mar 12, 2026
01afa2e
test(Entities): add comprehensive tests for LocaleTagsCast, CacheObse…
oguzhanbukcuoglu Mar 12, 2026
da4ab10
refactor(SCSS): remove unused SCSS files and mixins
oguzhanbukcuoglu Mar 12, 2026
d50bd50
Merge remote-tracking branch 'origin/dev' into dev
oguzhanbukcuoglu Mar 12, 2026
dd3eba1
refactor(ModalMedia): update modal binding and integrate useModal hook
oguzhanbukcuoglu Mar 12, 2026
9c8e916
refactor(MediaGrid): replace mixin with props and useMediaItems hook
oguzhanbukcuoglu Mar 12, 2026
489a2f1
refactor(Locale): replace mixin with useLocale hook and streamline st…
oguzhanbukcuoglu Mar 12, 2026
0ff6656
refactor(Components): remove unused mixins and integrate hooks for im…
oguzhanbukcuoglu Mar 12, 2026
cb9d865
refactor(ImageOld): enhance functionality by integrating media librar…
oguzhanbukcuoglu Mar 12, 2026
cbf17bd
refactor(Hooks): integrate new media hooks and streamline existing fu…
oguzhanbukcuoglu Mar 12, 2026
07418ef
refactor(Helpers): modularize global helper functions and improve bac…
oguzhanbukcuoglu Mar 12, 2026
b61e18e
feat(ESLint): enforce Composition API style for new components
oguzhanbukcuoglu Mar 12, 2026
3d537fe
feat(vitest): enhance test coverage configuration
oguzhanbukcuoglu Mar 12, 2026
e3a1d1b
feat(Inputs): introduce InputRenderer and registry for dynamic compon…
oguzhanbukcuoglu Mar 12, 2026
ee9a71f
test(vitest): enhance jsdom setup with CSRF token and utility helpers
oguzhanbukcuoglu Mar 12, 2026
03dcd1a
refactor(Locale): update useLocale hook to improve locale management
oguzhanbukcuoglu Mar 12, 2026
784fb92
feat(Table): enhance item action handling with dynamic target support
oguzhanbukcuoglu Mar 12, 2026
d4395d3
refactor(Filepond): clean up preview method and improve output buffering
oguzhanbukcuoglu Mar 12, 2026
61cfa69
test: add comprehensive unit tests for various components and hooks
oguzhanbukcuoglu Mar 12, 2026
f6be1b8
docs(docs): remove default port from preview script in package.json
oguzhanbukcuoglu Mar 12, 2026
9bed6d1
chore(docs): update asset references and remove deprecated files
oguzhanbukcuoglu Mar 12, 2026
7c431b9
fix(translations): standardize capitalization in provider confirmatio…
celikerde Mar 18, 2026
00b8344
fix(HandlesOAuth): update provider confirmation message capitalization
celikerde Mar 18, 2026
92aa871
refactor(Table): improve table item rendering and formatting logic
oguzhanbukcuoglu Mar 21, 2026
12bf202
refactor(Sidebar): streamline sidebar behavior and improve responsive…
oguzhanbukcuoglu Mar 23, 2026
cc233cc
feat(Table): implement client-side grouping functionality and enhance…
oguzhanbukcuoglu Mar 23, 2026
b98ae30
feat(Traitify): add static method for retrieving trait methods
oguzhanbukcuoglu Mar 23, 2026
d88cad2
fix(Helpers): update benchmark function signature to include elapsed …
oguzhanbukcuoglu Mar 23, 2026
ce476f1
refactor(Currency): implement cached user currency retrieval and upda…
oguzhanbukcuoglu Mar 23, 2026
e4c0d90
feat(User & Company Traits): enhance user role management and company…
oguzhanbukcuoglu Mar 23, 2026
fbbb672
feat(Traits): enhance global scopes and existence checks for various …
oguzhanbukcuoglu Mar 23, 2026
70e4f1e
refactor(Relationships): enhance form field retrieval with serializat…
oguzhanbukcuoglu Mar 23, 2026
0463ae0
refactor(Traits): optimize authorization record handling and existenc…
oguzhanbukcuoglu Mar 23, 2026
9da94ba
refactor(CreatorHydrate): clean up input data by unsetting unnecessar…
oguzhanbukcuoglu Mar 23, 2026
7ae916e
feat(Hydrate): integrate new connector handling in Input and Repeater…
oguzhanbukcuoglu Mar 23, 2026
9bbfd04
refactor(Traits): update user role checks to use new attribute naming…
oguzhanbukcuoglu Mar 23, 2026
64db9a9
refactor(Traits): enhance header management and relationship handling
oguzhanbukcuoglu Mar 23, 2026
6c4623b
perf(FormActions): enhance form action retrieval logic based on modal…
oguzhanbukcuoglu Mar 23, 2026
8098eee
perf(ManageForm): improve form schema handling and relationship mapping
oguzhanbukcuoglu Mar 23, 2026
2eb5a73
perf(BaseController): add conditional form handling for modal editing
oguzhanbukcuoglu Mar 23, 2026
8d08766
feat(PanelController): integrate ManageAppends and ManageWiths traits…
oguzhanbukcuoglu Mar 23, 2026
ffc119b
fix(ManageUtilities): update getFormActions call to include context p…
oguzhanbukcuoglu Mar 23, 2026
54af77d
feat(TableTraits): enhance table handling with new eager loading and …
oguzhanbukcuoglu Mar 23, 2026
e80507c
feat(PriceMutators): add global scope for paid status and improve pay…
oguzhanbukcuoglu Mar 23, 2026
f39d6c5
perf: enhance eager loading and relationship handling across models
oguzhanbukcuoglu Mar 23, 2026
a22da88
test: add TableEagerMergeTest for merging indexed arrays
oguzhanbukcuoglu Mar 23, 2026
881e420
refactor(PaymentableRelation): remove PaymentableRelation class
oguzhanbukcuoglu Mar 23, 2026
89ae1fd
feat(config): add configuration option for item eager formatting
oguzhanbukcuoglu Mar 23, 2026
c6fdb7a
feat(migrations): add ui_preferences column to users table
oguzhanbukcuoglu Mar 23, 2026
b704670
refactor(Payment): update payment attributes and scopes for improved …
oguzhanbukcuoglu Mar 23, 2026
acb8396
refactor(BaseServiceProvider): improve translation service registrati…
oguzhanbukcuoglu Mar 23, 2026
5329e34
refactor(form_drafts): comment out timezone configuration in login form
oguzhanbukcuoglu Mar 23, 2026
7e4c69e
refactor(FormPageUtility): enhance form item retrieval with additiona…
oguzhanbukcuoglu Mar 23, 2026
4af0cee
feat(config): enhance company configuration and validation display
oguzhanbukcuoglu Mar 23, 2026
1eaeee6
feat(table): add fixed last column feature for improved table usability
oguzhanbukcuoglu Mar 23, 2026
94b3c5c
refactor(Table): remove z-index from last column styling
oguzhanbukcuoglu Mar 24, 2026
86865cc
feat(Relationships): enhance form fields retrieval with relationship …
oguzhanbukcuoglu Mar 24, 2026
01f245c
fix(Browser): correct equality check in initial value mapping
oguzhanbukcuoglu Mar 24, 2026
e962e63
Merge pull request #343 from unusualify/bugfix/implement-uppercase-go…
oguzhanbukcuoglu Mar 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .cursor/rules/vuetify-standards.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ globs: vue/src/js/**/*.js, vue/src/js/**/*.vue
- Implement Vue.js composition API for state management and component logic.
- Use Vite for asset bundling and development server.
- Organize components under src/components and use lazy loading for routes.
- Validate forms using Vuelidate and enhance UI with Vuetify components.
- Validate forms using useValidation (vue/src/js/hooks/useValidation.js) and enhance UI with Vuetify components.

Key points
- Follow Vue.js's component-driven design for clear separation of business logic, data, and presentation layers.
Expand All @@ -33,11 +33,11 @@ globs: vue/src/js/**/*.js, vue/src/js/**/*.vue
- Use Vite for asset bundling and development server.
- Organize components under vue/src/components
- Organize composables under vue/src/hooks
- Organize behaviors under vue/src/behaviors
- Organize composables under vue/src/js/hooks (behaviors folder is deprecated)
- Organize directives under vue/src/directives
- Organize utilities under vue/src/utils
- Organize stores under vue/src/stores
- Validate forms using Vuelidate and use vue/src/hooks/useValidation.js
- Validate forms using vue/src/js/hooks/useValidation.js (useValidation composable)
- Use vue/src/hooks/useInput hook on input components under vue/src/components/inputs


20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.{js,vue}]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,5 @@ jobs:
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
# composer update --prefer-dist --no-interaction
- name: Execute Laravel tests
run: composer test
run: composer test:fast

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@ all-coverage-clover.xml

# AI
.modulai/
/tmp-modules/
64 changes: 63 additions & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ You are an expert in Modularity package development. This is the unusualify/modu

src/ # Package source code (work here)
├── Console # Artisan commands
├── Hydrates/ # Schema hydrators (InputHydrator → *Hydrate)
│ └── Inputs/ # Input-specific hydrates (type → schema)
├── Http/Controllers/ # Controllers
├── Providers/ # Service providers
├── Repositories/ # Repository pattern
Expand All @@ -18,7 +20,9 @@ src/ # Package source code (work here)
└── Entities/ # Models
vue/src/ # Frontend source
├── js/components/ # Vuetify components
└── js/composables/ # Vue composables
├── js/hooks/ # Vue composables
├── js/utils/ # Utilities (helpers, schema, etc.)
└── js/store/ # Vuex store

## PATTERNS TO ALWAYS USE
2. **Use Traits**: ManageMedias, HasMedias, MediasTrait etc.
Expand Down Expand Up @@ -52,5 +56,63 @@ vue/src/ # Frontend source
- ❌ Hard-coded paths (use config)
- ❌ Options API in Vue (use Composition API)
- ❌ Plain HTML (use Vuetify components)
- ❌ window.__* helpers in new code (use import from @/utils/helpers)

## HELPERS
- Prefer `import { isObject, dataGet } from '@/utils/helpers'` over `window.__isObject`, `window.__data_get`
- window.__* is deprecated; kept for backward compatibility during migration

---

## HYDRATE ↔ INPUT ADAPTER

The backend (PHP Hydrates) and frontend (Vue Inputs) communicate via a **schema contract**. Hydrates produce schema; Input components consume it.

### Data Flow

```
Module config (type: 'checklist') → InputHydrator → ChecklistHydrate → schema { type: 'input-checklist', ... }
FormBase/FormBaseField → mapTypeToComponent('input-checklist') → VInputChecklist (Checklist.vue)
```

### Naming Convention

| Hydrate class | Config type | Output type (schema) | Vue component | File |
|--------------------|-------------|----------------------|-----------------|-------------------|
| ChecklistHydrate | checklist | input-checklist | VInputChecklist | Checklist.vue |
| TaggerHydrate | tagger | input-tagger | VInputTagger | Tagger.vue |
| SelectHydrate | select | select (or input-select-scroll) | v-select | (Vuetify) |
| FileHydrate | file | input-file | VInputFile | File.vue |
| ImageHydrate | image | input-image | VInputImage | Image.vue |
| ... | ... | input-{kebab} | VInput{Studly} | {Studly}.vue |

- **Hydrate**: `studlyName($input['type']) . 'Hydrate'` → e.g. `checklist` → `ChecklistHydrate`
- **Output type**: Hydrate sets `$input['type'] = 'input-{kebab}'` (e.g. `input-checklist`)
- **Vue component**: `registerComponents(..., 'inputs', 'VInput')` → `Checklist.vue` → `VInputChecklist`
- **Resolution**: `mapTypeToComponent('input-checklist')` → `v-input-checklist` (kebab of VInputChecklist)

### When Adding a New Input

1. **PHP**: Create `src/Hydrates/Inputs/{Studly}Hydrate.php` extending `InputHydrate`
- Set `$input['type'] = 'input-{kebab}'` in `hydrate()`
- Define `$requirements` for default schema keys
2. **Vue**: Create `vue/src/js/components/inputs/{Studly}.vue`
- Use `useInput`, `makeInputProps`, `makeInputEmits` from `@/hooks`
- Component registers as `VInput{Studly}` via `includeFormInputs` glob
3. **Registry** (optional): Add to `hydrateTypeMap` in `registry.js` for explicit mapping

### Schema Contract

Vue inputs expect schema props via `obj.schema` or `boundProps`:

- **Common**: `name`, `label`, `default`, `rules`, `items`, `itemValue`, `itemTitle`
- **Selectable**: `cascadeKey`, `cascades`, `repository`, `endpoint`
- **Files**: `accept`, `maxFileSize`, `translated`, `max`
- **Hydrate-only** (stripped before frontend): `route`, `model`, `repository`, `cascades`, `connector`

### Hydrate Types → Vue Components

See `vue/src/js/components/inputs/registry.js` → `hydrateTypeMap` for the full mapping.

Always ask for clarification if the request is ambiguous.
91 changes: 91 additions & 0 deletions FRONTEND_SUGGESTIONS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# Frontend Enhancement Suggestions

For your review when you're back. Respond to what you'd like to prioritize.

---

## 1. Options API → Composition API Migration

**Current**: ~90% of components use Options API; AGENTS.md mandates Composition API.

**Suggestions**:
- Migrate high-traffic components first: Form.vue, Auth.vue, Datatable.vue
- Add ESLint rule to enforce Composition API for new components
- Create migration script for incremental conversion

---

## 2. Replace Mixins with Composables

**Current**: Mixins (Locale, Modal, Input, MediaLibrary) overlap with composables.

**Suggestions**:
- Audit `grep -r "mixins:" vue/src`
- Replace each mixin with equivalent composable
- ~~Deprecate `mixins/` folder~~ ✓ Done – refactored to hooks, folder removed

---

## 3. Complete CustomFormBase Extraction

**Current**: Input Registry and InputRenderer exist; CustomFormBase still has inline type blocks.

**Suggestions**:
- Extract each schema type (preview, title, radio, array, wrap/group, etc.) into `schema-types/Input*.vue`
- CustomFormBase becomes a loop over `<InputRenderer :schema="obj" />` with slot passthrough
- Reduces CustomFormBase from ~1400 to ~200 lines

---

## 4. Add CSRF Meta to Vitest Setup

**Current**: Some tests fail because `document.querySelector('meta[name="csrf-token"]')` returns null in jsdom.

**Suggestions**:
- Add `<meta name="csrf-token" content="test">` to vitest-setup jsdom
- Or mock Document in affected tests

---

## 5. TypeScript Migration

**Current**: All .js and .vue; no type safety.

**Suggestions**:
- Migrate utils/helpers.js to TypeScript first
- Add types for store, API responses
- Incremental migration for new files

---

## 6. Labs Component Flag

**Current**: `components/labs/` mixed with production.

**Suggestions**:
- Add `VUE_ENABLE_LABS=true` to conditionally load labs in build
- Exclude labs from production bundle when flag is false

---

## 7. Replace window.__* Usage in Componables

**Current**: Many composables still use `window.__isObject`, `window.__isset`, etc.

**Suggestions**:
- Replace with `import { isObject, isset } from '@/utils/helpers'` in composables
- Remove window.__* assignments from init.js once migration is complete

---

## 8. Vuex → Pinia Migration

**Current**: Vuex 4; Pinia recommended for Vue 3.

**Suggestions**:
- See docs/PINIA_MIGRATION.md
- Plan for v4.x; create Pinia stores alongside Vuex

---

**Priority order** (suggested): 4 (fix tests) → 7 (finish helpers migration) → 1 (Composition API) → 3 (CustomFormBase extraction) → 2 (mixins) → 5 (TypeScript) → 6 (labs) → 8 (Pinia)
31 changes: 28 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,13 @@
"wikimedia/composer-merge-plugin": "^2.1"
},
"require-dev": {
"brianium/paratest": "^7.4",
"doctrine/dbal": "^3.9",
"fakerphp/faker": "^1.9.1",
"laravel/pint": "^1.18",
"orchestra/testbench": "^7.0|^8.23.4|^9.0",
"larastan/larastan": "^2.0",
"laravel/pint": "^1.18",
"laravel/sanctum": "^3.3",
"orchestra/testbench": "^7.0|^8.23.4|^9.0",
"phpunit/phpunit": "^9.0|^10.0.7|^11.0"
},
"extra": {
Expand Down Expand Up @@ -109,13 +110,37 @@
"Unusualify\\Modularity\\Tests\\": "tests",
"Workbench\\App\\": "workbench/app/",
"Workbench\\Database\\Factories\\": "workbench/database/factories/",
"Workbench\\Database\\Seeders\\": "workbench/database/seeders/"
"Workbench\\Database\\Seeders\\": "workbench/database/seeders/",
"Modules\\": "tests/Stubs/Modules",
"TestModules\\": "test-modules"
}
},
"scripts": {
"test": "vendor/bin/phpunit --stop-on-defect --no-coverage",
"test-clean": [
"@php -r \"foreach(glob('vendor/orchestra/testbench-core/laravel/bootstrap/cache/*.php') as \\$f) unlink(\\$f);\"",
"echo 'Test cache cleared'"
],
"test:parallel": [
"@test-clean",
"@php -d memory_limit=1G vendor/bin/paratest --processes=2 --stop-on-defect --no-coverage"
],
"test:parallel:coverage": [
"@test-clean",
"@php -d memory_limit=1G vendor/bin/paratest --processes=2 --stop-on-defect --coverage-html coverage-html"
],
"test:fast": [
"@test-clean",
"@php -d memory_limit=1G vendor/bin/paratest --processes=4 --stop-on-defect --no-coverage"
],
"test:fast:coverage": [
"@test-clean",
"@php -d memory_limit=1G vendor/bin/paratest --processes=4 --stop-on-defect --coverage-html coverage-html"
],
"test:brokers": "vendor/bin/phpunit --stop-on-defect --no-coverage tests/Brokers",
"test:events": "vendor/bin/phpunit --stop-on-defect --no-coverage tests/Events",
"test:exceptions": "vendor/bin/phpunit --stop-on-defect --no-coverage tests/Exceptions",
"test:facades": "vendor/bin/phpunit --stop-on-defect --no-coverage tests/Facades",
"test:helpers": "vendor/bin/phpunit --stop-on-defect --no-coverage tests/Helpers",
"test:http": "vendor/bin/phpunit --stop-on-defect --no-coverage tests/Http",
"test:models": "vendor/bin/phpunit --stop-on-defect --no-coverage tests/Models",
Expand Down
Loading
Loading