diff --git a/README.md b/README.md index f41d745..725766f 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,32 @@ # smash a bash.org clone built with Flask +## Technologies +- python +- Flask +- PostgreSQL +- SQLAlchemy + +## Functionalities +- Quote database +- Tags for grouping and classifying quotes +- Moderation queue, admin approval required for adding new quotes +- Pagination +- Ratings + ## How to run This program is designed to be easy to deploy via Heroku. It can also run locally. -Database is stored locally in an sqlite file. -First, you have to edit the config file (`config.json`). `DBNAME` needs to be a valid filename for the database. `APPNAME` is the name that will be displayed in the title bar in the browser, while `APPBRAND` is the name that will be displayed in the navbar on every page. +First, you have to edit the config file (`config.json`). `APPNAME` is the name that will be displayed in the title bar in the browser, while `APPBRAND` is the name that will be displayed in the navbar on every page. `SECRETKEY` will be used to encrypt and sign session cookies, so it needs to be a cryptographically-secure random string. `ADMINSECRET` will be used to elevate privileges to allow approving and deleting new quotes. There are no user accounts since there are no user-specific functionalities. +`MOTD` will be displayed on the index page. + `APPNAME` and `APPBRAND` will be loaded from the environment if they're left empty in the config. +Smash uses PostgreSQL. Before you start, you need to set `DATABASE_URL` environment variable to a valid URL leading to your database. If you install the Heroku plugin, it will be done automatically for you - you only need to do this manually if you want to run Smash locally. + After basic config is done, run this to start the server: ``` @@ -22,3 +38,12 @@ The program looks for `HEROKU` in the environment; if that variable is equal to The first time it's started it will create the local database and all required tables, as specified by models. After that it's ready to be used. All logging is done by printing to stdout - heroku adds that to the app logs visible in the dashboard. + +## Screenshots +![index](http://i.imgur.com/VA4NGw4.png) + +![quotes](http://i.imgur.com/rlyz1Wa.png) + +![tags](http://i.imgur.com/1tMgKkF.png) + +![adding a new quote](http://i.imgur.com/BRMsBrU.png) diff --git a/config.json b/config.json index 1bd07f2..b8667f2 100644 --- a/config.json +++ b/config.json @@ -1,7 +1,6 @@ { "APPBRAND": "", "APPNAME": "", - "DBNAME": "smash.db", "SECRETKEY": "", "ADMINSECRET": "", "MOTD": "Welcome to the quote archive."