An e-commerce fullstack solution for Flask 出口电商全栈解决方案
Switch branches/tags
Nothing to show
Clone or download
Latest commit 6c5fdba Apr 27, 2017
Failed to load latest commit information.
application restore js files Apr 27, 2017
configs minor change Mar 30, 2017
.gitignore Initial commit Mar 22, 2017
LICENSE Initial commit Mar 22, 2017 Update README Apr 7, 2017 Update README Apr 7, 2017 Complete README for English Mar 26, 2017
requirements.txt fix double socialoauth given Mar 31, 2017


Bibi is an e-commerce fullstack solution built with Flask. It includes e-commerce, social, and hot common modules. It stood the test of business operations, is a light but complete solution.

This project provides backend service, based on Flask, MongoDB, Redis, Celery, RabbitMQ, and supports Python 3.5.

Bibi offers fullstack solution for use with the following:

bibi-frontend Mobile web frontend

bibi-ionic Hybrid APP


  • User

    • Supports Email, Wechat, Weibo, QQ, and Facebook Oauth,social-oauth for details
    • User Information, Address, Contact, Favor collections and etc..
  • Social

    • Post, like, comment, and bad information report.
    • Following and followers.
    • Notifications.
  • Content

    • Products board
    • Banners
  • Product

    • Brands, categories, tags, vendors, price history.
    • Commodities sub-selections based on different colors, sizes and materials.
  • Cart

    • Session carts
    • Snapshot for items
  • Order

    • Snapshot for order, store items history
    • Split into different packages depend on the total price and categories
    • Logistics information tracking, automatic updates
    • Third party logistics business parcel handling
  • Payment

    • Supports Wechat,Paypal and etc..
    • Supports coupons, coins for discount.
  • Management System

  • AWS file upload

  • Bing translate API

  • Openexchange rate API

  • Kuaidi100 logistics tracking API


Content Management Logistics Management Product Management

Get Started

This based on Ubuntu/Debian,please skip if you had set up Python 3 environment.

# set up python3 environment
sudo apt-get update
sudo apt-get install python3-pip python3-dev
sudo apt-get install build-essential libssl-dev libffi-dev python-dev

# set up virtualenv
sudo pip3 install virtualenv virtualenvwrapper
echo "export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3" >> ~/.bashrc
echo "export WORKON_HOME=~/Env" >> ~/.bashrc
echo "source /usr/local/bin/" >> ~/.bashrc
source ~/.bashrc

# Now virtual env for python3 will be installed in ~/Env

mkvirtualenv bibi # rename bibi
workon bibi # activate bibi env

# set up mongodb # 2.6 version
# set up redis
# set up rabbitMQ

mongod &              # start mongodb
redis-server &        # start redis
rabbitmq-server &     # start RabbitMQ

Install dependencies

pip3 install -r requirements.txt

Initial database

python3 shell
# into Python3 shell
>>> from application.models import User
>>> user = User.create(email="", password="xxx", name="xxxx")
# Rename the email, password, name
>>> user.roles.append("ADMIN")

Run server

# start celery
celery -A application.cel worker -l info &

python3 runserver

Now open on local.


# set up supervisor
sudo apt-get install supervisor
# set up gunicorn
pip3 install gunicorn

Create supervisor config

sudo vim /etc/supervisor/conf.d/bibi.conf

    -w 3
    --log-level debug

directory=/opt/py-maybi/                                       ; Project dir
stdout_logfile=/opt/logs/gunicorn.log                          ; log dir

PS: -w the workers number,formula:(CPUs*2 + 1)

Create nginx config

sudo vim /etc/nginx/sites-enabled/bibi.conf

server {
    listen 80;

    location / {
        proxy_pass; # Pointing to the gunicorn host
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;


Start supervisor, nginx

sudo supervisorctl reload
sudo supervisorctl start bibi

sudo service nginx restart

Bravo! It's done.

Please open issues if you have problems.