Skip to content

Latest commit

 

History

History
128 lines (104 loc) · 4.58 KB

README.md

File metadata and controls

128 lines (104 loc) · 4.58 KB

ubademy.service.subscriptions

codecov Tests Linters Deploy

Subscriptions microservice for Ubademy

This service manages:

  • User Subscriptions
  • Course Enrollments

For further information visit Ubademy Subscriptions

Deployed at: ubademy-service-subscriptions 🚀

Technologies

Architecture

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

Installation

.env

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}

Dependencies:

Once you have installed these tools, make will take care of the rest 😌

make install

Usage

Run the API locally

make run

Reset Database and then run locally

make reset

Run format, tests and linters

make checks

Access API Swagger

Once the API is running you can check all available endpoints at http://127.0.0.1:8000/docs#/