I hope you’re all doing well! I’m reaching out to gather insights from the experienced minds in our community, especially those who have ventured into the realms of FiveM server development.
Data Storage Preferences: I’m embarking on a personal project for an advanced User Control Panel (UCP), and I’m keen to understand how you manage data storage. Do you keep your data local on the same server, or do you opt for an external database? Share your preferences and the reasons behind them.
Key Resources in Use: As a web developer diving into the world of FiveM, I’m eager to know about the main resources that power your servers. What tools or scripts do you find essential for creating a robust and dynamic server environment?
While I might not be a FiveM developer, I am passionate about crafting a top-notch UCP. Your experiences and insights will guide me in understanding the best practices, potential challenges, and the tools I should focus on for an optimal UCP development journey.
Share your thoughts, tips, and recommendations in the comments below. Whether you’ve been in the FiveM community for a long time or just started, your input is invaluable to me.
Thank you all in advance for being a fantastic community. I’m looking forward to learning from your experiences and building something awesome together!
I generally see server owners (at least server owners that I developed for) have the database on the same server. But really you can do it either way, in terms of scripts for connecting to the database I suggest using oxmysql which you can find here:
If you want your UCP to be used by as many people as possible, you might want to make it compatible with ESX or (more preferably) QBCore. Things like level, character, identity, cars, houses, businesses, etc should be in the main framework already for those 2, so testing the panel on your own should be easy (and free!).
Local SQL Server for less latency and replication layer external, but only for the productive server. Also hourly backups saved locally and once a day external backups for disaster recovery. I don’t care about the staging server.
Infrastructure wise, for any online game, it’s better to have the database server hosted within the local net of the game server to cut latency.
I’m currently using Drizzle ORM to manage everything in my DB, using pretty much the whole Drizzle Kit. It’s really a next-level developer experience, and I can’t go back to writing SQL queries manually anymore. You get a fully typed interface to interact with your DB in a safe and efficient way.
And as a plus, you can easily share the schema/models to an independent full-stack Web App project, e.g. a UCP, and easily integrate to your game DB if necessary.