GoodForPoC icon indicating copy to clipboard operation
GoodForPoC copied to clipboard

Set up database/API and create form that submits to database/API

Open cattsmall opened this issue 8 years ago • 17 comments

See this architecture doc in the wiki for backend requirements.

We can create a single-page form for now.

Screenshots

Page 1 submission - page 1

Page 2 submission - page 2

Page 3 submission - page 3

cattsmall avatar Sep 17 '17 20:09 cattsmall

Hi! This seems like a good use case for a Rails API with a PostgresDB. What do people think?

0xStarcat avatar Sep 18 '17 01:09 0xStarcat

We had a discussion on Gitter with @cattsmall and @jalcine and decided on a few basic architecture decisions:

Hosting:

  • Ubuntu 17.04 Server on Digital Ocean

Database:

  • PSQL

Backend server/API:

  • Sinatra w/ GraphQL

Front-End:

  • EmberJS

0xStarcat avatar Sep 18 '17 02:09 0xStarcat

some general whiteboarding being done here - https://sketchboard.me/VAFHP1lgrOJW#/

ask me or one of the team members for editing access =)

0xStarcat avatar Sep 18 '17 03:09 0xStarcat

Jacky created an architecture wiki post: https://github.com/GoodForPoC/GoodForPoC/wiki/Architecture

Feel free to discuss it here!

cattsmall avatar Sep 19 '17 22:09 cattsmall

Hey all! I set up Sinatra and GraphQL in a Gemfile + did a fresh install of EmberJS. It's been pushed in the newest file. I'll make sure to reference this issue in future posts.

Feel free to take it from here and get the backend set up beyond that!

cattsmall avatar Sep 20 '17 03:09 cattsmall

To ensure reproducibilty and transparency of the infra, we're going to define some server provisioning scripts. I'll open another issue about this (and end up working on this, lol).

jalcine avatar Sep 20 '17 15:09 jalcine

Tight, thanks Catt!

jalcine avatar Sep 20 '17 15:09 jalcine

I'm going to open a new repository that'll hold the API that this client would hit. In that repository, it'll have the infrastructure building code there as well. I'll track those things there and make it a bocker for this.

jalcine avatar Sep 22 '17 06:09 jalcine

The new repository is here: https://github.com/goodforpoc/goodforpoc-api.

jalcine avatar Sep 24 '17 01:09 jalcine

So, I don't wanna block y'all re: getting data. We can use some tooling to make a "mock" resource for y'all (using mirage + pretender).

Once the API's fully ready; it'd be a hot swap - won't notice a thing :)

jalcine avatar Sep 24 '17 01:09 jalcine

Got some code here that'll set up a mock GraphQL endpoint. https://github.com/GoodForPoC/GoodForPoc-Api/pull/10.

jalcine avatar Oct 01 '17 18:10 jalcine

So the above is done (re: https://github.com/GoodForPoC/GoodForPoC-API/pull/10).

Now we'd just have to have the frontend use models that communicate with this.

jalcine avatar Oct 14 '17 20:10 jalcine

Most of the frontend models needed are in.

jalcine avatar Oct 16 '17 19:10 jalcine

Is this still blocked?

cattsmall avatar Dec 26 '17 19:12 cattsmall

A bit, but we can get around it.

Direct Unblocking Route

  • [ ] Have API provide some tests to show how to post a model.
  • [ ] Provide tests showing failures to give examples on how to handle it.

Concurrent Unblocking Route

Use ember-cli-mirage and this method in this blog post to work on GraphQL-esque stuff without having to wait on the API to fully support it.

jalcine avatar Dec 27 '17 16:12 jalcine

@jalcine this makes sense to me! Godspeed, and let me know how I/others can help!

cattsmall avatar Jan 01 '18 19:01 cattsmall

Will do. I'll add information about the direct unblocking route since it's better long-term.

jalcine avatar Jan 13 '18 05:01 jalcine