Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor rsslay to proactively retrieve feeds #21

Merged
merged 20 commits into from
Sep 18, 2023
Merged

Refactor rsslay to proactively retrieve feeds #21

merged 20 commits into from
Sep 18, 2023

Conversation

boreq
Copy link

@boreq boreq commented Sep 12, 2023

Goals:

  • Download data in the background to always be able to return data quickly.
    • Done.
  • Make the project more composable e.g. separate out markdown and html processing from constructing nostr events.
    • Created clear adapter/app/domain layers. Didn't fix everything to keep the pull request small.
  • Make testing easier.
    • Testing the domain layer is easy now.
  • Eliminate the bug which causes the feed to not be updated under some circumstances.
    • Unclear. Maybe we need to remove caching altogether, it is not really useful right now.

What has been done:

  • http handlers no longer contain core domain logic
  • http handlers no longer have direct access to the database
  • http handlers no longer misuse the same types for database queries and template rendering
  • http handlers no longer have access to secrets
  • created an adapters layer which encapsulates database access
  • created an domain layer for data validation, more core logic needs to be moved there in the future
  • created an application layer to glue everything together
  • cleaned up duplicated calls to libraries to convert keys to the nip19 format in http handlers
  • cleaned up error handling logic in http handlers
  • saving feed definitions will no longer fail quietly in case of database errors
  • fixed nonsensical error handling when saving feed definitions
  • events are properly retrieved in a single place in the application layer and not from multiple places
  • removed duplicate code

@boreq boreq changed the title Cleanup Refactor rsslay to proactively retrieve feeds Sep 12, 2023
@boreq boreq self-assigned this Sep 12, 2023
@boreq boreq marked this pull request as ready for review September 15, 2023 14:48
@boreq boreq merged commit 2d07a44 into main Sep 18, 2023
3 of 4 checks passed
@boreq boreq deleted the cleanup branch September 18, 2023 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant