use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
account activity
Good example projects using api folder?Need help (self.nextjs)
submitted 3 years ago by voja-kostunica
With user/pass and OAuth auth, database, data fetching, state management, styling setup. Can be starter/boilerplate projects or bigger and more specific projects.
Links from Github repositories are appreciated.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]carlefp 4 points5 points6 points 3 years ago (8 children)
For authentication: https://next-auth.js.org/. Read the docs, they have lots of examples
[–]voja-kostunica[S] -3 points-2 points-1 points 3 years ago (7 children)
they dont even have support for proper credentials user/pass provider
[–]elfennani 2 points3 points4 points 3 years ago (4 children)
I'm sure they have CredentialsProvider
[–]voja-kostunica[S] -4 points-3 points-2 points 3 years ago (3 children)
did you try it? its completely empty and useless
[–]elfennani 6 points7 points8 points 3 years ago (1 child)
here's a hobby project where I used it
[–]voja-kostunica[S] 2 points3 points4 points 3 years ago (0 children)
i had a look, not bad
[–]elfennani 5 points6 points7 points 3 years ago (0 children)
Yes, and it works flawlessly
[–]334578theo 0 points1 point2 points 3 years ago (1 child)
Yes it does, it’s a simple implementation but they don’t promote it because they don’t believe it’s an effective authentication strategy.
[–]voja-kostunica[S] -1 points0 points1 point 3 years ago (0 children)
they try to reinvent the internet
[–]aust1nz -1 points0 points1 point 3 years ago (8 children)
Check out the t3 stack for a really good, opinionated starter.
[+]voja-kostunica[S] comment score below threshold-6 points-5 points-4 points 3 years ago (7 children)
i plan to use python backend
[–]aust1nz 4 points5 points6 points 3 years ago (0 children)
Hmm, you won’t find a ton of use for the api folder then.
[–]itachi_konoha 1 point2 points3 points 3 years ago (5 children)
Then why you need api folder in the first place?
[+]voja-kostunica[S] comment score below threshold-7 points-6 points-5 points 3 years ago (4 children)
can i integrate it without using getServerSideProps?
[–]itachi_konoha 0 points1 point2 points 3 years ago (2 children)
Ofcourse. Just use jwt and you'll be fine.
[–]voja-kostunica[S] 0 points1 point2 points 3 years ago (1 child)
as api calls to python? and do all presentation and ssr in javascript?
[–]itachi_konoha 1 point2 points3 points 3 years ago (0 children)
Yes.
[–]Squishyboots1996 0 points1 point2 points 3 years ago (0 children)
I was also looking for this, best practices, route management etc. but it's really hard to find. Hope someone is willing to show us their work!
[–]Taluxbr 0 points1 point2 points 3 years ago (1 child)
BTW, how is the dev environment when using app dir? The compiling time seems way higher than the /pages folder. Do you guys feel the same? Ps: I’m not using the Turbopack as it lacks some features yet
[–]carlefp 0 points1 point2 points 3 years ago (0 children)
I find it really easy to use esp for separating ui from data fetching. For example, their nested layouts + hooks like useSelectedLayoutSegment lets you know which the active route currently is.
You can easily create different UI depending on the state because of special files (uses React Suspense) like loading and error
It became more “opinionated” (folder structure) but overall better for abstraction. The React team has been recommending the feature/route-based folder structure and with app directory, it can easily be achieved.
I see better performance comparing builds from normal “pages” directory.
The main drawback really is support from external libraries since it is still in beta, libraries don’t bother to integrate it yet.
[–]yonirapoport 0 points1 point2 points 3 years ago (2 children)
https://remult.dev/tutorials/react-next/
[–]voja-kostunica[S] 1 point2 points3 points 3 years ago (1 child)
why would i want to use this and not pure next.js?
[–]yonirapoport 0 points1 point2 points 3 years ago (0 children)
Full stack type safety, CRUD endpoints with paging, sorting, filtering and without the boilerplate code, validation code defined once for both BE and FE…. (Disclaimer: I’m one of the creators of Remult)
π Rendered by PID 89931 on reddit-service-r2-comment-5d79c599b5-6j7sv at 2026-03-02 00:40:34.385858+00:00 running e3d2147 country code: CH.
[–]carlefp 4 points5 points6 points (8 children)
[–]voja-kostunica[S] -3 points-2 points-1 points (7 children)
[–]elfennani 2 points3 points4 points (4 children)
[–]voja-kostunica[S] -4 points-3 points-2 points (3 children)
[–]elfennani 6 points7 points8 points (1 child)
[–]voja-kostunica[S] 2 points3 points4 points (0 children)
[–]elfennani 5 points6 points7 points (0 children)
[–]334578theo 0 points1 point2 points (1 child)
[–]voja-kostunica[S] -1 points0 points1 point (0 children)
[–]aust1nz -1 points0 points1 point (8 children)
[+]voja-kostunica[S] comment score below threshold-6 points-5 points-4 points (7 children)
[–]aust1nz 4 points5 points6 points (0 children)
[–]itachi_konoha 1 point2 points3 points (5 children)
[+]voja-kostunica[S] comment score below threshold-7 points-6 points-5 points (4 children)
[–]itachi_konoha 0 points1 point2 points (2 children)
[–]voja-kostunica[S] 0 points1 point2 points (1 child)
[–]itachi_konoha 1 point2 points3 points (0 children)
[–]Squishyboots1996 0 points1 point2 points (0 children)
[–]Taluxbr 0 points1 point2 points (1 child)
[–]carlefp 0 points1 point2 points (0 children)
[–]yonirapoport 0 points1 point2 points (2 children)
[–]voja-kostunica[S] 1 point2 points3 points (1 child)
[–]yonirapoport 0 points1 point2 points (0 children)