The ChatApp API is a Flask-based web application that provides the backend infrastructure for a real-time chat application. It allows users to create accounts, join chat rooms, send messages, and interact with other users in a chat room. This repository contains the server-side code for the ChatApp, offering a scalable and maintainable solution for chat functionality.
User Management: Users can create accounts and log in securely.
Chat Room Management: Create and join chat rooms to interact with other users.
Real-Time Messaging: Send and receive messages in real-time within chat rooms.
Authentication: Secure authentication using JSON Web Tokens (JWT).
Data Storage: Utilizes SQLAlchemy to store user data, chat rooms, and messages in a relational database.
Flask: Lightweight and flexible Python web framework.
SQLAlchemy: Object-Relational Mapping (ORM) for database interactions.
JWT: JSON Web Tokens for secure authentication.
Postgresql: Database for persistent storage.
Clone this repository to your local machine: git clone https://github.com/your-username/chatapp-api.git
Set up the environment by creating a virtual environment (recommended) and installing the required dependencies:
cd chatapp-api
python -m venv venv
source venv/bin/activate # On Windows, use: venv\Scripts\activate
pip install -r requirements.txt
Configure your database connection in .env file
Run the Flask application: python app.py.
Access the API endpoints to interact with the chat functionality..
Ensure you have Docker and Docker Compose installed on your system.
Clone this repository to your local machine:git clone https://github.com/your-username/chatapp-api.git.
cd chatapp-api
Create a .env file in the project directory with the necessary environment variables. You can use the provided .env file as a template and customize it as needed.
Build and start the Docker containers using Docker Compose: docker-compose up --build
Once the containers are running, the ChatApp API should be accessible at the specified port in your .env file (e.g., http://localhost:5000).
Access the API endpoints to interact with the chat functionality.
This project is created as a job assesment task for wanclouds.