<aside> <img src="notion://custom_emoji/092854f7-d045-4002-9cb8-706c5d2d1d0d/24447e64-2468-8012-b133-007a33d00653" alt="notion://custom_emoji/092854f7-d045-4002-9cb8-706c5d2d1d0d/24447e64-2468-8012-b133-007a33d00653" width="40px" />
TANAY API hosts automations, Discord bots, and an admin interface for operations across everything SoDA does. If Notion handles our knowledge, TANAY API operationalizes it.
</aside>
Source code
Admin interface
The TANAY API is designed as a modular monolith (as opposed to a microservice-based architecture) for simplicity of maintenance and deployment. Modules encapsulate logic and functionality in such a way that different responsibilities are separated. Modules are a first-class feature of Flask, so components and services can easily be swapped in/out without affecting each other.
architecture-beta
group api(cloud)[TANAY API]
service db(database)[SQL DB] in api
service vps(server)[VPS] in api
service ui(internet)[Admin UI] in api
vps:R --> L:db
ui:R --> L:vps
service frontend(internet)[Frontend]
frontend:B --> T:vps
hostinger handles periodic backups for us 🙂 [put a link here]
make sure we still do backups if we switch off hostinger.
mkdir modules/<module_name>
,api.py
for it and if it renders webpages, create a views.py
in the modules folder.,shared.py
(preventing circular imports), if it will be needed in multiple modules, import it to shared.py
first instead of importing it directly.,