I am in the process of developing a pure Typescript application that interacts with a database through an API. I am seeking guidance on establishing the most optimal architecture for this project. My goal is to achieve the following within my app:
- Retrieve data from an API and efficiently map it into Typescript objects
- Temporarily store the data (without persistence) for the duration of the session
- Respond to user interface actions by calling appropriate data access layer functions
- Send all processed data to an external library for graph visualization
I have included a visual sketch of how I envision this architecture should be structured https://i.sstatic.net/vOT2B.png
The challenge lies in transitioning from React, which I am familiar with, to using plain Typescript for this project. I have encountered issues with poor architecture decisions in the past and aim to avoid them by creating a clean and efficient design.
Are there any recommended resources for achieving this? Ideally, I would appreciate a straightforward example of clean code for a basic application (excluding the graphing component) for reference.