π©πͺ Deutsch | π¬π§ English
Dieses Dokument richtet sich an Entwickler, die zur Vereins-App beitragen oder sie erweitern mΓΆchten.
- Voraussetzungen
- Entwicklungsumgebung einrichten
- Projektstruktur
- Architektur
- Backend (PHP)
- Frontend (Vue 3)
- Testing
- Deployment
- Contributing
- Code Style
| Komponente | Version | Zweck |
|---|---|---|
| PHP | β₯ 8.0 | Backend |
| Node.js | β₯ 18.x | Frontend Build |
| npm | β₯ 9.x | Package Manager |
| Composer | β₯ 2.x | PHP Dependencies |
| Nextcloud | β₯ 28.0 | App-Plattform |
| SQLite/MySQL/PostgreSQL | - | Datenbank |
- VS Code mit Extensions: PHP Intelephense, Volar (Vue 3), ESLint
- Git fΓΌr Versionskontrolle
- Postman oder curl fΓΌr API-Tests
cd /path/to/nextcloud/apps
git clone https://github.com/Wacken2012/nextcloud-verein.git verein
cd vereincomposer install # PHP Dependencies
npm install # Frontend Dependenciesnpm run watch # Watch-Modus (Entwicklung)
npm run build # Production Buildsudo -u www-data php /var/www/html/nextcloud/occ app:enable vereinverein/
βββ appinfo/
β βββ database.xml # Datenbankschema
β βββ info.xml # App-Metadaten
β βββ routes.php # API-Routen
βββ docs/ # Dokumentation
βββ js/
β βββ components/ # Vue-Komponenten
β βββ dist/ # Kompilierte Assets
β βββ App.vue # Haupt-Vue-App
β βββ main.js # Entry Point
β βββ api.js # API-Client
βββ lib/
β βββ Controller/ # HTTP Controller
β βββ Db/ # Entities & Mapper
β βββ Middleware/ # Request Middleware
β βββ Service/ # Business Logic
β βββ Settings/ # Admin Settings
βββ templates/ # PHP Templates
βββ tests/ # Unit & Integration Tests
βββ vendor/ # Composer Dependencies
βββββββββββββββββββββββββββββββββββββββ
β Frontend (Vue 3) β
βββββββββββββββββββββββββββββββββββββββ€
β Controller (PHP) β
βββββββββββββββββββββββββββββββββββββββ€
β Service (Business Logic) β
βββββββββββββββββββββββββββββββββββββββ€
β Mapper/DB (ORM) β
βββββββββββββββββββββββββββββββββββββββ€
β Nextcloud Core (OCP) β
βββββββββββββββββββββββββββββββββββββββ
<?php
namespace OCA\Verein\Controller;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\JSONResponse;
class ExampleController extends Controller {
/**
* @NoAdminRequired
* @NoCSRFRequired
*/
public function index(): JSONResponse {
return new JSONResponse(['status' => 'ok']);
}
}| Annotation | Bedeutung |
|---|---|
@NoAdminRequired |
Nicht-Admins dΓΌrfen zugreifen |
@NoCSRFRequired |
Kein CSRF-Token nΓΆtig |
@PublicPage |
Γffentlich zugΓ€nglich |
use OCA\Verein\Attributes\RequirePermission;
#[RequirePermission('members.create')]
public function create(): JSONResponse {
// Nur mit members.create Berechtigung
}<template>
<NcButton @click="handleClick">
{{ t('verein', 'Klick mich') }}
</NcButton>
</template>
<script>
import { NcButton } from '@nextcloud/vue'
import axios from '@nextcloud/axios'
import { generateUrl } from '@nextcloud/router'
export default {
name: 'ExampleComponent',
methods: {
async handleClick() {
const { data } = await axios.get(generateUrl('/apps/verein/api'))
}
}
}
</script>import { success, error } from '../notify.js'
success('Erfolgreich gespeichert')
error('Fehler beim Speichern')# Alle Tests
composer test
# Nur Unit Tests
./vendor/bin/phpunit --testsuite Unit
# Schnelle Tests (Export, Validation)
./vendor/bin/phpunit --testsuite Fast
# Mit Coverage
./vendor/bin/phpunit --coverage-html coverage/# Deploy Script
./scripts/deploy-to-nextcloud.sh
# Manuell
rsync -av --exclude='node_modules' --exclude='.git' \
./ /var/www/html/nextcloud/apps/verein/- Fork & Branch erstellen:
git checkout -b feature/mein-feature - Γnderungen committen (Conventional Commits)
- Pull Request gegen
developBranch
<type>(<scope>): <description>
feat(members): Add bulk import
fix(export): Correct PDF widths
docs(api): Add OpenAPI spec
- PHP: PSR-12 mit
php-cs-fixer - JavaScript: ESLint mit Nextcloud-Config
- Typisierung in PHP (Type Hints, Return Types)
- Tests fΓΌr neue Features
This document is intended for developers who want to contribute to or extend the Vereins-App.
- Prerequisites
- Development Environment Setup
- Project Structure
- Architecture
- Backend (PHP)
- Frontend (Vue 3)
- Testing
- Deployment
- Contributing
- Code Style
| Component | Version | Purpose |
|---|---|---|
| PHP | β₯ 8.0 | Backend |
| Node.js | β₯ 18.x | Frontend Build |
| npm | β₯ 9.x | Package Manager |
| Composer | β₯ 2.x | PHP Dependencies |
| Nextcloud | β₯ 28.0 | App Platform |
| SQLite/MySQL/PostgreSQL | - | Database |
- VS Code with Extensions: PHP Intelephense, Volar (Vue 3), ESLint
- Git for version control
- Postman or curl for API testing
cd /path/to/nextcloud/apps
git clone https://github.com/Wacken2012/nextcloud-verein.git verein
cd vereincomposer install # PHP Dependencies
npm install # Frontend Dependenciesnpm run watch # Watch mode (development)
npm run build # Production buildsudo -u www-data php /var/www/html/nextcloud/occ app:enable vereinverein/
βββ appinfo/
β βββ database.xml # Database schema
β βββ info.xml # App metadata
β βββ routes.php # API routes
βββ docs/ # Documentation
βββ js/
β βββ components/ # Vue components
β βββ dist/ # Compiled assets
β βββ App.vue # Main Vue app
β βββ main.js # Entry point
β βββ api.js # API client
βββ lib/
β βββ Controller/ # HTTP controllers
β βββ Db/ # Entities & mappers
β βββ Middleware/ # Request middleware
β βββ Service/ # Business logic
β βββ Settings/ # Admin settings
βββ templates/ # PHP templates
βββ tests/ # Unit & integration tests
βββ vendor/ # Composer dependencies
βββββββββββββββββββββββββββββββββββββββ
β Frontend (Vue 3) β
βββββββββββββββββββββββββββββββββββββββ€
β Controller (PHP) β
βββββββββββββββββββββββββββββββββββββββ€
β Service (Business Logic) β
βββββββββββββββββββββββββββββββββββββββ€
β Mapper/DB (ORM) β
βββββββββββββββββββββββββββββββββββββββ€
β Nextcloud Core (OCP) β
βββββββββββββββββββββββββββββββββββββββ
<?php
namespace OCA\Verein\Controller;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\JSONResponse;
class ExampleController extends Controller {
/**
* @NoAdminRequired
* @NoCSRFRequired
*/
public function index(): JSONResponse {
return new JSONResponse(['status' => 'ok']);
}
}| Annotation | Meaning |
|---|---|
@NoAdminRequired |
Non-admins can access |
@NoCSRFRequired |
No CSRF token required |
@PublicPage |
Publicly accessible |
use OCA\Verein\Attributes\RequirePermission;
#[RequirePermission('members.create')]
public function create(): JSONResponse {
// Only with members.create permission
}<template>
<NcButton @click="handleClick">
{{ t('verein', 'Click me') }}
</NcButton>
</template>
<script>
import { NcButton } from '@nextcloud/vue'
import axios from '@nextcloud/axios'
import { generateUrl } from '@nextcloud/router'
export default {
name: 'ExampleComponent',
methods: {
async handleClick() {
const { data } = await axios.get(generateUrl('/apps/verein/api'))
}
}
}
</script>import { success, error } from '../notify.js'
success('Successfully saved')
error('Error saving')# All tests
composer test
# Unit tests only
./vendor/bin/phpunit --testsuite Unit
# Fast tests (Export, Validation)
./vendor/bin/phpunit --testsuite Fast
# With coverage
./vendor/bin/phpunit --coverage-html coverage/# Deploy script
./scripts/deploy-to-nextcloud.sh
# Manual
rsync -av --exclude='node_modules' --exclude='.git' \
./ /var/www/html/nextcloud/apps/verein/- Fork & create branch:
git checkout -b feature/my-feature - Commit changes (Conventional Commits)
- Pull Request against
developbranch
<type>(<scope>): <description>
feat(members): Add bulk import
fix(export): Correct PDF widths
docs(api): Add OpenAPI spec
- PHP: PSR-12 with
php-cs-fixer - JavaScript: ESLint with Nextcloud config
- Type hints in PHP (Type Hints, Return Types)
- Tests for new features
- Nextcloud Developer Documentation
- Nextcloud Vue Components
- Vue 3 Documentation
- OpenAPI Specification
Letzte Aktualisierung / Last updated: 30. November 2025