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.git3. Create acd hope/development_tools.envfile based on the.env.examplefile4. Build the docker imagecp .env.example .env5. Run initialisation scriptdocker compose --profile default build6. Create a superuserdocker compose run --rm backend ./manage.py initdemo6. Run the backenddocker compose run --rm backend ./manage.py createsuperuserdocker compose --profile default upFrontend
In a new terminal window 1. Go to the frontend directory
2. Install dependenciescd hope/src/frontend3. Run the frontendyarnyarn 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/