- A UNIX-like terminal (preferably WSL if you are on Windows),
- Git,
- Node.js (preferably through nvm),
- Docker (preferably through Docker Desktop).
Get the code:
git clone https://github.com/Hypertopic/HyperGlosae.git
Install the backend:
docker compose --file docker-compose.dev.yml pull
Install the frontend:
cd frontend
npm install
Launch the backend:
export COUCHDB_USER="TO_BE_CHANGED"
export COUCHDB_PASSWORD="TO_BE_CHANGED"
docker compose --file docker-compose.dev.yml up --detach
Open http://localhost:5984/_utils to view its Web console.
Compile and launch the frontend:
npm start
Don't close the terminal or interrupt the command unless you want to "kill" the service.
Open http://localhost:3000 to browse sample data in the application.
To test edit features, log in as user alice
with whiterabbit
as the password.
Get the name of your shell (bash
, zsh
, etc.):
ps
Depending on your shell, add this function to ~/.bashrc
, ~/.zshrc
, or other:
function cucumber() {
(docker run --rm -v "$(pwd)":/app --tty --net="host" --env APP_HOST="http://host.docker.internal:3000" benel/cucumber-capybara "$@")
}
Start a new terminal and test the following command:
cucumber --help
From the main folder of Hyperglosae, type the following command:
cucumber --fail-fast --quiet --retry 2
The frontend is coded in JavaScript with the React framework (see documentation).
Everytime you update code in frontend/src
, the frontend page is reloaded.
You may also see any lint errors in the console.
The backend is coded in JavaScript as CouchDB views (see documentation). Documents stored in CouchDB can be created, updated and deleted (esp. by the frontend) using CouchDB REST API (see documentation).
Everytime you update code in backend/src
, please push it to the backend with:
docker compose --file docker-compose.dev.yml run updated_code
And then refresh the frontend (or backend) page.
Everytime you update sample data in samples
, please push them to the backend with:
docker compose --file docker-compose.dev.yml run updated_samples
If (and only if) you want to remove ANY DATA added by hand or through automated tests, launch the following command:
docker-compose --file docker-compose.dev.yml down
docker compose --file docker-compose.dev.yml up --detach