https://github.com/dud0sinka/wehavetwitterathome
A secure Flask-based web application with simple twitter-like posts.
https://github.com/dud0sinka/wehavetwitterathome
docker flask nginx posting python secure web
Last synced: 3 months ago
JSON representation
A secure Flask-based web application with simple twitter-like posts.
- Host: GitHub
- URL: https://github.com/dud0sinka/wehavetwitterathome
- Owner: dud0sinka
- Created: 2025-02-26T21:32:11.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-02T21:48:44.000Z (over 1 year ago)
- Last Synced: 2026-01-03T22:02:16.549Z (6 months ago)
- Topics: docker, flask, nginx, posting, python, secure, web
- Language: Python
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Flask Dockerized Web Application
A secure, containerized Flask web messaging/posting application with Nginx as a reverse proxy.
## About The Project

This project is a Flask-based messaging application containerized with Docker and secured with Nginx as a reverse proxy. It includes user authentication, two-factor authentication (TOTP), password recovery, and PostgreSQL database support. The application follows security best practices, ensuring input validation, data sanitization, and logging for login attempts.
### Built With
-  [Flask](https://flask.palletsprojects.com/en/stable/)
-  [Docker](https://www.docker.com/)
-  [Nginx](https://nginx.org/)
-  [PostgreSQL](https://www.postgresql.org/)
## Getting Started
Follow the instructions below to set up and run the project locally.
### Prerequisites
Ensure you have the following installed:
- Docker
- Nginx
- Python 3.10+
### Installation
1. Clone the repository:
```sh
git clone https://github.com/github_username/repo_name.git
cd repo_name
```
2. Create and configure the `.env` file:
```sh
cp .env.example .env
```
Modify the `.env` file with the appropriate database credentials and secret keys.
3. Build and start the containers:
```sh
docker-compose up --build
```
4. Generate self-signed SSL certificates with:
```bash
mkdir -p ./certs
openssl req -x509 -newkey rsa:4096 -keyout ./certs/key.pem -out ./certs/cert.pem -days 365 -nodes
```
5. Access the application at `https://localhost`
## Usage
This project provides:
- Secure user authentication with password hashing
- Two-factor authentication using TOTP
- Secure password recovery process
- Posting messages with basic formatting
- Auto-signing and verifying message integrity (a little sign indicating whether the message has been tampered with)
- Restoring access to the account
- Viewing each user's profile with all their posts
- Monitoring login attempts (successfull or not, IP, user agent, timestamp)
- Thorough user input sanitization and validation
## Contributing
Contributions are welcome! Please follow these steps:
1. Fork the repository
2. Create a feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a pull request
## Contact
**Gmail** – [kravtsov2109@gmail.com](mailto:kravtsov2109@gmail.com)
**LinkedIn** – [Serhii Kravtsov](https://www.linkedin.com/in/serhii-kravtsov-/)
**Facebook** – [Serhii Kravtsov](https://www.facebook.com/dud0sinka/)