Subscriptions microservice for Ubademy
This service manages:
- User Subscriptions
- Course Enrollments
For further information visit Ubademy Subscriptions
Deployed at: ubademy-service-subscriptions 🚀
- FastAPI
- SQLAlchemy: PostgreSQL Database
- Poetry
- Docker
- Heroku
Directory structure (based on Onion Architecture):
├── main.py
├── routes
├── app
│ ├── domain
│ │ ├── course
│ │ │ └── course_exception.py
│ │ ├── enrollment
│ │ │ ├── enrollment.py
│ │ │ ├── enrollment_exception.py
│ │ │ └── enrollment_repository.py
│ │ ├── subscription
│ │ │ ├── subscription.py
│ │ │ ├── subscription_exception.py
│ │ │ └── subscription_repository.py
│ │ └── user
│ │ └── user_exception.py
│ ├── infrastructure
│ │ ├── enrollment
│ │ │ ├── enrollment_dto.py
│ │ │ ├── enrollment_query_service.py
│ │ │ └── cenrollment_repository.py
│ │ ├── subscription
│ │ │ ├── subscription_dto.py
│ │ │ ├── subscription_query_service.py
│ │ │ └── subscription_repository.py
│ │ └── database.py
│ ├── presentation
│ │ └── schema
│ │ ├── course
│ │ │ └── course_error_message.py
│ │ ├── enrollment
│ │ │ └── enrollment_error_message.py
│ │ ├── subscription
│ │ │ └── subscription_error_message.py
│ │ └── user
│ │ └── user_error_message.py
│ └── usecase
│ ├── course
│ │ └── course_query_model.py
│ ├── enrollment
│ │ ├── enrollment_command_usecase.py
│ │ ├── enrollment_query_model.py
│ │ ├── enrollment_query_service.py
│ │ └── enrollment_query_usecase.py
│ ├── metrics
│ │ └── enrollment_metrics_query_model.py
│ ├── subscription
│ │ ├── subscription_command_usecase.py
│ │ ├── subscription_query_model.py
│ │ ├── subscription_query_service.py
│ │ └── subscription_query_usecase.py
│ └── user
│ └── user_query_model.py
└── tests
Make sure you add a .env file in the project's root directory. It should include the following variables:
MICROSERVICES=<microservices-dict>
- microservices-dict: {microservice-name: microservice-url}
- python3.9 and utils
- Docker
- Docker-Compose
- Poetry
Once you have installed these tools, make will take care of the rest 😌
make install
make run
make reset
make checks
Once the API is running you can check all available endpoints at http://127.0.0.1:8000/docs#/