Python on the backend, JS+SCSS on the front. Fully responsive, mobile-first blog-oriented framework.
Lean
Code weight and complexity must be as small as possible. Code stats will be tracked for every release. Code size increases must be justified.
Mobile-first
Everything will be designed starting from mobile. Desktop support is secondary, and must have minimal impact on the weight of pages delivered to mobile. This means lazy-loading advanced features and images. If the code is light enough, the augmentation should be seamless on the desktop.
Open
Dev process and code will be opinionated but open. The project will be self-documenting, as the resulting site gets deployed at mmcgahan.github.io/backflask. It will specify dependencies and make the barrier to entry as small as possible.
Install Python packages with pip
.
$ pip install -r requirements.txt
You might get an error here if you don't have PostgreSQL installed, because the requirements file will try to install a PostgreSQL Python driver. You can use Homebrew on Mac, or install Postgres.app and make sure pg_config
is in your $PATH
.
Edit the app config file
In your instance/
directory, create a config.py
file that declares the following variables:
SQLALCHEMY_DATABASE_URI
(e.g. postgresql://user@localhost:5432/backflask)SECRET_KEY
(a random string that is used for connections with the XML-RPC API)Create and initialize the DB
For local development, just set up a simple SQL database in the flavor of your choice - Backflask uses SQLAlchemy to manage the DB, so as long as your SQLALCHEMY_DATABASE_URI
config variable is set correctly, it will connect to any existing DB.
In SQL:
CREATE DATABASE backflask;
I recommend using Postgres.app on Mac to get PostgreSQL up and running. Once installed, run psql
from the command line to open a SQL prompt.
Then run pysetup.py
to create an Admin user, an example Category, and an example Post.
npm install
(loades package.json dependencies, including Grunt)
grunt
grunt watch
grunt build
(not ready)
grunt release
(not ready)