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

Add functionality to transmit flight + user information to a firebase service #3342

Closed
mitchell-foote opened this issue May 12, 2024 · 1 comment
Labels
type/feature an issue describing new functionality

Comments

@mitchell-foote
Copy link
Contributor

Is your feature request related to a problem? Please describe.

With the creation of the new CMSC mobile app, James would like to integrate Thorium flights to the backend service powering the new app.

Describe the solution you'd like

Similar to how spaceEdventures worked previously, It would be nice to just enter in a secret_key, and have the ability to set up certain areas (flight name, position, logs, etc) to send to that external service.

Describe alternatives you've considered

I looked into the code that's powering spaceEdventures, but some of it is obfuscated behind a separate service. One option is to extend the functionality to allow for different backend services, instead of making a separate flow that doesn't disturb existing functionality.

I'm also open to other options as I don't have a ton of expertise with the spaceEdventures system.

Additional context

I know there might be some history with this feature. Best person to ask about questions regarding specifics is James.

@mitchell-foote mitchell-foote added the type/feature an issue describing new functionality label May 12, 2024
@alexanderson1993
Copy link
Member

Yeah, all of that code is in the Space Edventures repo.

Here's where the center query, which is used by the Thorium.spaceEdventurescenter query is defined: https://github.com/alexanderson1993/space-edventures/blob/master/functions/graphql/schema/center.js

The userByToken query, which is used by Thorium.getSpaceEdventuresLogin is here: https://github.com/alexanderson1993/space-edventures/blob/master/functions/graphql/schema/user.js

And creating flight records, which is in the Flight class, is here: https://github.com/alexanderson1993/space-edventures/blob/master/functions/graphql/schema/flightRecord.js

I think those are the only graphQL endpoints that are used directly by Thorium.

The API URL is hard-coded in server/helpers/graphqlClient.js. If the new CMSC mobile app backend is able to exactly mimic the GraphQL API for those three endpoints, then the only change that would be necessary in Thorium is making it so you can configure a different API endpoint.

In other words, so long as the requests are accepted the same as before, and the responses are sent back the way that Thorium expects, no other changes should be necessary. That would be ideal, but not strictly necessary since the CMSC is the only place that uses SpaceEdventures anyway.

Though if the powers that be were so inclined, I know that Bracken and the Space Place at Renaissance would be interested in using something like SpaceEdventures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature an issue describing new functionality
Projects
None yet
Development

No branches or pull requests

2 participants