Challenge amenitiz.io
- python 3.7.z
- pip
- virtualenv
- src
- application (Business Logic Layer)
- domain (Domain Layer)
- infrastructure (Infrastructure Layer)
- presentation (Presentation Layer)
- tests
- unit
- application
- domain
- infrastructure
- presentation
- unit
- App has been organised this way in an attempt to reflect Hexagonal Architecture in the code base
- The Domain Layer has been implemented with SQL Alchemy declarative Base style
- The Infrastructure layer SQL Alchemy along its ORM has been chosen
- The Presentation layer has been implemented using FastAPI
- The Business Logic Layer consists in a set of services where each method is executed in a transactional fashion (see Transaction class)
The heart of the challenge can be found at RuleEngine class
The idea behind this approach is to keep each layer as much as isolated as possible.
Just follow virtualenv documentation
- Enable virtualenv
# From project's root directory (assuming virtualenv was named 'venv')
source venv/bin/activate
# From project's root directory
pip install -r requirements.txt
# From project's root directory
python -m src.main