Make Your Own Social Network, Game Server, or Knowledgebase! – Sourcehunt

Share this article

Make Your Own Social Network, Game Server, or Knowledgebase! – Sourcehunt

It’s time for our monthly hunt for new open source libraries to use and contribute to!

If you’re new to Sourcehunt, it’s our monthly post for promoting open source projects that seem interesting or promising and could use help in terms of Github stars or pull requests.

It’s our way of giving back – promoting projects that we use (or could use) so that they gain enough exposure to attract a wider audience, a powerful community and, possibly, new contributors or sponsors.

Sourcehunt logo

lulco/phoenix [16 ★]

An alternative to the very popular Phinx, Phoenix is a way to set up easy and automatic database migrations for any application. You may be wondering “why”? Well, why not? Re-inventing the wheel isn’t necessarily a bad thing if the new wheel is stronger, sturdier, and lighter than the one we used before.

Phoenix is easier to use, has a simpler API, and supports modules, as explained by the author:

We are creating one application for multiple clients, so we need modules. Each client has different modules installed. With Phinx (in older version) we had to run all migrations, which for example creates also not necessary tables. With Phoenix each module has its own migration folder which is registered to migration config only if module is installed.

zeeshanu/opus [502 ★]

Opus is an open source knowledge-base application for teams. Your team, too, can now have an internal collection of guides, descriptions, rules, and documents on how and why you do what you do, making on-boarding new team members or solving already solved problems much easier.

Perfect for coding practices, solutions to common customer problems, guides, wiki entries for installing specific software, and much more. It’s a little clumsily developed with no regard for best practices (no tests, controllers doing everything, typos in method names), but as the old adage goes: he who ships, wins. Besides, these mistakes are a perfect opportunity for contributing to the project!

minds/engine [50 ★]

If Mastodon is the “clean Twitter”, Minds is the polar opposite. This Google-Plus-looking social network focusing on free speech and allowing anyone to say anything (within reason – no child porn etc.) is fully open source and (perhaps wrongly so) boasts encryption and full privacy to all its users.

Check the repo out if you’d like to learn how the back end of a high-traffic social network actually looks like. They could definitely use help in the code quality department, though, so if you’re itching to contribute to the next big thing, this might just be it, what with the Twitter/Youtube migration to more open networks due to censorship.

MazeChaZer/soundless [3 ★]

Our first ever Gitlab sourcehunted repo, Soundless is a functional templating engine for PHP. It’s a completely different way of writing your templates which, while it may be infinitely more confusing to the front-end-only and designer people on your team, has its uses. Like the repo itself says:

Soundless gives you

  • Automatic escaping
  • Easy source code formatting, no fiddling with HTML syntax/whitespace
  • Seamless and type safe integration into other parts of your app
  • All PHP features for composition, abstraction, type safety…

Possible drawbacks

  • The syntax is a little clumsy
  • HTML related tools (i.e. autocompletion/inspections of your IDE) won’t work
  • Performance should be ok, but that hasn’t been tested

Personally, this is way too convoluted for me – I never write complex templates on the back end, since all my views are VueJS now if needed. But I can see people using these in highly complex applications that aren’t single-page yet, and can imagine it being especially powerful in a context like a social network that actually works without JavaScript (that’d be a minor miracle today).

Pterodactyl/Panel [169 ★]

Somewhat niche, the Pterodactyl Panel is an open source self-hosted control panel for users, networks, and game providers. It lets you control games and servers such as those for Minecraft, Counterstrike, TF, Teamspeak, Mumble, and more. If you’ve ever wanted to host your own server for any of those, this panel is a must-have.

The panel, which uses Docker to manage servers and stay scalable, shows the CPU / RAM usage of each server, their current population, allows for different themes, and even provides an API for easy API access to all managed servers.

The community is strong and healthy, with official discussion channels on Discord and forums, in depth installation instructions, and more, but it could still use more testers and players to get feedback from. Besides, there’s quite a few issues that need taking care of.

povils/phpmnd [31 ★]

A package which detects hard-coded numbers in classes and methods that probably shouldn’t be there. For example:

