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 backend #26

Merged
merged 36 commits into from May 21, 2024
Merged

Refactor backend #26

merged 36 commits into from May 21, 2024

Conversation

TiboX2021
Copy link
Collaborator

@TiboX2021 TiboX2021 commented May 8, 2024

Refactor the backend & frontend structure to follow a schema that is more idiomatic to firebase.

  • Refactor the seeder script to populate the database following the new schema
  • Add firestore triggers to help populate the database and publish document data from private to public paths
  • Update firestore rules to reflect the updated firestore structure
  • Create data repositories for experiments, participants, chats, that expose a signal-based interface to firestore
  • Create a global app state for the webapp that integrates all repositories
  • Refactor the frontend to rely on the new appstate & repositories
  • Refactor mutating cloud functions by direct firestore calls when possible, with data validation in the firestore rules

Leo's Edit: Still needed if @vivian proceed with a transition Angular -> Lit/MobX?
Thibaut's answer: to a certain extent, the Lit/MobX version will reuse the backend and the frontend repository structure, so this work is not all in vain.

  • Refactor the frontend to reflect the cloud functions refactor changes)

@LeoLaugier
Copy link
Collaborator

@TiboX2021 just a reminder to add documentation in the readme to cp scripts/service-account.example.json scripts/service-account.json

@TiboX2021 TiboX2021 changed the base branch from main to LeoLaugier-29-04-2024 May 16, 2024 18:03
@TiboX2021 TiboX2021 changed the base branch from LeoLaugier-29-04-2024 to main May 16, 2024 18:03
@TiboX2021
Copy link
Collaborator Author

Ignore the base branch change, I wanted to force refresh the diff after merging #8, but it seems force pushing after a rebase does that already

@TiboX2021 TiboX2021 marked this pull request as ready for review May 21, 2024 14:12
@TiboX2021 TiboX2021 requested a review from iislucas May 21, 2024 14:12
@cjqian cjqian merged commit 14a45ee into main May 21, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants