A robust and scalable notification system designed to send notifications across multiple channels, including email, SMS, and push notifications. Built with a modern technology stack, this system is designed for high performance and reliability.
- Multi-Channel Notifications: Supports sending notifications via email, SMS, and push notifications.
- Scheduled Notifications: Schedule notifications to be sent at a future date and time.
- Notification Priorities: Assign priorities to notifications to ensure that critical alerts are delivered first.
- Recipient Management: Easily manage recipients and their contact information.
- Scalable Architecture: Built with a microservices-based architecture to handle high volumes of notifications.
- Asynchronous Processing: Uses Celery and RabbitMQ for asynchronous task processing to ensure that notifications are sent without blocking the API.
- Database Migrations: Uses Alembic to manage database schema changes.
- Backend: FastAPI
- Database: PostgreSQL
- Asynchronous Tasks: Celery
- Message Broker: RabbitMQ
- Result Backend: Redis
- Database Migrations: Alembic
- Dependency Management: uv
- Testing: pytest
- Docker
- Docker Compose
- Python 3.12+
-
Clone the repository:
git clone https://github.com/your-username/notification-system.git cd notification-system -
Create a
.envfile:Copy the
.env.examplefile to a new file named.envand update the values as needed.cp .env.example .env
-
Run the application:
docker-compose up -d
The application is configured using environment variables. See the .env.example file for a list of available variables.
To run the tests, use the following command:
pytestThe API is documented using Swagger UI. To access the documentation, go to http://localhost:8000/docs in your browser.
-
URL:
/api/v1/notifications/ -
Method:
POST -
Body:
{ "user_ids": [1, 2], "channel": "email", "priority": "high", "subject": "Test Subject", "content": "Test Content" }
.
├── app
│ ├── api
│ │ ├── endpoints
│ │ └── schemas
│ ├── core
│ ├── db
│ │ ├── nosql
│ │ └── sql
│ ├── services
│ ├── tests
│ ├── utils
│ └── worker
├── docker
├── migration
└── README.md