Skip to content

diz-unimr/nc-template-app

Repository files navigation

Nextcloud app development example

ESLint Lint app info PHP Coding Standards Fixer Stylelint PHPUnit Package build REUSE Compliance Check

This is an example nextcloud app development setup.

This repository features a Docker Compose setup to develop against a specific Nextcloud version and supports hot module replacement of the app's frontend (Vue.js) components.

Building the app

  1. Install php dependencies:
    make composer
    
  2. Install npm dependencies:
    npm ci
    

Run the app

  1. Start the webpack dev server (see package.json from your development IDE:
    npm run serve
    
  2. Start the Nextcloud Docker environment from the dev folder:
    docker compose up -d
    

This starts the nextcloud-docker-dev container.

Enable app

In order for Hot module replacement (HMR) to work the HMR Enabler app is installed and enabled on container startup.

  1. Login to http://localhost:8080 with user admin and password admin.
  2. Go to Apps and enable the Template App

You can now go the App's navigation item at the top to see the example app from the Nextcloud App Generator.

Changes to the Vue.js frontend code should now trigger the webpack-dev-server to rebuild the code and the browser to reload the content.