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

Mock API for the front end #97

Open
cMikolai opened this issue Oct 13, 2020 · 9 comments
Open

Mock API for the front end #97

cMikolai opened this issue Oct 13, 2020 · 9 comments
Assignees
Labels
BACKLOG This doesn't seem right CORE-TEAM This item is being worked on by the Core Chingu Quiz team Front End Focused on Front End code (NextJS / Styled Components)

Comments

@cMikolai
Copy link
Member

cMikolai commented Oct 13, 2020

Story:
As a developer I would like a mock API to use in development so that I have quick and easy access to data without involving the production DB.

Details:

  • Setup API in NextJS and in dev make it point to mock setup
@cMikolai cMikolai assigned ghost Oct 13, 2020
@cMikolai cMikolai added the Back End Focused on Back End (Express / Postgres / Docker) label Oct 13, 2020
@ghost ghost assigned rmcguire6 and unassigned ghost Oct 14, 2020
@ghost
Copy link

ghost commented Oct 14, 2020

I know I asked for the issue but it was actually for @rmcguire6 Thanks for creating it though @cMikolai

@ghost ghost added Front End Focused on Front End code (NextJS / Styled Components) and removed Back End Focused on Back End (Express / Postgres / Docker) labels Oct 23, 2020
@cMikolai
Copy link
Member Author

@silentkdev We can close this one, too, right?

@ghost
Copy link

ghost commented Feb 28, 2021

i'm a little torn on this one. It might be helpful to have a mock api we can switch in and out to experiment with while developing for the front end, as we might still be waiting on database schemas to be changed since not everyone knows how to do that.

@cMikolai
Copy link
Member Author

Mhm, that's a good point actually. Let's add it to the points-to-discuss list (... that I will have to start now 🤣 )

@cMikolai cMikolai added the CORE-TEAM This item is being worked on by the Core Chingu Quiz team label Feb 28, 2021
@cMikolai
Copy link
Member Author

cMikolai commented Mar 3, 2021

So, I've been thinking you're right @silentkdev. We definitely need a mock api/database for some testing to not mess with what we will have in production. Also, to make access easier for developers when it comes to Chingu externals etc

@cMikolai
Copy link
Member Author

cMikolai commented Mar 3, 2021

btw I am pushing this into v2 now

@cMikolai cMikolai added the v2 label Mar 3, 2021
@ghost
Copy link

ghost commented Mar 5, 2021

Just a note, when people are developing and working on stuff they won't affect what's in production. The development database is distinct from the production one.

My main concern was that if someone working on a feature didn't have experience with postgresql it might be difficult for them to test out different things that required different data and data schemas then the ones we have from the current schema.

@cMikolai cMikolai removed the v2 label Mar 6, 2021
@cMikolai cMikolai added the BACKLOG This doesn't seem right label Mar 17, 2021
@ZumDeWald
Copy link
Contributor

@silentkdev I updated the user story and details for this one, would you mind adding additional details? Also, your thoughts on if this needs split up into multiple stories (need the API in Next / need it to point to a dev DB in dev / etc...)

@ZumDeWald ZumDeWald changed the title setup a mock api for the front end Mock API for the front end Mar 21, 2021
@ghost ghost self-assigned this Jul 11, 2021
@ghost
Copy link

ghost commented Jul 11, 2021

@ZumDeWald @cMikolai @Soreg

So circling back around to this finally, maybe we could use the Next API functionality as our mock api. We can use something like Faker.js in the route handlers to generate the fake data we're trying to experiment with. This would be much easier for someone to test quickly with than messing with the postgres schema. It also could help us iterate quicker on the shape of our data as well.

Something important to note would be that all the calls to the API would happen client-side for testing and experimenting whereas once we were going to add the logic in permanently we would need to make those calls in the Next getServerProps/getStaticProps methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BACKLOG This doesn't seem right CORE-TEAM This item is being worked on by the Core Chingu Quiz team Front End Focused on Front End code (NextJS / Styled Components)
Projects
None yet
Development

No branches or pull requests

3 participants