diff --git a/AGENTS.md b/AGENTS.md index 2ec85cb..55ca588 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -22,7 +22,7 @@ Before meaningful code changes, read: - Keep backend code under `backend/src/Socialize.Api`. - The solution file is `backend/Socialize.slnx`. - Backend feature code currently follows FastEndpoints module folders under `Modules/`. -- Frontend feature work should prefer `frontend/src/features/` for new isolated slices while preserving existing route/store code until a task migrates it. +- Frontend feature-owned code belongs under `frontend/src/features/`. - Frontend runtime config must flow through `frontend/src/config.js`. - If backend contracts change, run `./scripts/update-openapi.sh` when the backend is running. - Dev servers use HTTP and bind to `0.0.0.0` for LAN access. @@ -119,4 +119,4 @@ Contract changes: - Existing checked-in env and appsettings files may include legacy sensitive-looking values; do not propagate those values into new docs or templates. - The frontend is still JavaScript, not the TypeScript starter app generated by the bootstrap script. New OpenAPI scaffolding exists, but migrating app code to generated typed API calls should happen by task. -- Some existing frontend code still lives under `views/`, `stores/`, and `plugins/`. Move it into feature folders only when a task explicitly owns that migration. +- Feature-owned frontend route views and stores now live under `frontend/src/features/*`; keep future feature work there. diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 0d76698..3d6b9ac 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -55,11 +55,10 @@ frontend/src/ ├─ pages/ ├─ plugins/ ├─ router/ -├─ stores/ -└─ views/ +└─ stores/ ``` -The generated scaffold expects `app/`, `features/`, `pages/`, `router/`, `stores/`, and `api/`. Socialize currently has substantial existing code under `views/`, `stores/`, and `plugins/`. New isolated feature work should prefer `features//`; existing screens should be migrated only by explicit task. +Feature-owned frontend code lives under `frontend/src/features//`. Feature folders may contain route views, stores, composables, constants, utilities, and local components. Cross-cutting shell code remains in `layouts/`, shared UI remains in `components/`, global plugins remain in `plugins/`, and app-wide stores may remain in `stores/`. ## API Contract diff --git a/docs/CONVENTIONS.md b/docs/CONVENTIONS.md index e5e9298..ff97b7b 100644 --- a/docs/CONVENTIONS.md +++ b/docs/CONVENTIONS.md @@ -15,8 +15,8 @@ - Use the shared Axios API client in `frontend/src/plugins/api.js` for current JavaScript flows. - Preserve auth refresh behavior in `authStore` and the API plugin. - Route-level authenticated app screens live under `/app/*`. -- New isolated feature slices should prefer `frontend/src/features//`. -- Do not move existing views/stores into feature folders unless a task owns that migration. +- Feature-owned views, stores, composables, constants, utilities, and local components belong under `frontend/src/features//`. +- Keep only cross-cutting app shell, plugins, shared components, and app-wide stores outside feature folders. ## Docs diff --git a/docs/FEATURES/platform-scaffold.md b/docs/FEATURES/platform-scaffold.md index d05cbf7..123387a 100644 --- a/docs/FEATURES/platform-scaffold.md +++ b/docs/FEATURES/platform-scaffold.md @@ -30,7 +30,7 @@ backend/tests/Socialize.Tests ## Frontend -The frontend remains the existing Vue 3 app. The scaffold directories `frontend/src/api`, `frontend/src/features`, `frontend/src/pages`, `frontend/src/layouts`, and `frontend/src/app` are available for incremental migration. +The frontend remains the existing Vue 3 app. Feature-owned route views and stores live under `frontend/src/features/`, while shared app shell code stays under `frontend/src/layouts`, `frontend/src/components`, `frontend/src/plugins`, and `frontend/src/router`. ## API Contract diff --git a/docs/PROMPTS/frontend-task.md b/docs/PROMPTS/frontend-task.md index 282addc..12bde68 100644 --- a/docs/PROMPTS/frontend-task.md +++ b/docs/PROMPTS/frontend-task.md @@ -14,8 +14,7 @@ You are implementing a frontend task in this repository. ## Instructions - Implement only the requested frontend task. -- Existing route-level app screens live under `frontend/src/views/app`. -- New isolated feature slices should prefer `frontend/src/features/`. +- Feature-owned route views, stores, composables, constants, utilities, and local components belong under `frontend/src/features/`. - Use `frontend/src/config.js` for runtime configuration. - Preserve token refresh behavior in `authStore` and `frontend/src/plugins/api.js`. - Use generated API types from `frontend/src/api/schema.d.ts` when the endpoint has been generated. diff --git a/docs/PROMPT_TEMPLATE.md b/docs/PROMPT_TEMPLATE.md index fad1b02..da43ae3 100644 --- a/docs/PROMPT_TEMPLATE.md +++ b/docs/PROMPT_TEMPLATE.md @@ -24,7 +24,7 @@ Implement: - Do not refactor unrelated code. - Follow existing backend/frontend structure. - Backend code currently belongs under `backend/src/Socialize.Api/Modules/`. -- New isolated frontend feature code should prefer `frontend/src/features/`. +- Frontend feature-owned code belongs under `frontend/src/features/`. - If backend contracts change, update OpenAPI using `./scripts/update-openapi.sh`. - Do not manually duplicate generated API types when generated types exist. diff --git a/frontend/.eslintrc.json b/frontend/.eslintrc.json index 4750a7a..d491413 100644 --- a/frontend/.eslintrc.json +++ b/frontend/.eslintrc.json @@ -18,5 +18,7 @@ "vue", "tailwindcss" ], - "rules": {} + "rules": { + "tailwindcss/no-custom-classname": "off" + } } diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 9c93647..69566e0 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -35,10 +35,10 @@