lexiconhq / lexicon

Built with Expo, React Native, and GraphQL, Lexicon is a pre-built mobile discussions app that you can customize for your users.
https://lexicon.is
MIT License
182 stars 32 forks source link

Rearchitect the Mobile App to Communicate with Discourse directly #13

Closed CodeVsMan closed 1 year ago

CodeVsMan commented 1 year ago

Hey!

Just a general question I wanted to ask, I have been using Lexicon for 1year now. It's an amazingly built app. :)

I needed to ask, I don't want a server to deploy for mt prose.

I have configured AWS AppSync instead of GraphQL as to get the graphQL server. But I needed to know if there's any other configuration from Lexicon side to be done in order to make it work in production? I hope there would be an alternative to have a server for deploying the prose.

Kinostrome commented 1 year ago

Thanks for the feedback, very glad to hear you're enjoying it and finding it useful for a year now.

Where have you deployed it? The App Store, Play Store, or both?

It would be good to know which other Lexicon-based apps are passing the review process for each store. We verify by publishing our own internal app, but we would love to know who else has published as well, and would be happy to list such projects.


As for your question, this is how Lexicon is architected—it currently requires the GraphQL layer in between in order to work.

Fortunately since this is an open-source project, anyone is welcome to fork this project and reconfigure the frontend to interact with Discourse directly over REST.

We would welcome such a PR. Our suggested approach for that type of implementation would be to integrate with Apollo GraphQL, since that is already what the project uses.

Apollo provides a REST adapter, so it's easy to envision a plugin-based system which allows the Lexicon mobile app to be configured with a GraphQL plugin (the existing Prose-based one), or a REST plugin (directly connected to Discourse).


Additionally, to avoid running a second instance just for Prose, you could also look into deploying Prose onto the same instance that hosts your Discourse site. Off the top of my head, there are at least two possible approaches to accomplish that:

Kinostrome commented 1 year ago

We're going to close this for now, but if anyone is interested in taking on this task, please comment and follow up so we can discuss.