Table of Contents
Warbler is a paired-down twitter clone I developed while attending Rithm School. The a non-functional skeleton of the app was provided, and my primary goal was to implement the database tables and relationships needed to support users, follows, likes, and messages. Since then I've continued to add to and refine the app.
I migrated the database from a Heroku Hobby Dyno to an RDS instance. I revamped buttons in the app to add AJAX and make them reactive. Currently, I'm working on adding a comments system to allow commenting on a message.
Clone GitHub Repo
$ git clone https://github.com/calebthewood/flask-warbler.git
Create a .env file to hold configuration:
SECRET_KEY=abc123
DATABASE_URL=postgresql:///warbler
Create a Python virtual environment and install dependencies in local dir
$ python3 -m venv venv
$ source venv/bin/activate
(venv) $ pip install -r requirements.txt
Create Postgres database in PSQL
$ psql
CREATE DATABASE warbler
(ctrl-d to exit psql)
Load env variables
(venv) $ ipython
In [1]: from dotenv import load_dotenv
In [1]: load_dotenv() # take environment variables from .env.
In [1]: %run seed.py
Run server on local host port 5001
(venv) $ flask run -p 5001
WIP
DB table summary:
- follows: a through table with foreign keys from users, user_being_followed and user_following, comprising the table's composite key.
- likes: a through table with foreign keys from users and messages where each record represents a single user's "like" of a message.
- users: table storing data regarding user, model includes joins for follows, followers, likes, and messages
- messages: table storing messages with a join on users.
Security:
- authentication: JWT
- encryption: bcrypt
- CSRF protection: WTForms
- Custom 404 page
- Add AJAX
- liking a warble
- post msg modal
- DRY up things
- Templates
- Authorization
- URLs
- Optimize Queries
- Make a change pswd form
- Allow “Private” Accounts
- Add Admin Users
- User Blocking
- Direct Messages
See the open issues for a full list of proposed features (and known issues).
I'm Caleb, Web Developer and Fullstack Enginner. Questions?
- On twitter at @calebthewood
- Personal Site: calebwood.dev
- email: [email protected]