https://github.com/laws-africa/constitution-app-react
https://github.com/laws-africa/constitution-app-react
ionic law react
Last synced: 23 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/laws-africa/constitution-app-react
- Owner: laws-africa
- License: mit
- Created: 2020-10-26T14:06:43.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-09-23T09:41:52.000Z (over 1 year ago)
- Last Synced: 2024-11-12T13:51:37.526Z (over 1 year ago)
- Topics: ionic, law, react
- Language: TypeScript
- Homepage: https://constitutioncompass.org.za
- Size: 14.3 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Local development
Install the Ionic CLI with npm:
```
$ npm install -g @ionic/cli
```
Clone the repository:
```
$ git clone https://github.com/laws-africa/constitution-app-react.git
$ cd constitution-app-react
```
Install dependencies with npm:
```
$ npm i
```
## Serving the app
```
$ ionic serve
```
This should open your browser window on http://localhost:8100!
## Updating content (backend)
Download `src/assets/data/data.json` from https://edit.laws.africa/concompass/data.json and replace the existing file.
Update the legislation content as follows:
Create a Python virtual environment if you want and install the requirements
```
$ cd backend
$ pip install -r requirements.txt
```
Run the script to download legislation content.
```
$ python main.py
```
# Production deployment
The app is hosted by GitHub pages. It is built automatically from the master branch by the GitHub action script at [.github/workflows/deploy.yml](.github/workflows/deploy.yml).
To mimic this process, use:
```
$ ionic build --prod --engine=web
```
This generates a `build` folder which contains the entire public website.
# Generate translation json file with i18next-parser
```
i18next 'src/**/*.{js,tsx}'
```