-
Notifications
You must be signed in to change notification settings - Fork 38
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
Use Firebase for future features #33
Comments
Sounds good, we were actually considering using Firebase, since there's a couple of new features that we were thinking about adding, that would have to make use of DB. However, adding a database makes us face the issue of authentication. Have you considered this? Because right now, new communities are added by PR, and Github takes care of authentication. Nevertheless, if we use a Firebase project with a DB to store the communities data, we'd have to handle it ourselves. I've never created a Firebase project before, so I have no idea of what it has to offer regarding authentication. Any suggestions? |
Firebase has a great amount of authentication features, in fact you may still use Github account to log in. Using firebase you may set some basic rules about writing and reading capabilities for some known users (administrators for instance) or that only if you own certain data you are allow to modify it without writing any API. However, firebase offers a free service until you cross a number of queries per month. It is a generous threshold though. I've created a couple of projects based on a firebase database using firestore, however it implies creating an account that will own the project and I don't know how are you handling this at the moment. I would be happy to have a videochat with you guys and see what would it implies and what other options you were considering so may just discard this option or plan it better as it has an important organizational first step. |
Hi all. In case you think about firestore take into account that if in near future you plan to add more features related to geolocation could be helpfull to use a mongodb database instead as it has a lot of good methods for querying geodata. |
Hi everybody, I speak with @Anexon who started a first prototype using Firebase to move the json to the database and he'll create a basic authentication using https://github.com/angular/angularfire (official package). I think that in the next step, we can build a minimalist backend wich will be use MongoDB as @mjimenezmartin said. We want to develop interesting features using the map because this will be the heart component in this proyect. Thanks for your time! :-) |
…-firebase script In order to achieve this, a google storage bucket has been created and set it as public so any document can be accessed anonymously from a public URL. This can be done through the google cloud console by adding 'allUsers' with reader role to the IAM control. In the next steps community service would privide images with update url instead of getting it from local files. Related issue: voidcosmos#33
Hi there! I got some news. Here you may find a working example of using firebase to retrieve communities and images. I included a script that replicates the current communities.json local file to firebase and upload all generate images in pre-deploy process to google storage. Before ng serveBefore to get it working you will need to create a new project using firestore on firebase, get the credentials and put them in the mentioned script file (see package.json) and in environment.ts file. Also you will need to go to Google Cloud Console and make the bucket public so anyone can access to the images. Now you can execute the script to replicate the content to firebase. Remember to generate images first! ConclusionIt may seems a little bit tricky to get all of this working but it is only firebase configuration. We may use an "official" account and I would left it configured and running and I would document the process just in case. If you want to try it by your self first, please let me know if you get stucked in some of the processes of creating firebase elements. |
Hi everyone! Here you may get a working example of the web as official credentials are set for the default environment. I set reading permissions to anonymous requests and writing permissions to admin users that are set manually. So anybody is able to edit the database but the admins and this is the key point, we should decide how would be the adding community procedure as it would not be possible by editing the json file anymore. From this point, I would plan a bunch of new features that may be needed to give control to community managers to update their info without editing original repository, all by accessing an user area and so many other features! Let me know what you think |
Hi @Anexon ! I have started to raise new issues that could be interesting features in which we need a Firebase store like the one you have raised. The point is that I think this PR could be integrated when we have a form in angular-communities that allows sending new communities to anyone. What do you think of that? I would like the community to be able to supply their community information at all times and not to place the burden on the administrators of Angular-Communities. So what do you think if we develop your issue and proposal as a slightly richer PR in which we will integrate the following features:
Later, I think that with this feature we could open new ones like the ones I have proposed:
What do you think if we get down to work creating a PR in which we integrate the basic functionalities that I have described and work on it to be able to create something of greater value without losing what we have now? A greeting! |
Hey @tonivj5 and @NyaGarcia , |
Yeah, we should break it 👍 I love the idea to level up communities! Thanks @Anexon for your involvement on this, #55 is a good start. I like some functionalities that firebase can offer us. I think we should follow using |
I guess you have already considered but I think that community.json and communities logos may be moved to a more dynamic place such as database or to firebase even, so it can be modified without any project updates.
In addition, it could be used to develop a simple API service to allow Angular Community Managers to claim the control of their information so they can update it when necessary, as you do on Google My Business. Also, it can be used for getting new communities applications that only need to be reviewed and accepted, without any repository changes.
This may seems quite ambitious, but at the very first step would be only moving the data to a more dynamic place and init the connection to the database so many other features may be proposed around this capability in the future; login, subscribing, notifying events, getting sponsor offers, etc...
In specifics, I would update CommunityService so it retrieves the information from a firebase project or any other database that may be proposed. However, a firebase account with limited access should be created and the data structure instantiated with the current data in communities.json.
I don't know if this is out of scope, what do you think?
I would be happy to help by doing this feature or helping on creating the Firebase project or considering other options as well!
The text was updated successfully, but these errors were encountered: