bfda98e678
Version bump to 0.1.0, updated app icons, migration fixes, various Vue component improvements, CLAUDE.md project instructions, gitignore for test artifacts, and webpack/main.js configuration updates. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4.0 KiB
4.0 KiB
CLAUDE.md
Project Overview
Nextcloud 28 app (PHP backend, Vue 3 frontend) for managing scout group (Pfadfinderverein) members, families, fees, camps, and more.
Tech Stack
- Backend: PHP 8.1+, Nextcloud OCP APIs, MariaDB, Doctrine DBAL via
IDBConnection - Frontend: Vue 3 (Composition API,
<script setup>), Pinia stores, Vue Router (hash history),@nextcloud/vuev9, webpack - Build:
npx webpack --node-env production, output tojs/ - Deploy:
make redeploycopies app into running Nextcloud container. Version bump inappinfo/info.xmlrequired to bust browser cache (?v=hash).
Critical @nextcloud/vue v9 Gotchas
These caused most bugs in this project. Every contributor must know them:
- NcTextField: Use
:model-value/@update:model-value(Vue 3). NOT:value/@update:value/:value.sync(Vue 2). Fields will appear blank or not emit changes otherwise. - NcSelect: Always pass
:reduce="o => o.value"andlabel="label"when options are objects{value, label}. Without:reduce, the select can't match string model-values to option objects. - NcButton: Has
overflow: hiddenandpadding: 0in scoped styles. Global overrides via<style>blocks in.vuefiles are unreliable (css-loader may drop rules). Use a<style>tag injected frommain.jsafter mount instead. - appName/appVersion: The library reads these two ways: (a) bare global identifier
appName(use webpack DefinePlugin), (b) Vueinject('appName')(useapp.provide()). Both are needed. - loadState("core","apps"): Nextcloud 28 returns an object, not an array.
@nextcloud/vuecalls.find()on it, which crashes. Patch inmain.jswithObject.values()before Vue mounts.
Code Conventions
Vue Components
- Always use
<script setup>with Composition API - German UI labels with proper Umlauts (Wölflinge, Männlich, Zusätzliche Notizen, etc.)
- Validation: show errors inline during editing, disable submit button until valid
- Emit pattern for form components:
$emit('update', fieldName, value)— parent handles viaonFormUpdate(field, value)
Backend (PHP)
- Controllers extend
OCP\AppFramework\Controller, returnJSONResponse - Services handle business logic, Mappers handle DB queries (Nextcloud ORM pattern)
- Migrations in
lib/Migration/, class name formatVersionNNNNNNDateYYYYMMDDHHMMSS - Use
IQueryBuilder::PARAM_STRfor null values (notPARAM_NULLwhich doesn't exist) - Wire
AuditService->logCreate/logUpdate/logDeleteinto all CRUD service methods
Stores (Pinia)
- One store per entity (
stores/members.js,stores/families.js, etc.) - Fetch via
@nextcloud/axios+generateUrl() - Always expose
clearError()action
UI Guidelines
- Buttons must show full text, never truncated. Global fix in
main.jshandles NcButton overflow. - Sidebar active item must have rounded corners (global fix in
main.js). - Sensitive reports/actions use red styling (red border, red text) with tooltip explanation instead of overlapping badges.
- Use the global
SearchBarcomponent for member search, not inline NcTextField duplicates. - Tables should show all columns relevant to displayed filters (e.g. if "Geburtstage diesen Monat" filter exists, show Geburtsdatum column).
- Default sensible values for new records (e.g. Eintrittsdatum = today, Status = aktiv, Rolle = mitglied).
Deployment Notes
make deploy= full clean deploy (build + fresh containers + install NC + copy app + enable)make redeploy= rebuild JS + copy into running container- After redeploy without version bump, restart container (
docker compose restart nextcloud) and hard-refresh browser - Version bump (
appinfo/info.xml+webpack.config.jsDefinePlugin +main.jsprovide) +occ upgradeis the reliable way to bust all caches
Gitea
- Repo:
shahondin1624/Mitgliederverwaltungongit.shahondin1624.de - Issues use labels:
enhancement,bug,backend,frontend,security,epic,priority:high/medium/low - Close issues via commit message:
(Closes #N)