Authelia client uses hash router instead of browser router in order to work with Kubernetes nginx-ingress-controller. This is also better for users having old browsers. This commit is breaking because it requires to change the configuration of the proxy to include the # in the URL of the login portal.
1.7 KiB
Build and dev
Authelia is written in Typescript and built with Authelia scripts.
In order to build and contribute to Authelia, you need to make sure Node with version >= 8 and < 10 and NPM is installed on your machine.
Build
Authelia is made of two parts: the frontend and the backend.
The frontend is a React application written in Typescript and the backend is an express application also written in Typescript.
The following command builds Authelia under dist/:
authelia-scripts build
And then you can also build the Docker image with:
authelia-scripts docker build
Development
In order to ease development, Authelia uses the concept of suites. This is a kind of virutal environment for Authelia, it allows you to run Authelia in a complete environment, develop and test your patches. A hot-reload feature has been implemented so that you can test your changes in realtime.
The next command will start the suite called basic:
authelia-scripts suites start basic
Then, edit the code and observe how Authelia is automatically updated.
Unit tests
To run the unit tests written in Mocha, run:
authelia-scripts unittest
Integration tests
Integration tests also run with Mocha and are based on Selenium. They generally require a complete environment made of several components like redis, mongo and a LDAP to run. That's why suites have been created. At this point, the basic suite should already be running and you can run the tests related to this suite with the following command:
authelia-scripts suites test