New tutorial: Develop your first ExApp in Python

Hello Nextclouders!
I am proud to present a new tutorial for which we have received a large number of requests: how to develop a Nextcloud ExApp with AppAPI!

In this tutorial, we will be showing an example in Python for what a Nextcloud ExApp looks like and how you can get started developing one of your own. By the end, you will learn how to:

  • setup a local environment for developing ExApps,
  • develop your first ExApp, and
  • debug and make changes to an ExApp.

Required knowledge:

We recommend that you go through all of the previous tutorials first as there are some core concepts that apply to all Nextcloud apps (ExApp or not). However, if you decide to skip right to this section, I won’t blame you either. If you have any questions in that case, feel free to ask in this thread and I will try to update the tutorial accordingly.

The link to the tutorial is here:

Playlist of all tutorials:

As always, constructive feedback and bug reports are welcome!

5 Likes

Sorry for a question of an absolute beginner:

I managed to set up a nextcloud developement environment following GitHub - juliushaertl/nextcloud-docker-dev: Nextcloud development environment using docker-compose as recomended in the “previous tutorials”. This worked great but only provides Nextcloud Hub 3 (26.0.0 dev), which is pretty old. I don’t know how to update to the latest nextcloud version, e.g. Hub 9.

If you followed the quickstart instructions, you should be running the latest master/dev version of Nextcloud. If not, you can go into the workspace/server/ directory and git pull the latest server changes (and possibly switch to the master branch if needed).

I followed: 📝 Changelog · Issue #104 · juliushaertl/nextcloud-docker-dev · GitHub
=> same result

I read: stable28 gives me 29.0.0-dev · Issue #309 · juliushaertl/nextcloud-docker-dev · GitHub

Following precicely the tutorial I still end up at Version 26.0.0 when I call

docker-compose up -d nextcloud proxy

I have no workspace/server/directory. Following the tutorial I have a nextcloud-docker-dev tutorial where I did:
git pull
make pull-installed

I can get the latest 30.0.0 Version but only as stand alone version running

docker run --rm -p 8080:80 -e SERVER_BRANCH=v30.0.0 ghcr.io/juliushaertl/nextcloud-dev-php83:latest

But the goal according to the tutorial is to get the full developement environment - right?

But thanks that you tried to help me.

Yes, it is possible to run multiple containers with different versions of Nextcloud too. You can also start a new discussion or issue in the repo to see if Julius or anyone else can help you there.

Meanwhile I got it solved following the advice in the warning under Getting started - nextcloud-docker-dev :

According to this advice I downloaded the repository with the full version history (3.12 Gb) using:

cd workspace/server
git fetch --unshallow
git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
git fetch origin 

Do you think you could finish frontend documentation? Writing Nextcloud App with UI — NcPyApi 0.22.0 documentation

I need a similar frontend to Flow app, how can I compile it using this as a base? flow/ex_app/src at main · nextcloud/flow · GitHub

EDITED.

It seems that compiling javascript part is relatively easy:

  1. clone flow github
  2. install node and webpack
  3. npm install
  4. cd ex_app/src
  5. npm run dev
  6. voila! you have flow-main.js compiled.