❔ Need help with deciding a server and api
So for my friend and I's desktop messaging app project (WPF .NET framwork), we need a way to store the username, email, password, messages and profile picture of every user (the messages could also be saved locally on the device instead for simplicity) and I was recommended to use asp.net core for the server,
MongoDB - NoSQL or PostgreSQL - SQL for my database and
restful api. I was wondering whether anyone had any other recommendations or not.
Finally, I also want to ask about the order in which to make these, do I semi-complete the GUI since it requires user data to generate UI elements or do I make the server and database first and then complete the UI last so that all the functionality is there from the get go
Git : https://github.com/AbuTar/Solaris
GitHub
GitHub - AbuTar/Solaris: A small-scale messaging app (Solaris)
A small-scale messaging app (Solaris). Contribute to AbuTar/Solaris development by creating an account on GitHub.
53 Replies
I imagine u can store the information like usernames and passwords in variables
Maybe. but these usernames and passwords would still need to be saved in some sort of database to either 1)check whether the account exists when logging in or 2) allow other users to find each other by name and connect to each other
@Azrael, I may need some of your help again
ive done this before and what i did was i saved the info in a txt file and have it read the txt file to see if it matches but u might not wanna do it that way
You don’t save passwords in text files.
true, but i cant do anything beyond that yet im still learning lol
in the real world it wouldnt be viable to store credentials in a txt file youd create a database instead
A WebAPI with Postgres seems fine
Yep, that's what I recommended initially.
Any thoughts about the order in which to develop things @ZZZZZZZZZZZZZZZZZZZZZZZZZ @Azrael
I'd probably start with the backend, since you can just test it with Insomnia or CURL
Then write the frontend on top of it
And adjust backend as needed
Alternatively, develop both in parallel
Account system backend and frontend, then messaging system backend and frontend, block system backend and frontend, and so on
Makes sense
I have a question, would the database I'm making (Asp.net core) be accessible over the internet? My intital idea was for the app to access the database when checking if an account exists and for the app to automatically store the user's data in said database
Ideally, no
However that would raise some security concerns since i'm opening up the database to the itnernet
The API would stand between your app (or whatever other client) and the database
I thought as much
Oh ok, it seems I misunderstood the role of the API
client <===> API <===> DB
Quick question : the database would have to been online for the api to secure access to it, no?
Kinda-sorta
You can run the db and the app on the same network, or even the same machine, so it would be available on
localhost
So not really exposed to the internet
If they were to run on separate newtworks, you can whitelist the server's IP on the db server, so nothing else can connect to it
Or even go the route of PGP keys and what notAh I see, I think the plan is for either my friend or me to run the db on our computer so only one of us would have boththe db and the app on the same network
I'd recommend running both on some cheap VPS instead
Exposing your local machine to the internet is a can of worms
Yh, too many risks
And challenges. For example, you need a static IP and not every ISP offers it
Yh
DigitalOcean
DigitalOcean – The developer cloud
Helping millions of developers easily build, test, manage, and scale applications of any size – faster than ever before.
$vps
Cheap recommendations
https://www.scaleway.com https://www.digitalocean.com
https://www.linode.com https://www.ovh.co.uk
https://www.time4vps.eu https://www.vultr.com
https://www.hetzner.com https://contabo.com
Always free options
https://cloud.google.com/free
https://www.oracle.com/cloud/free/#always-free
Even more to choose from
DO and Linode on top.
Vultr and OVH for a super cheap option, $2.50/mo and €3.50/mo respectively
I guess the only other feasible option would be to just use our IP addresses to connect directly but that would be a much more simplified app
Didn't think they'd go so low
Vultr is so cheap because it's IPv6-only
If you need IPv4 it starts at $5
Which is in line with pretty much all other companies
IPv6 addresses should be given out for free.
Ah ok
Well, yeah, IPv6 FTW, but when I last tried to pull a new version of my repo to that Vultr VPS I couldn't, because Github didn't support v6
Aren't there an insane number of ipv6 addresses
Like a trillion trillion addresses
Every grain of sand on Earth could have its own, individual, IPv6 address
Yes
Yes.
Really?
Microsoft owns both GitHub and Azure, GitHub doesn't support it but Azure does.
Funny.
In that case I'll have 100 please
https://skeptics.stackexchange.com/questions/4508/can-every-grain-of-sand-be-addressed-in-ipv6
I was wrong, actually
340 billions of planets could have their grains of sands addressed individually
With decillions of addresses to spare
340 decillion.
Sorry, 280
2.8x10^35
Silly mistake, I won't be able to run my microservice Facebook killer now
My friends mentioned netlify and vercel as alternatives to a vps and so I was wondering how viable that would be
With serverless functions made with JS or TS
And an SPA for frontend
I think my friend wants to use a free db hosting platform and given that I don't mind what we use, I was wondering which of the following is best : microsoft azure, mongo, oracle cloud
Azure costs an arm and a leg, Mongo is a document store not a relational database, Oracle hires more lawyers than developers
Personally, I'd go with Supabase, they have a nice free tier of PostgreSQL
They also let you basically build an API on top of that, with access restrictions and all that good stuff
So you might be able to use it even without an ASP-based API in the middle
Ok, thanks a ton
Would you happen to know of any guides which explained how to create an auth schema db since this looks quite intimidating compared to a public database:
There are multiple tables which seem to have specific purposes
This seems to be already-made auth schema
identities
being users
Although... I'm not 100% sure
Supabase docs should be of help hereOk, I'll read through and see what I can understand
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.I haven’t been able to find anything through the database channel in the discord so I think I’m going to have to watch a s tutorial of sorts
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.