The official website for the project SocialConnect / aka (in French) Carrefour des Innovations Sociales
-
clone or download the repo
-
install MongoDB locally or get the URI of the MongoDB you're using
-
go to your cis folder
-
use Python 2
-
install python pip and virtualenv
$ sudo apt install python-pip $ sudo apt install virtualenv
-
install a virtual environment
$ virtualenv venv
-
install the libraries
$ sudo pip install -r requirements.txt
-
if you encounter problems installing the requirements try to install the 'cryptography' library following those steps : [install crypto]
$ pip install cryptography --global-option=build_ext --global-option="-L/usr/local/opt/openssl/lib" --global-option="-I/usr/local/opt/openssl/include"
-
update the
app/backend/config_secret_vars_example.py
file with your mongoDB URI (if you're not using default mongoDB connection) -
got to your
/cis
folder and run :$ python run_cis_front.py --mode=testing
-
Install Node.js and npm
-
Build the front-end
$ cd cis/app/frontend $ npm install $ npm run build
-
(if you encounter problems while building try this)
$ rm -rf cis/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/backend/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_cis/cis
git pull origin master
cd app/frontend
npm ci
npm run build
sudo systemctl restart cis_front
Go to /register
, create an account, then:
# Connect to MongoDB
mongo
# => mongo shell prompts
# Use cis-front database
use cis_front
# list users
db.users.find()
# get the id of the user you want to move to admin
# abcdef
# Modify user
db.users.updateOne({_id: ObjectId('abcdef')}, {$set: {userAuthLevel: 'admin'}})
Then, you can login with your admin user which can change settings of other users
- 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, Ajax for API queries (to make queries to Openscraper )
- Server : Ubuntu 16.04, NGINX, Gunicorn, hosted in Digital Ocean, domain name from OVH
- the SocialConnect project, aka "Carrefour des Innovations Sociales"
- the EIG program by Etalab
- the CGET
- Julien Paris (aka JPy on Twitter)