Hello and welcome to the GitHub repo for Huxin! This houses all of the backend source code at huxingongxin.com. Huxin's mission is to rebuild the impartial commercial rating system and allow customers safeguard rights by a technical approach. All the latest tech details will be published. The backend infrastructure is hosted in AWS. This github site welcomes contributions from the community in a variety of ways! Feel free to suggest changes!
Python3 is the only accepted python version for now.
Preparation Step:
- Create Environment variables like
QICHACHA_APPKEYorTENCENT_APPKEY(or define them in.envfile)
NOTE: we use secure cookies, so we must generate self-signed certs for ca and server, and run with server cert and key.
For Linux or MAC:
Mysql clinet is required to install in development environment. Please checkout this link how to install Mysql and configure in Mac.
pip install --user virtualenv
virtualenv -p python3 env
source env/bin/activate
pip install -r requirements.txtchmod +x ./tools/setup.sh
./tools/setup.sh
cp .env_template .env
python -m flask run --cert certs/server.crt --key certs/server.key --host localhost #(use -p to specify binding port)For Windows:
cd ./certs
# generate the certs, then add rootca.crt and server.crt to the system certificate manager
./gen.sh
pip install --user virtualenv
virtualenv env
./env/Scripts/activate
pip install -r requirements.txt
pre-commit install -f --install-hooks
$env:FLASK_APP="application.py" # or set the var in `.env`
python -m flask run --cert certs/server.crt --key certs/server.key --host localhost #(use -p to specify binding port)NOTE: the swagger docs is at http://localhost:5000/docs/swagger
- build the fundamental backends based on flask rest api and test out its functionality
- Adding flask documentation generation support
- Initialize the work of sqlAlchemy framework using flask migration
- Adding all API routing rules required from API doc
- Adding flask unit test module
- Encrypt the app.db. Today the DB is plain and doesn't require credentials.
- After MVP stage, move the file storage to S3.
- Use the standard
Marshmallowlib instead offlask-marshmallow. - dynamic secret_ley on deploy
- use
argon2for password hashing - normalize response envelop format
- normalize response status code and business status
- normalize models validation
- improve logging for each resources
- use https://github.com/dtan4/terraforming or https://github.com/GoogleCloudPlatform/terraformer to convert existing resources config to terraform style.
- more secure register flow and reset password flow
see development.md
see deployment.md
see deployment.md
see unit-test.md
To get started...
- 馃嵈 Fork this repository
- 馃帀 Open a new pull request and get it approved!
You can even report a bug or request a feature - any little bit of help counts! 馃槉
This software is licensed under MIT license, a copy of which can be found in LICENSE.md