Skip to content

Commit d574fb1

Browse files
committed
Siva | Add CHANGELOG and enhance README with project features and setup instructions
1 parent 4402850 commit d574fb1

File tree

2 files changed

+125
-30
lines changed

2 files changed

+125
-30
lines changed

CHANGELOG.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [1.0.0] - 2025-04-25
9+
10+
### Added
11+
- **Distributed Messaging System**
12+
- Implemented FastAPI for RESTful API endpoints
13+
- Integrated RabbitMQ as message broker with management interface
14+
- Set up Celery for background task processing
15+
- Added Flower dashboard for real-time task monitoring
16+
- Configured PostgreSQL for message persistence
17+
18+
- **Notification Services**
19+
- Integrated Twilio API for SMS notifications
20+
- Integrated Brevo (formerly Sendinblue) for email notifications
21+
- Implemented separate queues for SMS and email tasks
22+
- Added idempotency key generation for message deduplication
23+
24+
- **Infrastructure & Configuration**
25+
- Containerized application using Docker and docker-compose
26+
- Implemented health checks for all services
27+
- Added environment-based configuration for web and worker components
28+
- Set up Poetry for dependency management
29+
- Configured separate virtual environments for web and worker
30+
31+
- **API Features**
32+
- Added Swagger UI documentation at `/docs`
33+
- Implemented RESTful endpoints for notifications
34+
- Added root endpoint health check
35+
36+
- **Worker Configuration**
37+
- Configured worker concurrency (2 workers)
38+
- Implemented task acknowledgment after processing
39+
- Added task requeuing on worker failure
40+
- Set up result backend with PostgreSQL
41+
42+
- **Monitoring & Management**
43+
- RabbitMQ Management UI (port 15672)
44+
- Flower monitoring dashboard (port 5555)
45+
- Database health monitoring
46+
- Service dependency management
47+
48+
49+
[1.0.0]: https://github.com/ysskrishna/fastapi-rabbitmq-celery-flower/releases/tag/v1.0.0

README.md

Lines changed: 76 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,84 @@
1+
# FastAPI RabbitMQ Celery Flower Application
12

2-
## Docker commands
3+
A distributed application for sending SMS and emails using FastAPI, RabbitMQ, Celery, Flower and PostgreSQL.
34

4-
**start all containers**
5-
```
5+
### Features
6+
- **Distributed Messaging System**: Implemented a robust architecture for message processing using FastAPI, RabbitMQ, Celery, and PostgreSQL
7+
- **SMS Notifications**: Integration with Twilio API for sending SMS messages
8+
- **Email Notifications**: Integration with Brevo (formerly Sendinblue) for sending transactional emails
9+
- **Message Queuing**: Separate queues for SMS and email tasks to optimize message processing
10+
- **Database Persistence**: PostgreSQL integration for storing and tracking message status
11+
- **Containerization**: Full Docker support with docker-compose for easy deployment
12+
- **Real-time Monitoring**: Flower dashboard for monitoring Celery workers and task execution
13+
- **API Documentation**: Swagger UI for easy API testing and documentation
14+
15+
### Technical Highlights
16+
- **FastAPI Web Server**: RESTful API endpoints for triggering notifications
17+
- **Celery Workers**: Background task processing for non-blocking operations
18+
- **RabbitMQ Message Broker**: Reliable message queuing with management interface
19+
- **Health Checks**: Service health monitoring for all components
20+
- **Environment Configuration**: Separate environment configurations for web and worker components
21+
- **Dependency Management**: Poetry for Python dependency management
22+
23+
### Infrastructure
24+
- **Database**: PostgreSQL 14
25+
- **Message Broker**: RabbitMQ 3 with Management Plugin
26+
- **Monitoring**: Celery Flower dashboard with authentication
27+
- **Service Orchestration**: Docker Compose with health checks and dependency management
28+
29+
## Setup and Run
30+
31+
1. Clone the repository:
32+
```bash
33+
git clone https://github.com/ysskrishna/fastapi-rabbitmq-celery-flower
34+
cd fastapi-rabbitmq-celery-flower
35+
```
36+
37+
2. Update environment variables:
38+
39+
**For webserver/.env:**
40+
```
41+
TWILIO_FROM_PHONE="your-twilio-phone-number"
42+
BREVO_FROM_EMAIL="your-brevo-from-email"
43+
```
44+
45+
**For worker/.env:**
46+
```
47+
TWILIO_ACCOUNT_SID="your-twilio-account-sid"
48+
TWILIO_AUTH_TOKEN="your-twilio-auth-token"
49+
BREVO_API_KEY="your-brevo-api-key"
50+
```
51+
52+
3. Run the application using Docker Compose:
53+
```bash
54+
docker-compose up -d
55+
```
56+
57+
4. Access the application:
58+
- Swagger API documentation: `http://localhost:8000/docs`
59+
- RabbitMQ Management UI: `http://localhost:15672/` (Username: admin_user, Password: admin_pass)
60+
- Flower dashboard: `http://localhost:5555/` (Username: admin, Password: supersecret)
61+
62+
## Development
63+
64+
To modify the application:
65+
66+
1. Update code in the `webserver` or `worker` directories
67+
2. Restart the containers:
68+
```bash
69+
docker-compose down
70+
docker-compose up -d
71+
```
72+
73+
## Docker Commands
74+
75+
```bash
76+
# Start all containers
677
docker compose up --build
7-
```
878

9-
**stop all containers**
10-
```
79+
# Stop all containers
1180
docker compose down
12-
```
1381

14-
**stop and delete volumes**
15-
```
82+
# Stop and delete volumes
1683
docker compose down -v
17-
```
18-
19-
**Fastapi swagger documentation**
20-
```
21-
http://localhost:8000/docs
22-
```
23-
24-
**Rabbitmq Dashboard**
25-
```
26-
http://localhost:15672/
27-
```
28-
29-
**Flower dashboard**
30-
```
31-
http://localhost:5555/
32-
```
33-
34-
**update webserver/.env variables**
35-
```
36-
TWILIO_FROM_PHONE="your-twilio-phone-number"
37-
BREVO_FROM_EMAIL="your-brevo-from-email"
3884
```

0 commit comments

Comments
 (0)