r/learnprogramming • • 29d ago

I'm venturing into creating my first app, and I want the data to be stored in the cloud or on a remote server. What do you recommend?

I'm creating a productivity app with habit tracking, and I want the information to be saved so I can access it across different devices and find it wherever I log in. But I'm new to this and entirely self-taught, and after watching so many videos about databases, I'm even more confused. So I'm coming to the experts on the subject. What recommendations can you give me?

4 Upvotes

12 comments sorted by

3

u/0dev0100 29d ago

Web apps and apis are the things you want to look for

You'll want (in no particular order)

  • Hosting
  • database(s)
  • API (node, java, python, c#, etc)
  • authentication and authorization (make sure people are who they say they are and that they are allowed to do what they are asking to do)
  • deployment artefacts unless you're doing your development on the server (do not develop on the server)

Probably some other things as well but you'll work out what those are when you get to them

2

u/SoftMachineee 29d ago

thanks man, it was really enriching, I'll get to studying

2

u/SwiftQuest 29d ago

For a first app I'd skip running your own server and use a hosted backend like Supabase or Firebase. You get a database plus user logins out of the box, so "log in on any device and see my habits" mostly works with a few lines of client code. If you want to learn what's underneath later, the main idea is just: a users table, a habits table with a user_id column, and the app reads and writes rows for whoever is logged in. Start with that one simple schema and add things as you need them.

1

u/sessamekesh 29d ago

Neat! That's a fun personal project.

If you're talking about databases, I'm sure you're already aware, but generally for a cloud app you have (at least) 3 parts: client <--> server <--> database. Client is what you think of as a web app or a mobile app, server is something that understands how to listen for and respond to network requests, database is some persistent data store that can outlive your server. It's usually a whole separate program on its own (like postgres) but can literally just be a `.txt` file that your server saves information to when it shuts down and reads information from when it starts up.

If this is a personal project (or even a "friends and family" sorta thing), take a look at SQLite, it's basically a tiny database that just lives in a file that your app can load. Just about every language under the sun has pretty good sqlite bindings, and your app will interact with it using regular(-ish) SQL, which is a good skill to have if you want to ever build bigger.

Down the road you can start looking into postgres, redis, docker... but frankly SQLite is way more than enough, I've run a one-shot app that had a couple hundred people on it at once just fine with SQLite.

Next thing you'll want is somewhere to host. If you have a computer at home that you don't mind leaving running all the time you can literally just run a copy of your server there. Doing this is pretty common in the "self-hosted" community, and the standard tool here is https://tailscale.com/ - it's basically a VPN that gives your home computer a URL to connect to, but only you (it doesn't expose it to the public internet).

If you don't want to leave a home computer running all the time, what you're looking for is a "Virtual Private Server". Basically a company lets you rent a tiny tiny TINY computer in a data center somewhere, they start at $5/month or so. Ubuntu Server is pretty beginner friendly but UNIX shells can be pretty daunting, there's a gazillion and one guides for "Whatever Language VPS Guide" for most common server languages (but God be with you if you wrote C++ as a beginner here!). Toss in a couple other keywords (nginx + let's encrypt are helpful) if you plan on putting up a proper web URL.

Good luck! It sounds way more daunting than it is, and a LOT of guides put in more elaborate tools than you need, but it is fun to actually deploy a thing.

1

u/newytag 29d ago

The app is only half the equation - the client side (aka front end).

When you're talking about cloud/hosted apps, you need a server side too (aka back end). That's where the database sits, among other components.

Together, these form the full stack of your client-server application. Full stack development is what you need to learn.

Most full stack learning material focuses on a web-based front end, but that's easily interchangeable with a mobile app or desktop app depending on your needs. Part of the point of separating front end from back end (an example of the principal Separation of Concerns) is that the back end code is indifferent to the type of client it's talking to.

Typically, you would not expose your database directly to the client, you would use an API to control access, with the bulk of the program logic, authentication etc in server-side code.

You'll need to first understand the basic architecture of a client-server app before you dive into what specific programming languages or DBMS to use. The perils of being a self-taught developer are that you missed learning these fundamentals, that's probably why you're so confused watching those videos. Learning about database design and SQL is a few steps ahead of where you need to be right now.

1

u/sudo_bryan 29d ago

I use a production server that I rent from hetzner because I use it to host other stuff.

Why not vercel or something?

1

u/Longjumping-Spot3392 25d ago

Keep things simple at first. Supabase or Firebase are good options for handling authentication and cloud data without having to build everything from scratch. SQLite is also worth learning if you want to understand how databases work before moving to something bigger.

Once you get into building features like exporting user activity, generating habit reports, or downloading progress summaries as PDFs, you'll probably need a PDF library too. If you're working with C#/.NET, IronPDF is one option for generating PDFs from HTML and handling things like reports. It's worth exploring alongside tools like QuestPDF or iText.

Focus on getting the login, syncing, and basic habit tracking working first. You can figure out the extra stuff as the app grows.

0

u/Discordbothost 29d ago

if this is for personal use sure but if you plan to distribute it its a waste of times theres already a million apps that do this and some are free and opensource .