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

Local Mock Mode & Cloud Storage Independence #28

Open
1 task done
PSchmiedmayer opened this issue Jul 30, 2023 · 3 comments
Open
1 task done

Local Mock Mode & Cloud Storage Independence #28

PSchmiedmayer opened this issue Jul 30, 2023 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@PSchmiedmayer
Copy link
Member

PSchmiedmayer commented Jul 30, 2023

Problem

The current version of the Spezi Template Application requires the Firebase emulator to be up and running to use and try out the template application. This is a significant hurdle for developers to get started, requires a large dependency to be bundled with the template application, and limits our ability to easily use the application for small tests where a full cloud infrastructure might not be needed.

Solution

The template application should either include a local mock mode or completely remove the dependency on Firebase in its default configuration.
The mock mode should be the default setup when the application is run, and communicating with Firebase in the debug mode should be controlled by a feature flag.

If we decide that the Firebase module should be completely removed, we should add a DocC article on connecting the template application to a cloud provider and use Firebase as an example or provide a fork of the template application that demonstrates a variant of the application using Firebase.

Code of Conduct

  • I agree to follow this project's Code of Conduct and Contributing Guidelines
@PSchmiedmayer PSchmiedmayer added enhancement New feature or request help wanted Extra attention is needed labels Jul 30, 2023
@PSchmiedmayer PSchmiedmayer moved this to Next Steps in Project Planning Jul 30, 2023
@PSchmiedmayer
Copy link
Member Author

Discussion wth @vishnuravi & Oliver: Maintaining a fork is a bit challenging. The entire application in the fork is the easiest for developers, it would be challenging for us to maintain. We should investigate how much the diff would be.

From a user's perspective a fork would be easier to be used.

@Supereg
Copy link
Member

Supereg commented Jan 11, 2024

To add some more context, by now we incorporated a feature flag to disable firebase completely. If so, it completely disables the Account module. We could resolve this issue by additionally configuring the account module with the MockUserIdPasswordAccoutnService (which is used within our previews) to have a Mock for most of the functionality the template app supports.
Apart from that, storage of HealthKit Data and Questionnaire data would need to be mocked (as we already do with the MockWebService?).

@PSchmiedmayer
Copy link
Member Author

Yes, mocking the storage of HealthKit Data and Questionnaires can be done with the MockWebService. I could see a future where the web service actually mocks persistence and allows one to use it as a full local replacement to mock behaviour but that would require some additional work in that package which might actually be kind of interesting 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
Status: Next Steps
Development

No branches or pull requests

2 participants