Python
Flask
SQLAlchemy
Google oAuth 2.0
Flask-Dance
pip-env
git
MVC Design Pattern.
Separation of concerns.
Scalable application design.
OAuth.
Flask, SQLAlchemy, and extensions.
This application is organized around a MVC pattern.
.
├── config
└── socialnetwork
├── utils
├── models # Model
├── routes # Controller
├── templates # View
├── forms
└── static
.
├── config
│ └── settings.py
├── socialnetwork
│ ├── socialnetwprk.db # db object
│ ├── forms
│ │ └── post.py # create posts
| | └── user.py # registration, login, update user
│ ├── models
│ │ ├── post.py
│ │ └── user.py
│ ├── routes
│ │ ├── account.py
│ │ ├── errorhandlers.py
│ │ ├── post.py
│ │ ├── main.py
│ │ └── userauth.py # Flashes a signal/instance of blueprint and token via Flask-Dance.
│ ├── services
│ ├── static
│ │ ├── img
│ │ │ └── google.png
| | ├── profile_pics
│ │ │ └── default_profile.png
│ │ └── styles
│ │ └── main.css
│ └── templates # Responsive bootstrap
│ ├── errors
│ │ ├── 403.html # Error handlers
│ │ ├── 404.html
│ │ └── 500.html
│ ├── account.html
│ ├── layout.html
│ ├── login.html
│ ├── main.html
│ ├── post.html
│ └── register.html
├── manage.py
└── requirements.txt
└── .env
{URI}/api/v1/posts/json
- Python 3.5+
- requirements.txt
Download this project to your computer
cd src/web
virtualenv ENV
source env/scripts/activate
pip install -r requirements.txt
export FLASK_APP=manage.py
flask run
# Navigate to http://127.0.0.1:5000/