r/reactjs • • Jan 12 '24

Needs Help How to handle backend as a frontend developer?

Hello fellas, I am a React developer. I'm developing personal projects but I don't know how to handle the backend of the project. Are there any platforms/tools I can use for the backend? I don't want to dive into learning Node/Express, looking for an easy way. I need this to store users' data easily.

0 Upvotes

66 comments sorted by

99

u/Turd_King Jan 12 '24

Learn node I don’t understand how you can write in Javascript and just not want to learn node

It’s the best option for you as a developer to progress

-44

u/budd222 Jan 12 '24

While I generally know node, I have no interest in creating a back end with node.

15

u/ravepeacefully Jan 12 '24

Ok then learn python, go, php, c#, Java or ruby.

The language really isn’t all that critical, but if you learned how to make a backend in a more familiar language like JS with node (since you already know JS), the switch to C# will be a lot smoother and you can focus on the differences between languages as opposed to the web frameworks which are going to be almost exactly the same.

-15

u/budd222 Jan 12 '24

I already know PHP and Ruby and I use them. I don't see node is the best option to progress as a developer.

5

u/ravepeacefully Jan 12 '24

His comment was directed at OP, who knows no backend languages. Not you.

I’m not sure how that wasn’t clear

-13

u/budd222 Jan 12 '24

I really don't care

12

u/sandypockets11 Jan 12 '24

Is there a reason? That will likely influence which other options would be suitable

-2

u/chamomile-crumbs Jan 12 '24

Damn you really got downvoted to hell for expressing a pretty mild opinion lmao

8

u/jallen_dot_dev Jan 12 '24

It’s because no one asked.

The suggestion was directed to OP to learn node and this guy comes in with “I generally know node, I have no interest” like lol ok?

-8

u/budd222 Jan 12 '24

Yeah, herd mentality. People see a downvote and think they also need to because they can't think for themselves. Or, they are just nodejs fan boys.

2

u/[deleted] Jan 12 '24

It couldn't be anything you did, lol

23

u/mor_derick Jan 12 '24

I am using Supabase (like Firebase, but for PostgreSQL) at work and have been quite satisfied. You need to learn some PostgreSQL, but once you have it, it's pretty comfortable.

You just authenticate the JS client with your keys and use it to call the API on your tables, relations or even functions and stored procedures. You can spin up a Docker container for local testing and push migrations to production using PostgreSQL scripts.

5

u/sandypockets11 Jan 12 '24

Supabase is great

4

u/mor_derick Jan 12 '24

Have been enjoying it for some months and I think it was a very good choice over Firebase. It has additionally many AI and vector database functionalities you can take profit from.

4

u/eggtart_prince Jan 12 '24

Love that it's free and easy to set up.

1

u/mor_derick Jan 12 '24

I think it is even selfhostable, but I haven't given it a try. I use the managed version.

3

u/kcabrams Jan 12 '24

Bruh supabase fuckkkkkks. I caught wind of it via Udemy course. I scoffed at first bc I didn't feel like dealing with another new thing but was QUICKLY impressed.

For some perspective I am a .NET / SQL SERVER till death kind of dev so for me to go all in on a postgres solution is something.

2

u/mor_derick Jan 12 '24

It is indeed intimidating at the beginning. I got no Udemy course nor tutorial, just reading the docs and implementing it, and once I got everything working it has become the main architectural piece of my project. PostgreSQL's extensible nature just further improves the experience.

The only bad things I can say are relative to some occasional bugs and unresponsiveness I sometimes deal with when working through the dashboard, but the project itself has become as robust and fast as I could imagin thanks to it. As a dev with mainly web frontend background, I don't think I would have been able to reach this level of performance by coding my own backend in less than a month.

12

u/Valiant600 Jan 12 '24

I was like you but... reality caught on. Especially when looking for a job. Apart from the now normal question "have you written a rest api before" I also get the "how familiar are you with docker and kubernetes". The keyword here is familiar not expert. Node is very easy to pick up with a web framework.

I personally like and used professionally Fastify. Again you don't need to be an expert, but being able to set up something quickly or at least if you see a codebase have a general idea of what is going on.

