#make a backend

69 messages · Page 1 of 1 (latest)

undone horizon
#

Hello i want to make something like supabase,firebase from scratch with database/auth/storage what languages will be needed? I'm gonna use nuxtjs for the website

unborn grail
#

You basically want to make a clone of Supabase / Firebase from scratch?

undone horizon
#

Not a clone cause that would take alot of time just something near to it that i can use for my websites

#

İ never made my own database so i don't know how that works

#

But i really like backend more(cause of css)

unborn grail
undone horizon
#

Auth,database,storage

#

The auth part is with googles outh screen

#

Database, i don't know i never done my own database

hard crag
undone horizon
unborn grail
#

I feel so incredibly old reading this chat

undone horizon
river fjord
#

Why make firebase from scratch? Might as well just use it?

undone horizon
oak summit
#

Use a backend library like spring, or whichever other one depending on your language. Use a database technology either relational DB (PostGreSQL, MariaDB, MySQL, whatever) or alternatively a nosql DB like MongoDB, etc

river fjord
#

Though if you really don't want to and want to make your own API (which is totally fair), you'll probably need a database...

A database, which can be relational (MySQL, PostgreSQL, ect.). For relational databases you'll probably need SQL or an ORM like Sequelize (or Keyv but it's much more barebones). And for non-SQL databases, there's MongoDB which also has a library (mongoose IIRC) to write models, ect.

oak summit
#

lol we sent same msg :3

river fjord
#

yeah ^^

undone horizon
#

thank you alot guys ill check these databases

spark tapirBOT
spark tapirBOT
undone horizon
#

idk what they do but

#

here u go lol

river fjord
#

ok 😂

oak summit
#

non-relational easier to get started but easier to screw up, i'd argue it's worth learning relational SQL db's first to get a good fundemental knowledge of DB before trying some noSQL options

undone horizon
oak summit
#

yeah, noSQL makes some trade-offs that are hard to understand without first understanding SQL

river fjord
#

I think most applications would have established rigid models of some sort and they don't need a noSQL database.

undone horizon
#

so ill do the auth system with this database right, and how would i make the passwords hidden like hashed?

winter otter
#

you store the password hashes in the db

undone horizon
#

like the password

river fjord
winter otter
#

why does the client need to access the hashes?

river fjord
#

You get user input, hash it and check if the hashes match (it's a bit more complex because of salting, ect.) but basically, that's it.

undone horizon
#

i was wondering how i was gonna check them

oak summit
undone horizon
#

so where would i store the salt tho?

river fjord
#

Along the passwords.

oak summit
#

in the DB, and you validate the password in the backend. you shouldn't validate the pass in the frontend

undone horizon
undone horizon
#

like hashed:salt ?

winter otter
#

you can have a separate db column for it

river fjord
undone horizon
winter otter
#

are you actually going to use this, or are you just doing it for fun/learning?

undone horizon
#

i will use it in future projects

winter otter
#

because encryption is something usually best left to experts

river fjord
#

Hashing isn't encryption

winter otter
#

cryptographically secure hashing...is?

river fjord
#

And unless you mess with how the hashing functions you're fine

winter otter
#

bad hashing is a security issue, in any case

undone horizon
#

how would i do it?

winter otter
#

become a cryptology expert?

river fjord
#

bruh 😭

undone horizon
#

oh... lol

river fjord
oak summit
river fjord
#

yep all modern hashing functions work really ^^

undone horizon
#

better than how i used to store passwords i guess :D

river fjord