This is the new Zetkin front-end application, currently under development. It will run at app.zetkin.org and replace the current www.zetk.in, call.zetk.in and organize.zetk.in applications.
The new Zetkin app is built on NEXT.js with TypeScript.
Do you want to contribute to this project and become part of a community of people that use their coding skills to help the international left? We try to make the process as easy and transparent as possible. Read all about it in the separate CONTRIBUTING.md file.
Also see TESTING.md for details about automated testing.
- Fork zetkin/app.zetking.org into your personal GitHub account.
- Install Git for Windows from https://git-scm.com/download/win
- Generate an SSH key, for example with Git Gui / Help / Show SSH Key / Generate Key
- Add your key to GitHub by copying the public part of it to your GitHub settings at https://github.com/settings/keys
- Install Visual Studio Code.
- In Visual Studio Code use Clone Repository and from GitHub, connect your installation of Visual Studio Code to your GitHub account, and then clone your fork from GitHub. Note that you will be prompted for the passphrase of your private key if you chose to use one when you created your SSH Key.
Install all the dependencies using yarn
(Classic):
$ yarn install
Then start the devserver:
$ yarn devserver
You should now be able to access the app on http://localhost:3000. It will communicate with the Zetkin API running on our public development server.
As an alternative to the normal development setup, you can also run the provided Docker Compose setup.
-
Requires Docker Compose v2+
-
Backend development: Run local production (after building, it starts very fast) and access the organizations directly on http://localhost:3000/organizations/.
$ docker compose -f dev.yml --profile static up
-
Frontend development: Similar to the normal yarn setup documented here.
$ docker compose -f dev.yml --profile dev up
-
Linting: You can run lint commands from within a container, too:
$ # Default: Run .githooks/precommit $ docker compose -f dev.yml run lint $ # Run prettier, checking for errors $ docker compose -f dev.yml run lint npx prettier . --check $ # Run prettier in write-mode $ docker compose -f dev.yml run lint npx prettier . --write
Note: If you are running the backend locally and things like dev.zetkin.org
resolve to 127.0.0.1
,
then this only works on Linux-based systems, due to the nature of 127.0.0.1
pointing to the host on Linux
(but not on Windows/Mac, where it points to the container itself).
You can log in using the dummy user accounts to access dummy data from the development server.
Hint: when in doubt, use Administrator
Role/access | Username | Password | SMS code |
---|---|---|---|
Administrator | testadmin@example.com | password | 999999 |
Caller | testcaller@example.com | password | 999999 |
Basic user | testuser@example.com | password | 999999 |
The SMS one-time password is only required in some parts of the app.