is Nextjs enough as backend?

Hi guys, I'm new to tRPC and would like to rewrite my current project to use single monorepo instead. It has: Nestjs (API), Nextjs (Frontend), React-Native/Expo (Mobile). I've been looking into some examples using those stacks to do minimal restruction, but none of them are using external backend, only Nextjs. This might not be tRPC related, but looks like it's something like "tRPC practice" 🙂 Is Nextjs really enough as backend?
funki249d ago
@hoxsan next.js is absolutely suitable as a backend. it's just not a "batteries-included-backend" like nest.js or laravel or spring boot. you need to bring your own DB and auth integrations unless you're using a preset like T3 or other starter templates. so purely from an API/backend kind of view you can think of next.js as similarly feature-filled as something like express.js.
HoXsan249d ago
Thanks! My goal was using T3. But it seems like a trouble with authentication with react native :/
ManuRodgers242d ago
try clerk
HoXsan242d ago
I am looking for a solution without external (priced) service 🙂 I know there is free tier
More Posts
TS(2742) error when trying to create clientNPM with Node v18.16.1. I get the following error when trying to create a client. I've imported allWrapping useQuery into a custom hookI'm trying to wrap `useQuery` into a custom hook (as I have some legacy code that I need to run befoPass additional data from `useQuery` to contextFor `splitLink` there is a way to pass context value through `useQuery` as second param `{ trpc: { cCannot set headers in procedures with fetch adapterAm i right that with such a setup in nextjs app router route handler: ```ts const handler = async (rDoes anybody now how to fix cors policy error?I am facing this error: Access to fetch at 'http://localhost:3002/trpc/getBotTag?batch=1&input=%7B%7how to handle error from Zod in trpc?I would like to return error instead throwing it away so i could show user nice feedback i found htt404 TRPCError: no query procedure on pathHi, this is my entire standalone tRPC server:```ts import { initTRPC } from "@trpc/server"; import {Call multiple TRPC endpoints from onSuccess()?I would like to create an API chain for analysing a geographic area where one successful API call caHow to set sizeLimit > 1MB (to solve 413 error)?Hi all, I am trying out the T3 stack where I want to send area polygons given by the user to my NexHow to manage server to server communicationWould managing headers this way work in nextjs as server to server communication? or does next managReplacing the dot notation in URLs with forward slash `/` ?is there a way to replace the dot separation with a forward slash instead ? so instead of `/api/tWhich one method should I use for creating trpc for server componetns in Nextjs 13 App dirHi which one I should use experimental_createTRPCNextAppDirServer or createTRPCProxyClient when it cCan someone explain to me the use of tRPC in server components?I can really see the need for tRPC in client components but can someone explain to me how you would Error-Boundary and TRPCIs there a nice way to catch errors from TRPC at a global level and bubble them into a simple alert Type errors in lambda integrationI really don't know where to start with this error.... I'm going to be integrating tRPC into a lambHybrid application with offline and online mode setup with tRPCHi, I was wondering if I could setup tRPC in way that one http link is using local API (for offline query with no input reports errori have a simple router with a list procedure that takes no input and just does a .query() it used tNext cookies() not being set on Mutation in App Dir (T3 Turbo)Trying to set cookies inside TRPC using Nextjs App Router, using the T3 Turbo setup. Setting cookie