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

Choice of tech stack #1

Closed
gustavlrsn opened this issue Nov 25, 2019 · 1 comment
Closed

Choice of tech stack #1

gustavlrsn opened this issue Nov 25, 2019 · 1 comment

Comments

@gustavlrsn
Copy link
Member

Here's some opportunity to discuss and review the intended tech stack of the project.

The starting point has been to try to stick close to the tech stack of Realities, with the explicit exception of its graph database, as it seems overkill for the use case here, and choose something more conventional.

I think a general ambition of the tech stack should be to have as few surprises as possible, and choose technology that a lot of people are already using, to lower the barriers for someone wanting to contribute.

Suggested stack:

  • UI: React, Next.js, Apollo Client
  • API: GraphQL server using Node.js, Apollo and PostgreSQL (?)

Next.js is not used in Realities, but I can very much recommend it. It takes care of a lot of complexity around webpack, server side rendering, and routing.

Database

I've been thinking that PostgresSQL should be a pretty non-controversial choice, but would also be happy to work with MongoDB. Feedback and input here would be welcome, also on what ORM if any, to use.

@gustavlrsn
Copy link
Member Author

I tried setting up a basic data model of users, memberships, events and dreams in PostgreSQL using something called Prisma2, and hooking up the resolvers to its database client Photon. The result of that you can find in the prisma branch (model definition, resolvers). Prisma2 seemed promising but it is still in Preview and it required a little bit of a special setup, and might not live up to the ambition of having as few surprises as possible. Using a more traditional ORM for SQL is of course a possibility, but personally I did not want to sink more time into this, so I went with something I've used in the past quite a bit: Mongoose and MongoDB.

I think the hosted database options are speaking in favour of MongoDB as well:

  • Hosted Postgres on Heroku, free tier:
    • 10 000 rows
    • 20 connections
  • MongoDB atlas, free tier:
    • 500 mb
    • 500 connections

We might also be eligible for $3000 in free credits from MongoDB atlas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant