Skip to content

opielapatryk/DRF_Menu_API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DRF_menu_api_clean

Project is created based on Clean Architecture

Inward -> Simple data x Outward -> Interfaces

External systems

Web Framework: DRF
Repository: Memory

Gateways

Dictionary + DB Interface
i.e. class MemRepo

Use Cases: "business logic"

Receive repo + parameters, returns results

GET: List all dishes
GET{id}: List dish
POST: Add dish
PUT: Edit dish
DELETE{id}: Remove dish

Entities

Module: Dish

TODO

  • Apply Clean Architecture
  • Layer Abstraction
  • Dependency Injection
  • UseCase Implementation
  • Serialization / Deserialization
  • Mock Repo Implementation
  • Apply Tests

Useful commands:

Testing

  • pytest

Build, run, stop

  • python manage.py runserver
  • docker-compose up
  • docker-compose up --build

While switching to mongodb, we have to comment DATABASES in settings.py and check if compose.yml contains correct data

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published