C
C#15mo ago
AceChewy

❔ 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
!Zeldris
!Zeldris15mo ago
I imagine u can store the information like usernames and passwords in variables
AceChewy
AceChewyOP15mo ago
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
!Zeldris
!Zeldris15mo ago
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
Azrael
Azrael15mo ago
You don’t save passwords in text files.
!Zeldris
!Zeldris15mo ago
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
Angius
Angius15mo ago
A WebAPI with Postgres seems fine
Azrael
Azrael15mo ago
Yep, that's what I recommended initially.
AceChewy
AceChewyOP15mo ago
Any thoughts about the order in which to develop things @ZZZZZZZZZZZZZZZZZZZZZZZZZ @Azrael
Angius
Angius15mo ago
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
AceChewy
AceChewyOP15mo ago
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
Angius
Angius15mo ago
Ideally, no
AceChewy
AceChewyOP15mo ago
However that would raise some security concerns since i'm opening up the database to the itnernet
Angius
Angius15mo ago
The API would stand between your app (or whatever other client) and the database
AceChewy
AceChewyOP15mo ago
I thought as much Oh ok, it seems I misunderstood the role of the API
Angius
Angius15mo ago
client <===> API <===> DB
AceChewy
AceChewyOP15mo ago
Quick question : the database would have to been online for the api to secure access to it, no?
Angius
Angius15mo ago
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 not
AceChewy
AceChewyOP15mo ago
Ah 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
Angius
Angius15mo ago
I'd recommend running both on some cheap VPS instead Exposing your local machine to the internet is a can of worms
AceChewy
AceChewyOP15mo ago
Yh, too many risks
Angius
Angius15mo ago
And challenges. For example, you need a static IP and not every ISP offers it
AceChewy
AceChewyOP15mo ago
Yh
Azrael
Azrael15mo ago
DigitalOcean
DigitalOcean – The developer cloud
Helping millions of developers easily build, test, manage, and scale applications of any size – faster than ever before.
Angius
Angius15mo ago
$vps
Angius
Angius15mo ago
Even more to choose from
Azrael
Azrael15mo ago
DO and Linode on top.
Angius
Angius15mo ago
Vultr and OVH for a super cheap option, $2.50/mo and €3.50/mo respectively
AceChewy
AceChewyOP15mo ago
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
Angius
Angius15mo ago
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
Azrael
Azrael15mo ago
IPv6 addresses should be given out for free.
AceChewy
AceChewyOP15mo ago
Ah ok
Azrael
Azrael15mo ago
Troll2
Angius
Angius15mo ago
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
AceChewy
AceChewyOP15mo ago
Aren't there an insane number of ipv6 addresses Like a trillion trillion addresses
Angius
Angius15mo ago
Every grain of sand on Earth could have its own, individual, IPv6 address Yes
Azrael
Azrael15mo ago
Yes. Really? Microsoft owns both GitHub and Azure, GitHub doesn't support it but Azure does. Funny.
AceChewy
AceChewyOP15mo ago
In that case I'll have 100 please
Angius
Angius15mo ago
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
Azrael
Azrael15mo ago
340 decillion.
Angius
Angius15mo ago
Sorry, 280 2.8x10^35 Silly mistake, I won't be able to run my microservice Facebook killer now KEKW
AceChewy
AceChewyOP15mo ago
My friends mentioned netlify and vercel as alternatives to a vps and so I was wondering how viable that would be
Angius
Angius15mo ago
With serverless functions made with JS or TS And an SPA for frontend
AceChewy
AceChewyOP15mo ago
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
Angius
Angius15mo ago
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
AceChewy
AceChewyOP15mo ago
Ok, thanks a ton
AceChewy
AceChewyOP15mo ago
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:
AceChewy
AceChewyOP15mo ago
There are multiple tables which seem to have specific purposes
Angius
Angius15mo ago
This seems to be already-made auth schema identities being users Although... I'm not 100% sure Supabase docs should be of help here
AceChewy
AceChewyOP15mo ago
Ok, I'll read through and see what I can understand
Accord
Accord15mo ago
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.
AceChewy
AceChewyOP15mo ago
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
Accord
Accord15mo ago
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.
Want results from more Discord servers?
Add your server