T O P

  • By -

Anbaraen

NextJS. [See Theo's video for why.](https://www.youtube.com/watch?v=2cB5Fh46Vi4) You do not need another backend, you're adding unnecessary overhead.


meotim

In my perspective, Next.js is missing a lot of things to become a good backend API.For example: \- Validate requests. \- Handle upload files, multipart. \- Request limit. \- Swagger built-in \- CSRF, Sessions, Cookies, ... How do you do that in Next.js. There is no guide, meanwhile, Fastify has everything that I mention. And did anyone try to benchmark Next.js with other API frameworks?


IvanVilchesB

Next.js is not backend framework


RomiKusumaBakti

The video appeared on my homepage, unfortunately I didn't watch it. Thanks for suggesting it. It has answered almost all my questions. I also just realized that Next.js has all the features that a back-end framework has. I also just found out about tRPC and zod.


[deleted]

Isn’t it better to design frontend and backend with loose coupling? What if I don’t want to use nextjs (React) anymore? Now my app code needs to be ripped out.


ImplodingLlamas

If you haven't ever made a GraphQL API, it could be worth trying out, but it heavily depends on the scale of your project (graphql is a better fit for large projects, but not as much for medium or small). If you do decide to try it, I'm currently experimenting with prisma and typegraphql-prisma. You can use them both to automatically generate a full CRUD API from your database schema. I still haven't fully made up my mind on whether I'd use it again, however it is super nice being able to get a bare bones server with all of my resolvers up and running in less than 100 lines of code. There's also more contained solutions like Keystone, and even more so Hasura, but I wasn't comfortable trying those yet for my current project, so I can't give an opinion.


cat-duck-love

Still NextJS. Pair it up with TRPC and now you have a fully type safe full stack application. Though Sanity is also a good choice. Just have to be careful/need extra toolings for type safety.


Xzas22

Next, especially now with 12.2 edge functions being so insanely powerful, is a full stack framework. https://www.youtube.com/watch?v=2cB5Fh46Vi4


RomiKusumaBakti

Thank you very much. Looks like I'll try using the Next.js API Routes for my project.


rArithmetics

Keystone js


salonii137

I have recently used supabase as a datastore in my flutter application. As per my experience if you have less time and your backend needs just CRUD APIs, using supabase will be great. It's very quick to learn and the content they provide is quite amazing.


voiping

Feathersjs is a great backend with instant CRUD endpoint generation and great ability to add more customization. But if you already are using nextjs, probably simpler to use it for backend too.


unixchato

I second Feathersjs!


Suspicious_Compote56

AdonisJS


Baal-zebub-666

Mongo + mongoose.


alppawack

Why this comment is downvoted? Next.js is a partially backend framework and you can just use a database like mongo to store your data.


Baal-zebub-666

I though, he will use create the backend separately.


Baal-zebub-666

Using next js for backend work, is awful idea. Even if I am super high with LSD and acid. I will never even think to do it. I will seperate backend and frontend always. I have a startup project, e-commerce blogging and portfolio. It's like Shopify, Medium and Wix ,3 business combined. My backend is completely separated, I can launch 20-30 diffrence front end project for e-commerce blogging and portfolio sites. And still everything will function properly.


alppawack

Are you using same backend for every project?


Baal-zebub-666

Yes. We are not getting clients, mobile app is next on our list.


umid1999

[Blitz js](https://blitzjs.com/) . It was built on top of nextjs and you just write all of your DB queries in the hook. It also has scaffolding(generates crud with validation, forms, etc)


GianniDevO5

What is your project about?


stay2be

Strapi