PHP - - By Bruno Skvorc

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!

Sponsors