Git Product home page Git Product logo

chatroom-with-flask's Introduction

Introduction

This is a chat application, implemented using Flask-SocketIO with both the database (PostgreSQL) and the app deployed in Heroku. It also has user registration and authentication functionalities.

Demo

RChat - Chat rooms are back in style!

Files in the program

  • application.py : This is the main app file and contains both the registration/login page logic and the Flask-SocketIO backend for the app.

  • models.py : Contains Flask-SQLAlchemy models used for user registration and login in application.py

  • wtform_fields.py : Contains the classes for WTForms/Flask-WTF and the custom validators for the fields

  • create.py : optional file only required if repo is to be cloned. See 'Usage' section below.

  • Procfile : file required for Heroku requirements.txt: list of Python packages installed (also required for Heroku)

  • templates/ : folder with all HTML files

  • static/ : for with all JS scripts and CSS files

Run app -

Link - http://rchat-app.herokuapp.com/

Clone/Modify app

  1. Modify application.py to replace the secret key (i.e. os.environ.get('SECRET')) with a secret key of your choice and the database link (i.e. os.environ.get('DATABASE_URL')) with the link to your own database.

The two lines to be edited in application.py are shown below:

app.secret_key=os.environ.get('SECRET')
app.config['SQLALCHEMY_DATABASE_URI']=os.environ.get('DATABASE_URL')
  1. Edit create.py to once again replace os.environ.get('DATABASE_URL') with the link to your database.

  2. Run create.py from the terminal to create the table to hold user credentials.

foo@bar:~$ python create.py

chatroom-with-flask's People

Contributors

rohansengupta326 avatar

Watchers

 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.