Setup
Prerequisites
- git
- docker
- nodejs v20 (you can use nvm to manage node versions)
- yarn
Get started
Backend
-
Clone the repository
2. go to directory development_toolsgit clone git@github.com:unicef/hope.git
3. Create acd hope/development_tools
.env
file based on the.env.example
file4. Build the docker imagecp .env.example .env
5. Run initialisation scriptdocker compose --profile default build
6. Create a superuserdocker compose run --rm backend ./manage.py initdemo
6. Run the backenddocker compose run --rm backend ./manage.py createsuperuser
docker compose --profile default up
Frontend
In a new terminal window 1. Go to the frontend directory
2. Install dependenciescd hope/src/frontend
3. Run the frontendyarn
yarn dev
Access the application
- Admin panel is running on
http://localhost:3000/api/unicorn/
- Login with the superuser credentials created in step 6 of the backend setup
- Select your superuser from list at
http://localhost:3000/api/unicorn/account/user/
- Add new User Role at the bottom of the page. Select
Afghanistan
(it has some test data) as the Business Area, andRole with all Permissions (HOPE)
and save - Access the frontend on
http://localhost:3000/