Skip to content

Ubademy/ubademy.service.courses

Repository files navigation

ubademy.service.courses

codecov Tests Linters Deploy

Courses microservice for Ubademy

This service manages:

  • Course CRUD
  • Course content
  • Collaborators
  • Reviews

For further information visit Ubademy Courses

Deployed at: ubademy-service-courses 🚀

Technologies

Architecture

Directory structure (based on Onion Architecture):

├── main.py
├── routes
├── app
│   ├── domain
│   │   ├── collab
│   │   │   └── collab_exception.py
│   │   ├── content
│   │   │   └── content_exception.py
│   │   ├── course
│   │   │   ├── course.py
│   │   │   ├── course_exception.py
│   │   │   └── course_repository.py
│   │   └── review
│   │       ├── review.py
│   │       └── review_exception.py
│   ├── infrastructure
│   │   ├── course
│   │   │   ├── course_dto.py
│   │   │   ├── course_query_service.py
│   │   │   └── course_repository.py
│   │   └── database.py
│   ├── presentation
│   │   └── schema
│   │       ├── collab
│   │       │   └── collab_error_message.py
│   │       ├── content
│   │       │   └── content_error_message.py
│   │       ├── course
│   │       │   └── course_error_message.py
│   │       └── review
│   │           └── review_error_message.py
│   └── usecase
│       ├── collab
│       │   ├── collab_query_model.py
│       │   └── collab_query_usecase.py
│       ├── content
│       │   ├── content_command_model.py
│       │   └── course_query_model.py
│       ├── course
│       │   ├── course_command_model.py
│       │   ├── course_command_usecase.py
│       │   ├── course_query_model.py
│       │   ├── course_query_service.py
│       │   └── course_query_usecase.py
│       ├── metrics
│       │   ├── category_metrics_query_model.py
│       │   ├── new_courses_metrics_query_model.py
│       │   └── subscriptions_metrics_query_model.py
│       └── review
|           ├── review_command_model.py
│           └── review_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#/

About

Microservice for courses

Resources

Stars

Watchers

Forks

Languages