Giter VIP home page Giter VIP logo

readdit's Introduction

flaskeddit

CircleCI

A simplified Reddit clone built with Flask.

flaskeddit.png

Features

  • Registration and authentication.
  • Create communities.
  • Create community posts.
  • Reply to community posts.
  • Edit or delete your communities, posts, and replies.
  • Join communities.
  • Get a feed of posts from your joined communities.
  • Upvote or downvote posts and replies.
  • Sort communities, posts, and replies by latest or most popular.
  • Basic user profiles.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development. See deployment for notes on how to deploy the project.

Prerequisites

To run this application you need Python, pip, and SQLite.

Local Setup

Clone the project.

git clone https://github.com/aqche/flaskeddit.git

Setup a venv and use pip to install the project dependencies.

cd flaskeddit
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Set the FLASK_APP environment variable, create the SQLite database, and start the app. Now you can give the application a try at http://localhost:5000!

export FLASK_APP=flaskeddit.py
flask cli create_db
flask run

You can also serve the application locally using gunicorn.

gunicorn "flaskeddit:create_app()"

Testing

Flaskeddit is tested using pytest.

Use pytest to run the application's tests.

pytest

Deployment

Flaskeddit is hosted on Heroku. To set up the required infrastructure for the project, you can use the terraform-heroku-app-postgres Terraform module.

module "terraform-heroku-app-postgres" {
  source                = "github.com/aqche/terraform-heroku-app-postgres.git"
  name                  = "heroku-app-name"
  sensitive_config_vars = {
      SECRET_KEY = "<secret_key>"
  }
}

The application is automatically deployed using CircleCI.

You can also use git to manually deploy the application.

export HEROKU_API_KEY="<HEROKU_API_KEY>"
export HEROKU_APP_NAME="<HEROKU_APP_NAME>"
git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git master

Built With

Contributing

Feel free to submit a pull request!

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for more details.

Acknowledgments

readdit's People

Contributors

aqche avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.