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

Streamline the process of setting up the backend #12

Open
3 of 5 tasks
FilledStacks opened this issue Feb 12, 2021 · 9 comments
Open
3 of 5 tasks

Streamline the process of setting up the backend #12

FilledStacks opened this issue Feb 12, 2021 · 9 comments
Labels
Feature Request A request for a new feature to be developed or discussed

Comments

@FilledStacks
Copy link
Owner

FilledStacks commented Feb 12, 2021

The setup to manage this firebase backend is pretty dope. I like it, other firebase devs like it and it seems like there's a consensus around the ease of expansion for this setup. The only problem that I currently have with it is that it's not standing on its own. Currently you have to write that glob code before you can use the "framework" laid out.

This ticket serves as a action item to track the progress of streamlining the setup required to use the "framework". I have asked for help from @llewellyncollins with this issue and we'll be discussing in the open to come up with a streamlined process of setting this up.

The main goal of this mission is:

Reduce the amount of code required before deploying a backend using the Reactive + RESTful API setup

We're not trying to build a backend building framework. We have a good system (of rules) that I think can scale very well so now we just have to focus on making that easier to start using and then as time goes on we'll establish certain rules for "good practice" within the system.

We'll develop it in a similar way that stacked was developed. If we need something in production that we have to write over and over we'll move it into the package and push out an update. If we don't need it or it doesn't improve the overall maintenance and speed of development then it won't be added.

Todo list of tasks required:

  • Refactor function setup to prep for moving it into its own package
  • Create a new repo for the package to be published from (Repo here)
  • Move the functionality in the functionParser into a new package called firebase-backend
  • Publish the package as v0.2.0 from the filledstacks repo
  • Refactor the Box't Out backend functions to use the new firebase-backend package
@FilledStacks FilledStacks added the Feature Request A request for a new feature to be developed or discussed label Feb 12, 2021
@FilledStacks
Copy link
Owner Author

@llewellyncollins we've gotten to this point where we have neat structure to define an endpoint. Basically I want the code in this folder to be a package. I'm doing some research now then i'll try to extract it into a package, and update the boxtout code to use the new package.

I'm almost certain I'll run into path issues for the glob collecting but i'll try to make the package now. @r0hit-gupta is back on some other work. My goal is to write the written tutorial for the setup on Sunday.

@FilledStacks
Copy link
Owner Author

FilledStacks commented Feb 25, 2021

Status Update

We have not refactored and improved the functionParser that you can view here. The goal is to get this out of the code base and have the backend simply contain the code required for the backend's intended functionality.

@r0hit-gupta
Copy link
Collaborator

I'm almost certain I'll run into path issues for the glob collecting but i'll try to make the package now.

@FilledStacks this is why we pass the root path(__dirname) when calling the FunctionParser. new FunctionParser(__dirname, exports). This shouldn't create much issues, but we need to put proper validations in place and throw meaningful errors if it does.

@FilledStacks
Copy link
Owner Author

@r0hit-gupta nice. You see this is why I need you guys and your JS / TS skills. We'll do a pass of possible exceptions and throw some good errors with guides if anything like that can happen. Once the package is up and going then we can work on those improvements.

@llewellyncollins
Copy link
Contributor

llewellyncollins commented Feb 26, 2021

@FilledStacks Not sure how far you got with the new package. But I have created a repo for the new repo for the package
Repo
Package
Artifacts

I created it under my own GitHub account as I don't have access to Filledstack account. But in my repo, you can see how I went about setting it up.

If you are happy with this I can port this over to a Filledstack repo.

I will need the following

  1. A repo to push to
  2. A npm publish token

Please note in my repo I am publishing to the GitHub registry and not the npm registry, this was just for test and convenience purposes. I do not recommend publishing to the GitHub registry as there are extra steps required in order to install the package

@FilledStacks
Copy link
Owner Author

@llewellyncollins Nice! That's awesome

I've actually created a repo which I linked above in the todo and I sent you an invite for it last night when I made it 😄

You have access on the repo above so you can either push that or your can transfer it over to FilledStacks and I'll delete the our empty one. I'll get on the npm publish token now and send that over to you.

@FilledStacks
Copy link
Owner Author

@llewellyncollins I moved your repo history over here. I failed to publish a package haha, created the filledstacks npm profile and updated from your profile to filledstacks. I have the automate publish token to use for the publishing of the package. Let me know and I'll send that to you.

@llewellyncollins
Copy link
Contributor

@FilledStacks Ah yeah I missed that repo in the Todo. Thanks for moving this over however I did not import the history from the boxtout repo so it is missing @r0hit-gupta history I will see if I can get that sorted.

Now that repo has been moved it will not publish. So I will pick that up and get it working.

Could you please send the npm token to me privately and create an actions repository secret with the name NPM_TOKEN and the value as the npm token. This will allow me to setup up automated packages

@FilledStacks
Copy link
Owner Author

@llewellyncollins no problem, no need to have that full history on here, for now. I'll send it to you on what's app?

I've added the token as NPM_TOKEN so it should be available in the actions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request A request for a new feature to be developed or discussed
Projects
None yet
Development

No branches or pull requests

3 participants