-
-
Notifications
You must be signed in to change notification settings - Fork 359
Spiking on the API using Next.js #17
Comments
I would be interested in building a prototype with Next.js. I think it would be a good fit with the SSR, routing and code splitting. |
This aligns with my immediate thoughts about the tech stack so I’d be happy to give it a go. Do you have any high level route / visuals planned? |
What do you guys think about using Next.js embeded API routes for backend? For a simple prototyping app that seems like a good idea. |
You guys can refer to this docs https://nextjs.org/docs#api-routes |
Yeah we were just talking about that in the discord |
Hey, work with next.js from the very first release, glad to help with it. Using new api routes is a great idea! |
This is definitely a good option to go with. |
So I just created an app with sample API routes on Next for a project I'm working on - I can provide a sample repo for anyone who wants to take a look - is there a Discord channel for frontend where I can post the repo deets? |
Is anyone else currently working to create the spike? I can spin it up in a few hours if no one else is - will fork the repo and drop a note here when done |
@QuincyLarson Would this be the API structure we will be looking at more or less?
|
Looks good to me. About Next.js in general: I've been using it for over a year now with TypeScript and Redux and it seems like the best choice for this kind of application. |
Why did you just create CRUD rest endpoints for everyying? |
Also IMO we should use something similar to how rails handles nested routes and not to have a lot of top level routes. |
@Zeko369 I just took the existing tables and created CRUD end points for everything so that we would have a first draft to start working off of. I am hoping to make this a working document so we can keep editing this. We can rip out/add as many end points as we want, as per group consensus. please do provide a consolidated list of edits you want and I'll make the changes. @mmiszy (I'm somehow not able to tag you) -
We wouldn't. I'll remove it PS: I'm open to suggestions regarding any other approaches you guys might have to come to a consensus about the API structure |
Routes look awesome! Although we might want to switch around the auth-related ones, see #40 |
I'll add my thoughts for what they're worth. The end points should be designed to fit the needs of the application. The underlying tables shouldn't be the basis of the API. |
@bernhard-hofmann Agreed. Like I mentioned
We can rip out/add as many end points as we want, as per group consensus. please do provide a consolidated list of edits you want and I'll make the changes. Could you provide your thoughts on what the routes should be? |
The problem with starting with this long list is that we have to remove what's not needed. It's easy to miss something and leave endpoints we don't need. (YAGNI) Let's review what the app needs and create (or keep) only the endpoints needed to satisfy each requirement. |
There are a few scenarios written. We could start from them, analyze the use cases and then design the API routes. |
Here's a first stab at the APIs as per the use cases in README.md As a future participant
As an organizer
{
"name": "new name",
}
@QuincyLarson Looks like the Event table will need 'capacity' to be added
{
"name": "foobar",
"website": "www.website.com",
"type": "VENUE
}
{
"name": "foobar",
"website": "www.website.com",
"type": "FOOD"
} PS: I'm in the process of creating an open API spec so we can have official docs |
"I can email the entire list of participants." Also I would namespace all event routes with group |
@Zeko369 Agreed with both |
I have created a PR with the open API specification for the mentioned end points here: https://github.com/freeCodeCamp/chapter/pull/46/files Please feel free to add to the PR/comment and critique (Additions are preferred to comments as most of us are working on this on top of regular full time jobs 😉 ) cc: @QuincyLarson @Zeko369 @mmiszy |
If MVP is for a single server, hosted by a group, not all of those endpoints (user stories?) seem necessary. If I'm hosting for my local FCC chapter, who is going to come to my group's site and search for a city when my group is geographic by nature? Emails will have to be carefully considered too, as self-hosting email that doesn't get immediately marked as spam takes more than a server being willing to send out. |
@kognise also has a proposed "terminology" update to the readme to call a "chapter" effectively what a "group" is in the schema. Group is pretty vague and it would be nice to have some parity between the core item in the schema and what we're referring to in the business logic terminology. So, can we change "group(s)" to "chapter(s)"? |
@allella For sure. I'll update the swagger doc |
Not sure how any of what you are doing relates to Next.js. We are playing with a Next.js based ui here. If there's a place you'd rather have this let me know. We're not really focusing on the styling. Keeping it raw and just hoping to get the right things on a page for now. |
As API endpoints are ready and we are almost clear about the database schema, should we start the backend development? If that is the case, I would like to contribute from the backend side also! If there is anyone up for team up, please ping me or CC me and let's start working on it! |
Just to be clear, freeCodeCamp will host a single Chapter instance that all of the official freeCodeCamp chapters can be on. This way, a whole lot more people will discover your chapter. This is why we will want search functionality. I just published this last night that goes a bit more into detail on this: #47 (comment) |
We have all decided to use Next.js, and this issue hasn't been updated for a while, so I am closing this issue. |
@all-contributors please add @QuincyLarson for code doc ideas |
I've put up a pull request to add @QuincyLarson! 🎉 |
Would anyone be interested in attempting to use Next.js to build a rough prototype of this application? I've read a lot of good things about Next.js, but ultimately we will see whether it's a good fit when someone digs into it and builds out some of the core routes.
The text was updated successfully, but these errors were encountered: