Code Monkey home page Code Monkey logo

chatroomapplication's Introduction

ChatroomApplication

A website to host and manage multiple chat rooms made using HTML5, CSS3, JavaScript, JSON, AJAJ, Python, Flask and, SQLAlchemy.

Overview

This website allows the users to create, post messages to and, delete chatrooms. the users are required to create an account first and then login with their credentials to proceed. Each user can create multiple chatrooms and delete them as they please. A user can be in only one chatroom at a time. Multiple users can login to the chat site at the same time and exchange messages.

How to run

Install Python 3.5, Flask, SQLAlchemy and, the Flask-SQLAlchemy extension.
Open Command prompt on Windows or terminal on Mac.
Set the FLASK_APP environment variable to your chat.py as: "set FLASK_APP=path/chat.py"
Initialize the chat.db database using: "flask initdb"
Run the application using: "flask run"

Specifications

When visiting the page for the first time, users will be given the chance to create an account or login.
Once successfully logged in, the user will be given a list of possible chat rooms to join, or a message stating that none currently exist. The user will have the option to create a new chat room.
Once in a chat room, the user will be shown the history of messages for that chat room, as well as be kept up to date as messages are sent to the chat room. The user will also have the option to post a new message to the chat room. The user can leave the chat room by clicking the leave chatroom button.
Users can be in only one chat room at a time.
The application uses AJAJ and JSON to update the list of messages posted to the chat room, and to post new messages to the chat room.
All AJAJ chat updates will only send new messages to the user.
The application does polling to ensure that new messages are always available to the user. The application polls every alternate second.
Once a user leaves the chat room, they will again be shown a list of potential chat rooms to join (or a message if none exist).
The user will also have the option to delete any chat rooms that they created by clicking on the delete button for that chatroom.
Any users still in a room when it is deleted will be shown a message informing them that the room was deleted and will be redirected to their profiles.
All data for this application will be stored in an SQLite database named "chat.db" using SQLAlchemy's ORM and the Flask-SQLAlchemy extension.

chatroomapplication's People

Contributors

fatemaquaid987 avatar

Watchers

James Cloos avatar  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.