Same for SQL. I am not an expert but basic SELECTs are easy.

5

u/TheRealKidkudi Jan 12 '24

SQL sounds scary when you’re new to it and there’s definitely a deeper end, but as a language SQL is pretty small - learning enough to be effective really isn’t that hard. You can get a pretty decent crash course just by going through the SQL pages on W3 Schools and running some practice queries on a copy of something like the Northwind database

3

u/Valiant600 Jan 12 '24

Exactly. In some cases we even used an ORM tool instead. But basic SQL commands are a breeze.

2

u/Alphafuccboi Jan 12 '24

This even just doing a simple course and then not touching it again will give you enough knowledge to be useful.

11

u/Confident-Ad9787 Jan 12 '24

When you just need to save data you can use Firestore from Firebase. It is easy to use and when I used it worked very well with react.

6

u/kaisershahid Jan 12 '24

nodejs is literally the easiest thing for you to move to—unless you want to write your backend in something besides js. nextjs and remixjs have frontend and backend support integrated, so it really shouldn’t be a huge leap to start dabbling in backend

5

u/Last-Daikon945 Jan 12 '24

Firebase was really begginer friendly to me at the time, I had a similar task

5

u/Quirky_Flounder_3260 Jan 12 '24

Nodejs with express read writing a json file is easy and powerful. I’m a python data scientist and beginner react nodejs dev. The speed threading etc with ern is amazing.

2

u/bootstrapnoob Jan 12 '24

You could explore Appwrite , it’s open source

2

u/sacredgeometry Jan 12 '24

Find a project buddy that knows how to code.

2

u/overtorqd Jan 12 '24

I don't want to dive into learning Node/Express, looking for an easy way.

Node is the easy way. Why do junior developers limit themselves so much?

2

u/dikamilo Jan 12 '24

Use Firebase or pocketbase

1

u/SideLow2446 Jan 12 '24

Depending on the scale and the features of the app, you can make it local-first and store all data locally, for example on localStorage.

1

u/EggsandBaconPls Jan 12 '24

You’re gonna need to know some backend to land a job most likely. Just learn node.

1

u/rennitbaby Jan 12 '24 edited Jan 12 '24

Try using fire base from google to manage your backend first! But it is hard to scale, bc I think they would start charging you fat (but personal projects sometimes don’t need to scale anyways, so depends on your case)

Once you need to scale, either learn a backend framework and it’s language in order implement it yourself or ask a backend engineer to collaborate

Some backends framework and their languages (in no particular order)

  1. Django python

  2. rails ruby

  3. Laravel php

  4. Node js

  5. .Net C#? (Not too sure not a c# dev)

  6. spring Java

(Edit: typos)

1

u/imsexc Jan 12 '24

Fiverr

1

u/hsredux Jan 12 '24

wdym?? there is not a single dev I know who doesn't know backend regardless of their specialization

1

u/captainnoyaux Jan 12 '24

You could learn some cloud provider like amazon lambdas and such

1

u/_jetrun Jan 12 '24

Are there any platforms/tools I can use for the backend?

Then you should be using a PaaS framework like Firebase.

Having said that, you can't get away from having some base level understanding of backend. It will make things easier for you to go through the effort of learning Node/Express (at the very least).

1

u/ThaFresh Jan 12 '24

appwrite is pretty awesome also

1

u/nightman Jan 12 '24

https://pocketbase.io/ This solution will allow you to implement a full-fledged backend for a simple SaaS application. When I write about "one file", you might think that, after all, SQLite has been doing the same thing for years. However, this is not entirely true. With PocketBase, it's not just the data that fits into a single file, but the entire application - complete with Web panel, REST API and everything else necessary to make it work. It's an extremely condensed application that will literally take you tens of seconds to put up (that's just running one file).

1

u/Kumagor0 Jan 12 '24

Nextjs is the easy option. You will still need database to store data, I like prisma for that, but for simple cases just a simple client will do (e.g. ps for postgres)

1

u/Alphafuccboi Jan 12 '24

