Skip to content

Repository files navigation

Contributors Forks Stargazers Issues LinkedIn


logo

Warbler

screenshot

A twitter clone, built in Python-Flask.

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contact
  6. Acknowledgments

About The Project

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.

(back to top)

Built With

(back to top)

Getting Started

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

Usage

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

(back to top)

Roadmap

  • 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).

(back to top)

Contact

I'm Caleb, Web Developer and Fullstack Enginner. Questions?

(back to top)

Acknowledgments

(back to top)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages