https://github.com/hardmax71/flet-chat
A modern, real-time chat application built with Flet, FastAPI, and PostgreSQL.
https://github.com/hardmax71/flet-chat
chat fastapi flet postgresql pydantic-v2 python redis
Last synced: about 1 year ago
JSON representation
A modern, real-time chat application built with Flet, FastAPI, and PostgreSQL.
- Host: GitHub
- URL: https://github.com/hardmax71/flet-chat
- Owner: HardMax71
- License: mit
- Created: 2024-09-03T20:28:04.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-27T21:53:00.000Z (about 1 year ago)
- Last Synced: 2025-04-14T21:13:22.103Z (about 1 year ago)
- Topics: chat, fastapi, flet, postgresql, pydantic-v2, python, redis
- Language: Python
- Homepage:
- Size: 186 KB
- Stars: 13
- Watchers: 2
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Flet-Chat
[](https://codecov.io/gh/HardMax71/Flet-Chat)
[](https://app.codacy.com/gh/HardMax71/Flet-Chat/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[](https://opensource.org/licenses/MIT)
[](https://www.python.org/downloads/release/python-3110/)
## 🚀 Features
- Real-time messaging
- User authentication and authorization
- Group chat functionality
- Message history and search
- Responsive UI design
- Docker support for easy deployment
## 🛠️ Tech Stack
- **Frontend**: [Flet](https://flet.dev/) - A framework for building interactive multi-platform applications in Python
- **Backend**: [FastAPI](https://fastapi.tiangolo.com/) - A modern, fast (high-performance) web framework for building APIs with Python
- **Database**: [PostgreSQL](https://www.postgresql.org/) - A powerful, open-source object-relational database system
- **ORM**: [SQLAlchemy](https://www.sqlalchemy.org/) - The Python SQL toolkit and Object-Relational Mapping (ORM) library
- **Data Validation**: [Pydantic](https://pydantic-docs.helpmanual.io/) - Data validation and settings management using Python type annotations
- **Containerization**: [Docker](https://www.docker.com/) and Docker Compose
## 🚀 Getting Started
Follow these steps to get Flet-Chat up and running on your local machine:
Click to expand step-by-step instructions
### Prerequisites
- Docker and Docker Compose
- Python 3.11 or higher
### Starting the Application
1. **Start the Backend Services**
Navigate to the project root directory and run:
```bash
docker-compose up -d
```
This command will start the PostgreSQL database, Redis, and the FastAPI backend service.
2. **Start the Frontend Flet App**
a. Create a virtual environment:
```bash
python -m venv venv
```
b. Activate the virtual environment:
- On Windows:
```bash
venv\Scripts\activate
```
- On macOS and Linux:
```bash
source venv/bin/activate
```
c. Install the required packages:
```bash
pip install -r requirements.txt
```
d. Run the Flet application:
```bash
python main.py --web # also possible: flet run
```
This will launch the Flet application, and you should see a window open with the chat interface.
3. **Accessing the Application**
- The Flet frontend application will be running as a desktop app.
- The FastAPI backend will be accessible at `http://localhost:8000`.
## 📚 Documentation
For comprehensive documentation on Flet-Chat, please refer to our [GitHub Wiki](https://github.com/HardMax71/Flet-Chat/wiki). The wiki provides detailed information on installation, usage, architecture, and more.
For API-specific documentation, once the application is running, you can access:
- Swagger UI: `http://localhost:8000/docs`
- ReDoc: `http://localhost:8000/redoc`
## 🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## 📄 License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## 📞 Contact
For any questions or feedback, please open an issue on the GitHub repository.
Happy chatting! 🎉