Closed stefanhk31 closed 8 months ago
...what if we put EVERYTHING backend into AWS?
Butter would have NO interaction w/Dart, and the API Key would never leave AWS Backend is simply a data source that is hooked up to AWS
If we do it this way, do we need the anonymous auth token? It might help, but maybe we could just make the DF a Cognito user and restrict API access to that backend
Proposed file structure: App (current FE) API (Dart Frog) Packages
Butter Client Blog Repo (uses DF not Butter) AWS Client(s)
Or, nesting: 0 (Root): app
To start, butter Client will be in DF as a direct dependency of data source, but data source will eventually call AWS client which will interface w butter in lambda
App (or DF?) will need a dedicated blog_api_client for communication bt app and DF
In-progress work underway. Next big things:
Some changes:
Move aws_client and butter_cms_client to dependencies of blog_data_source.
DF endpoints will fetch blogs from data source, which grabs the butter key on init
Advantages:
Simplicity: FE only cares about one endpoint, BE does all the work to get data Security: key is never given to FE in any form
Disadvantages: ...extra middle man? Extra deployment