I'm building a website where users can create accounts with usernames and passwords, plus message each other. I'm not sure where to start and would appreciate some tutorials on how to set this up. Also, I'm wondering if I should have a separate file for each user's information. If my site has 200 accounts, should a unique file be created automatically for each user?
4 Answers
For messaging features, check out websockets; they're commonly used in chat applications. As for your users' data, a database is really the way to go! It’s a much better solution than individual files, and there are plenty of resources available to learn about setting it all up.
If you're thinking about keeping data in files, you might want to check out NoSQL databases like MongoDB or Firebase. They are designed for document-based storage and can handle user info quite well. Just make sure you're taking security seriously, especially with passwords—encrypt those!
Definitely prioritize security when dealing with user data. It’s really important!
Using files for each user isn't the best approach. Instead, it's better to use a database which is specifically designed for handling user data efficiently. This will save you a lot of headaches down the line.
I totally agree! You should definitely look into using a database for storing user data. It's a more scalable solution and allows you to manage everything much more easily. Also, consider using platforms like Meta or Google for handling authentication, which can simplify your process.

Thanks for the advice! I'll look into these database options.