{direction:column;gap:72;|-|{stroke:--gray-deep;font-size:12;}.rose{fill:--rose-wash;stroke:--rose-deep;}.sky{fill:--sky-wash;stroke:--sky-deep;}.amber{fill:--amber-wash;stroke:--amber-deep;}.lime{fill:--lime-wash;stroke:--lime-deep;}.iconic{direction:row;gap:8;padding:1218;}|icon|{fill:--rose-soft;stroke:--rose-deep;}}|box#users|.rose.iconic[|icon|"users";"Users"]|group#svc|"Service"{layout:grid;columns:repeat(2);gap:50;padding:26;}[|box#api|"API".sky|slant#db|"Postgres".amber|oval#worker|"Worker".lime|box#mail|.rose.iconic[|icon|"envelope";"Mail"]

api -> db

api --> worker "jobs"

worker -> mail

]

users:bottom -> svc.api "HTTPS"

{layout:sequence;gap:4555;.app{fill:--sky-wash;stroke:--sky-ink;}.auth{fill:--purple-wash;stroke:--purple-ink;}.api{fill:--lime-wash;stroke:--lime-ink;}}|box#app|"App".app|box#auth|"Auth".auth|box#api|"API".api

app -> auth "sign in"

auth --> app "token"

app -> api "GET /me"

api --> app "profile"

{layout:grid;columns:repeat(2);gap:75;.a{fill:--purple-wash;stroke:--purple-ink;}.b{fill:--teal-wash;stroke:--teal-ink;}.c{fill:--amber-wash;stroke:--amber-ink;}}|entity#author|"Author".a{columns:repeat(3);cell:11;}["PK""id""int""""name""varchar"]|entity#post|"Post".b{columns:repeat(3);cell:21;}["PK""id""int""FK""author_id""int""""title""varchar"]|entity#tag|"Tag".c{columns:repeat(3);cell:22;}["PK""id""int""""name""varchar"]

author +-< post

post >-< tag