In messaging applications, sent messages pass through servers that we cannot control. If these servers are not open-sourced, one cannot be sure of their information's privacy. This application addresses aforementioned issue by providing open-source server application that people can host on their machine to communicate with their loved ones. They can choose between hosting to public internet or only to their local network.
Users should create an account to enter the application. Messaging happens in chat rooms. Each user can create unlimited number of rooms or they can join previously created ones. Messages are broadcasted to the room's participants.
User accounts and chat rooms are protected by passwords. These passwords are hashed before storing in databases.
- Python 3
- Pip 3
- Install Python dependencies
pip3 install -r requirements.txt
- Initiate the Sqlite3 database with flask CLI command
flask init-db
- [OPTIONAL] Insert mock data to database for test purposes. All mock passwords are
1234
.flask import-mock-data
- Start the Flask server
python app.py
- Access the application from browser
http://localhost:5000
Route | Description | Methods |
---|---|---|
/auth/register | Interface where user creates an account. | GET, POST |
/auth/login | Interface where user enters the application with his account. | GET, POST |
/auth/logout | Logouts from the user's account and clears the session. | GET |
/create-room | Interface where user creates unique chat rooms. | GET, POST |
/join-room | Interface where user joins previously created chat rooms. | GET, POST |
/live-chat | Interface of a chat room. People send messages to other people in the room. | GET, POST |
/leave-chat | User leaves the chat room. User is redirected to index page. | GET |
- Python Flask back-end
- Jinja2 template engine for Flask
- HTML, CSS, JS front-end
- Bootstrap 5.1 CSS framework
- Socket.io JS client API and flask-socketio library
- Sqlite3 database