Then just start by creating your firdt backend. Do it in Javascript or another language. Dont use some mockup tool as a crutch.

Learn more stuff and improve your career. Or dont and stagnate. Tge easyy way is to learn.

1

u/21Blankenship Server components Jan 12 '24 edited Jan 12 '24

Use Next and leverage their API routes. That's by far the easiest approach for a React developer. Sure, it's Node, but if you actually know JavaScript you'll have no trouble with it. Plus, you can't really even use Next effectively without Node, so it's a good skill to have. The API route is a simple function, you're passed some params like you would in express (req/res), and you return a result. The data is served as a REST API. It removes a ton of the overhead otherwise required, and in the end you're just putting business logic in a function.

Database? Use an ORM, I like Prisma but there's other options available. Don't know how to stand up a database or find it to be too difficult? Take the easy route. Use Supabase instead. They have an NPM package you can use to communicate with them. They also have a bunch of other neat built in features.

1

u/DrMerkwuerdigliebe_ Jan 12 '24

I would suggest starting with the T3 stack. It is a good simple for personal projects and will get you started with the minimum amount of effort.

1

u/goughjo Jan 12 '24

As others said. Node. The backend only framework of choice is NestJS. NextJS is a full-stack framework because you have the API directory.

T3 catapulted me into the full-stack world.

https://create.t3.gg/

Check it out. It bootstraps everything for you. With a lot of very decent tooling around it.

1

u/swfl_inhabitant Jan 12 '24

Node and express is definitely the easiest approach, I’m a fan of node and graphql (app sync specifically) or an api gateway backed by node lambdas and aws integrations for nearly no-code back end in some cases

1

u/nomoreplsthx Jan 13 '24

Depends on what you're building. Could you provide more detail.

1

u/friedmud Jan 13 '24

It's tough to imagine how anyone that is great at React would have any trouble with Node+Express. It's still JS... and the semantics are honestly even easier than React.

You don't have to learn SQL either. Just use an object-database (Mongo is the big one, but there are simpler alternatives).

As a backend dev that recently learned the frontend game: frontend is 1000x more difficult. You have to juggle dozens of slightly incompatible packages and environments (browsers) and suffer through all the tediousness of CSS (oh, and you actually have to care about what users want instead of just enforcing an API on your co-workers 😆).

You can do it!

1

u/[deleted] Jan 13 '24

Supabase.

1

u/jitx18 Jan 13 '24

Short answer: Supabase

Long answer: No tool will you much flexibility as your own backend. Honestly backend is easy to begin with although it has many hard parts but you can learn it slowly.

For storing user data you just need to learn basic SQL (max 1 week) and basic node (1 week)

1

u/Legal_Being_5517 Jan 13 '24

Use a json server

1

u/Carlossalasamper Jan 13 '24

Man I think its time to learn node and develop an easy API in Express 🤣

At least you can still working in typescript

1

u/phantom_2101 Jan 13 '24

There’s got to be an open source framework you can use with this all pre built. Do some searches and you can. likely find dozens of them.

1

u/Spare-Builder-355 Jan 12 '24

You will not get far as a software engineer with such an attitude.

For your "backend-less" personal project you can use

Firebase

Supabase

PostgREST

CouchDB / PouchDB

But you need to realize that you will have to learn something new one way or another. Any of the above options can be as simple as tutorial-level Node.js backend or as complex production deployment of Node.js

99.9% of the front end devs do know how to create a simplest backend nowadays and can write simple SQL. Do not be 0.1%

-1

u/noveltywaves Jan 12 '24

Next is basiacally a backend for react, so look into that.

Next can give you type safe data from backend via tRPC and zod.

to persist data, use a database that suits your data, I guess.

0

u/DJXenobot101 Jan 12 '24

Node/Express tutorial on youtube: https://www.youtube.com/results?search_query=node+express+tutorial

A basic backend is as simple as a basic frontend.

You already likely understand CRUD - use one of these tutorials to spin up a basic backend to return data.

If you want to integrate with a DB, then I highly recommend MongoDB instead of getting into SQL.

https://www.mongodb.com has a free hosted tier and instructions on how to integrate into your node backend