Courses microservice for Ubademy
This service manages:
- Course CRUD
- Course content
- Collaborators
- Reviews
For further information visit Ubademy Courses
Deployed at: ubademy-service-courses 🚀
- FastAPI
- SQLAlchemy: PostgreSQL Database
- Poetry
- Docker
- Heroku
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
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#/