Skip to content

Commit

Permalink
docs: update architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
zumuta committed Nov 10, 2024
1 parent 1c5f2d1 commit 1b9c203
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions backend/docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ separated layer. The backend code is using the domain driven design (DDD) for mo
One of the rules of clean architecture is that when you don't own or control something, then keep it on the
outside of your design or wrap it. This means for example, that the domain code isn't allowed to contain FastAPI code
or database related code. The code for the API is on the outside because it's the entry point of a call to the system.
Presenters are not used yet, but they will be introduced in an upcoming version. The repository pattern keeps the
database code on the outside. Interfaces are used to protect the inside from the outside.
Presenters are used to transform domain objects into JSON:API documents. The repository pattern keeps the
database code on the outside. And interfaces are used to protect the inside from the outside.

The [pendulum](https://pendulum.eustace.io/) library is used for processing dates and timestamps. Because kwai doesn't
own this code, the pendulum code is wrapped into value objects (Timestamp, Date, ...). If the pendulum package is
Expand All @@ -25,12 +25,19 @@ the dependency should be passed as an argument (and passing it down should be do
Actors
======

Who are the actors in our application?

Visitor
-------

A visitor is a person that visits our website. He/She does not have any permissions and is
not known in the system.

Member
------

A member is a person that is a member of the club.

Coach
-----

Expand All @@ -49,3 +56,5 @@ sequenceDiagram

Admin
-----

An administrator is a person that manages the website.

0 comments on commit 1b9c203

Please sign in to comment.