#make a backend
69 messages · Page 1 of 1 (latest)
You basically want to make a clone of Supabase / Firebase from scratch?
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)
So what part exactly are you trying to build?
Auth,database,storage
The auth part is with googles outh screen
Database, i don't know i never done my own database
use sqllite if you do not wanna deal with configurations
How would i connect sqlite to my Nuxt.js app, with fetch or prisma?
I feel so incredibly old reading this chat
i feel very inexperienced
Why make firebase from scratch? Might as well just use it?
i like to struggle
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
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.
lol we sent same msg :3
yeah ^^
thank you alot guys ill check these databases
bapp you've been given 8 kudos from keder_.
shiguskt you've been given 8 kudos from keder_.
ok 😂
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
Yeah no sql sometimes mess my mind im gonna try to learn relational db
yeah, noSQL makes some trade-offs that are hard to understand without first understanding SQL
I think most applications would have established rigid models of some sort and they don't need a noSQL database.
so ill do the auth system with this database right, and how would i make the passwords hidden like hashed?
you store the password hashes in the db
How will i acess the hashes in the client for auth?
like the password
You should use Argon2id
Website with the collection of all the cheat sheets of the project.
You don't.
why does the client need to access the hashes?
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.
oh so thats how i do it
i was wondering how i was gonna check them
There's situations where noSQL benefits outweigh SQL benefits, and vice-versa. it's all situational
so where would i store the salt tho?
Along the passwords.
in the DB, and you validate the password in the backend. you shouldn't validate the pass in the frontend
yeah i mess their names up sometimes
you can have a separate db column for it
Well if you have a User model, you'd have a column for the hash and a column for the salt
okay that makes sense
are you actually going to use this, or are you just doing it for fun/learning?
both
i will use it in future projects
because encryption is something usually best left to experts
Hashing isn't encryption
cryptographically secure hashing...is?
And unless you mess with how the hashing functions you're fine
bad hashing is a security issue, in any case
what is a good hashing then?
how would i do it?
become a cryptology expert?
bruh 😭
oh... lol
There are algorithms you can use like Argon2id or PBKDF2 (use +600,000 iterations)
Thank you ill check them
just use something like bcrypt or similar. most backend libraries will have guidance on password encryption/validation in the docs
yep all modern hashing functions work really ^^
better than how i used to store passwords i guess :D
how did you do it ?