Visualize data coming from an API in a CMS-like app
Please check out our guidelines
-
clone or download the repo
-
install MongoDB locally or get the URI of the MongoDB you're using
-
go to your apiviz folder
-
use Python 2
-
install python pip and virtualenv
sudo apt install python-pip sudo apt install virtualenv
-
install a virtual environment
virtualenv venv source venv/bin/activate
-
install the libraries
sudo pip install -r requirements.txt
-
if any problem occur here try to reinstall pip with
curl https://bootstrap.pypa.io/get-pip.py | python
-
optional : update the
app/config_app/config_secret_vars_example.py
file with your mongoDB URI (if you're not using default mongoDB connection -
Go to your app folder and run :
python run_apiviz.py
-
optional : you can also use some variables in the command line :
# get the list of available CLI options python run_apiviz.py --help # for example : run with a custom port number in testing mode pythom run_apiviz.py --port=8200 --mode=preprod
-
Install Node.js and npm
-
Build the front-end
cd app/frontend npm install # build the bundle.js npm run build # you can also build and watch the bundle.js npm run watch
-
optional : if you encounter problems while building try this
rm -rf app/frontend/node_modules npm install npm run build
-
check in your browser at
localhost:8100
- get a server - check digital ocean, OVH, ...
- optionnal : get a domain name : check OVH, namecheap, godaddy.... + setup DNS
- follow (most of) these instructions
- create a
app/config_app/config_secret_vars_prod.py
file based onconfig_secret_vars_example.py
structure - go to app folder and create a virtual env (for instance called "venv")
- set up the gunicorn service and NGINX accordingly
- ... pray for all that to work as expected, and keep calm...
cd /<your_app_folder>/<username>/app_apiviz
git pull origin master
cd app/frontend
# build the frontend
npm install
npm run build
# rerun app
sudo systemctl restart apiviz
- Language : Python... because ... uuh ... eeeh ... I like this language too much ?
- Backend : Flask... minimalistic Python framework
- Frontend : Bulma as CSS framework, Vue.js as JS framework, Axios for API queries (to make queries to Solidata or else), Leaflet and Vue2Leaflet for map layout
- Server : Ubuntu 18.04, NGINX, Gunicorn, hosted in Digital Ocean, domain name from OVH
- the EIG program by Etalab
- the SocialConnect project, aka "Carrefour des Innovations Sociales"
- the CGET
- the MedNum
- the Mission Société Numérique
- Julien Paris (aka JPy on Github)
- Guillaume Lancrenon (aka Guillim on Github)
...TO DO