+
+
+ A template for creating new Nextcloud apps +
+ + + +--- + +A starting point for building Nextcloud apps following ConductionNL conventions. + +> **Pre-wired for [OpenRegister](https://github.com/ConductionNL/openregister)** — all data is stored as OpenRegister objects. If your app needs OpenRegister, install it first. If not, remove the dependency from `appinfo/info.xml` and `openspec/app-config.json`. + +## Screenshots + +_Add screenshots here once the app has a UI._ + +## Features + +Features are defined in [`openspec/specs/`](openspec/specs/). See the [roadmap](openspec/ROADMAP.md) for planned work. + +### Core +- **Dashboard** — Personal overview page with key information at a glance +- **Admin Settings** — Configurable settings panel for administrators + +### Supporting +- **OpenRegister Integration** — Pre-wired data layer using OpenRegister objects +- **Quality Pipeline** — PHPCS, PHPMD, Psalm, PHPStan, ESLint, Stylelint + +## Architecture + +```mermaid +graph TD + A[Vue 2 Frontend] -->|REST API| B[OpenRegister API] + B --> C[(PostgreSQL JSON store)] + A --> D[Nextcloud Activity] + A --> E[Nextcloud Search] +``` + +_Update this diagram during `/app-explore` sessions as the architecture evolves._ + +### Data Model + +| Object | Description | +|--------|-------------| +| _(define your data objects here)_ | — | + +_Data model is defined using OpenRegister schemas. See [`openspec/specs/`](openspec/specs/) for feature-level design decisions and [`openspec/architecture/`](openspec/architecture/) for architectural decisions._ + +### Directory Structure + +``` +app-template/ +├── appinfo/ # Nextcloud app manifest, routes, navigation +├── lib/ # PHP backend +│ ├── AppInfo/Application.php +│ ├── Controller/ # DashboardController, SettingsController +│ ├── Service/SettingsService.php +│ ├── Listener/DeepLinkRegistrationListener.php +│ ├── Repair/InitializeSettings.php +│ └── Settings/ # AdminSettings, app_template_register.json +├── templates/ # PHP templates (SPA shells) +├── src/ # Vue 2 frontend +│ ├── main.js # App entry point +│ ├── App.vue # Root component +│ ├── navigation/MainMenu.vue # App navigation sidebar +│ ├── router/ # Vue Router +│ ├── store/ # Pinia stores +│ └── views/ # Route-level views + UserSettings.vue +├── openspec/ # Specifications, decisions, and roadmap +│ ├── app-config.json # Canonical app config (id, goal, dependencies, CI) +│ ├── config.yaml # OpenSpec CLI configuration +│ ├── specs/ # Feature specs (input for OpenSpec changes) +│ ├── architecture/ # App-specific Architectural Decision Records +│ ├── ROADMAP.md # Product roadmap +│ └── changes/ # OpenSpec change directories (created on first change) +├── tests/ # Unit and integration tests +├── l10n/ # Translations (en, nl) +├── .github/workflows/ # CI/CD pipelines +├── Makefile # Dev helpers (make dev-link) +└── img/ # App icons and screenshots +``` + +## Requirements + +| Dependency | Version | +|-----------|---------| +| Nextcloud | 28 – 33 | +| PHP | 8.1+ | +| Node.js | 20+ | +| [OpenRegister](https://github.com/ConductionNL/openregister) | latest | + +## Installation + +### From the Nextcloud App Store + +1. Go to **Apps** in your Nextcloud instance +2. Search for **Nextcloud App Template** +3. Click **Download and enable** + +> OpenRegister must be installed first. [Install OpenRegister →](https://apps.nextcloud.com/apps/openregister) + +### From Source + +```bash +cd /var/www/html/custom_apps +git clone https://github.com/ConductionNL/nextcloud-app-template.git app-template +cd app-template +npm install && npm run build +php occ app:enable app-template +``` + +## Development + +### Start the environment + +```bash +docker compose -f ../openregister/docker-compose.yml up -d +``` + +### Frontend development + +```bash +npm install +npm run dev # Watch mode +npm run build # Production build +``` + +### Code quality + +```bash +# PHP +composer check:strict # All quality checks (PHPCS, PHPMD, Psalm, PHPStan, tests) +composer cs:fix # Auto-fix PHPCS issues +composer phpmd # Mess detection +composer phpmetrics # HTML metrics report + +# Frontend +npm run lint # ESLint +npm run stylelint # CSS linting +``` + +### Enable locally + +Nextcloud requires the app directory name to match the `+ {{ t('app-template', 'Starter overview with sample KPIs and activity placeholders. Replace this view with your own data.') }} +
++ {{ t('app-template', 'Wire buttons here to create records, open lists, or deep links. Use the sidebar for Settings and Documentation.') }} +
+{{ t('app-template', 'For support, contact us at') }} support@conduction.nl
+| {{ t('openbuilt', 'Version') }} | +{{ t('openbuilt', 'Target') }} | +{{ t('openbuilt', 'Status') }} | ++ |
|---|---|---|---|
| {{ job.applicationVersion }} | +{{ job.target }} | +{{ statusLabel(job.status) }} | +
+ |
+
+ {{ t('openbuilt', 'No exports yet.') }} +
+ +