if (mb_strlen($password) > 7) {
              throw new InvalidArgumentException("password");

The 7 in there is a magic number and shouldn’t be there – password length shouldn’t be defined arbitrarily in the middle of a class, but rather via configuration or constants. As the project defines it:

[a] magic number is a numeric literal that is not defined as a constant that may change at a later stage, but that can be therefore hard to update. It is a bad programming practice of using numbers directly in source code without explanation. In most cases this makes programs harder to read, understand, and maintain.

This seems like an excellent addition to any testing suite. There are some PRs and Issues for added functionality, so please dive in and help improve this well-developed and already quite stable code-quality tool.

That’s it for April. Found anything you could sink your teeth into?

As always, please throw your links at us with the #sourcehunt hashtag! If you build something with the projects we’ve mentioned, or if you submit an elaborate pull request you’d like to talk about, give us a shout and we’ll make sure the world knows about it!

Like last time, (that challenge remains unclaimed, by the way – there’s $500 in it for you if you do it!), we’re using the above packages for inspiration on creating a potentially useful app or two:

App+Tutorial idea(s) of the month:

  • implement support for a custom game server into Pterodactyl
  • host your own clone of the Minds social network
  • fix Opus by running it through some basic code quality tools, and help identify the most serious auto-detected issues

Get in touch to find out how much these are worth to us!

Happy coding!

Frequently Asked Questions about Building a Social Network Game Server

What are the key components of a social network game server?

A social network game server is composed of several key components. First, there’s the game logic, which dictates how the game is played and the rules that govern it. Second, there’s the database, which stores all the game data, including player information, game states, and more. Third, there’s the networking component, which allows players to connect to the server and interact with each other. Lastly, there’s the security component, which protects the server and its data from malicious attacks.

How can I ensure the security of my social network game server?

Ensuring the security of your social network game server involves several steps. First, you should implement strong authentication and authorization mechanisms to prevent unauthorized access. Second, you should regularly update and patch your server software to protect against known vulnerabilities. Third, you should monitor your server for any suspicious activity and take immediate action if you detect any threats.

How can I migrate my game server to a different platform?

Migrating your game server to a different platform involves several steps. First, you need to backup all your game data. Second, you need to install the server software on the new platform. Third, you need to restore your game data on the new server. Lastly, you need to test the new server to ensure that everything is working correctly.

What are the challenges of building a social network game server?

Building a social network game server comes with several challenges. First, there’s the technical challenge of designing and implementing the server architecture. Second, there’s the challenge of ensuring the server can handle high traffic loads without crashing or slowing down. Third, there’s the challenge of securing the server against cyber threats. Lastly, there’s the challenge of maintaining and updating the server to ensure it continues to run smoothly and efficiently.

How can I optimize my game server for high traffic loads?

Optimizing your game server for high traffic loads involves several strategies. First, you should implement load balancing to distribute traffic evenly across your server resources. Second, you should use caching to reduce the load on your database. Third, you should optimize your game code to reduce the amount of processing power required. Lastly, you should regularly monitor your server performance and make adjustments as necessary.

How can I troubleshoot issues with my game server?

Troubleshooting issues with your game server involves several steps. First, you should identify the symptoms of the problem. Second, you should check your server logs for any error messages or unusual activity. Third, you should test different parts of your server to isolate the cause of the problem. Lastly, you should implement a solution and test your server to ensure the problem has been resolved.

How can I update my game server without disrupting gameplay?

Updating your game server without disrupting gameplay requires careful planning. First, you should schedule the update during off-peak hours to minimize the impact on players. Second, you should notify players in advance about the planned downtime. Third, you should backup your game data before starting the update. Lastly, you should test the updated server thoroughly before bringing it back online.

How can I add new features to my game server?

Adding new features to your game server involves several steps. First, you should design the new feature and how it will integrate with the existing game. Second, you should implement the feature in a development environment. Third, you should test the feature thoroughly to ensure it works correctly and doesn’t introduce any new bugs. Lastly, you should deploy the feature to your live server and monitor its performance.

How can I scale my game server to support more players?

Scaling your game server to support more players involves several strategies. First, you can upgrade your server hardware to increase its processing power and storage capacity. Second, you can implement load balancing to distribute traffic more evenly. Third, you can optimize your game code to reduce its resource usage. Lastly, you can use cloud-based services to dynamically scale your server resources based on demand.

How can I monetize my social network game server?

Monetizing your social network game server can be achieved in several ways. First, you can charge players a subscription fee to access the game. Second, you can sell in-game items or features for real money. Third, you can display advertisements within the game. Lastly, you can solicit donations from players who wish to support the game’s development.

Bruno SkvorcBruno Skvorc
View Author

Bruno is a blockchain developer and technical educator at the Web3 Foundation, the foundation that's building the next generation of the free people's internet. He runs two newsletters you should subscribe to if you're interested in Web3.0: Dot Leap covers ecosystem and tech development of Web3, and NFT Review covers the evolution of the non-fungible token (digital collectibles) ecosystem inside this emerging new web. His current passion project is, the most advanced NFT system in the world, which allows NFTs to own other NFTs, NFTs to react to emotion, NFTs to be governed democratically, and NFTs to be multiple things at once.

BrunoSgamegamesOOPHPPHPsocial networksourcehuntTemplate engine
Share this article
Read Next
Get the freshest news and resources for developers, designers and digital creators in your inbox each week
Loading form