社交网络app数据库设计

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.

如果您是Sourcehunt的新手,这是我们的月度帖子,用于推广看起来有趣或有前途的开源项目,这些项目可以在Github明星或请求请求方面使用帮助。

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


卢尔科/凤凰 [16★] (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是非常流行的Phinx的替代产品 ,它是一种为任何应用程序设置简单,自动的数据库迁移的方法。 您可能想知道“为什么”? 好吧,为什么不呢? 如果新车轮比我们以前使用的车轮更坚固,结实和轻便,那么重新发明车轮不一定是一件坏事。

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

正如作者所解释的,Phoenix易于使用,API更简单并且支持模块:

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.

我们正在为多个客户端创建一个应用程序,因此我们需要模块。 每个客户端安装了不同的模块。 使用Phinx(在较旧的版本中),我们必须运行所有迁移,例如,它也创建了不必要的表。 使用Phoenix时,每个模块都有自己的迁移文件夹,只有在安装了模块的情况下,该文件夹才会注册到迁移配置中。



zeeshanu / opus [502★] (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.

Opus是团队的开源知识库应用程序。 您的团队现在也可以拥有内部指南,说明,规则和文档的集合,以了解您如何以及为什么要做自己的事情,从而使新的团队成员入职或解决已经解决的问题变得更加容易。

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!

非常适合编码实践,常见客户问题的解决方案,指南,用于安装特定软件的Wiki条目等。 它有些笨拙地开发,不考虑最佳实践(没有测试,控制器无所不能,方法名称中的错别字),但是随着古老的谚语的流传:成功的人。 此外,这些错误是为项目做出贡献的绝好机会!



思维/引擎 [50★] (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.

如果Mastodon是“干净的Twitter”,那么Minds则是相反的。 这个看起来像Google+的社交网络专注于言论自由,并允许任何人说任何话(在一定范围内–没有儿童色情等)是完全开源的(并且可能是错误的 )为所有用户提供了加密和完全的隐私权。

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.

如果您想了解高流量社交网络的后端的实际外观,请查看回购。 但是,他们肯定可以在代码质量部门使用帮助,因此,如果您想为下一个大事情做贡献,那么也许就是这样,由于审查制度,Twitter / Youtube迁移到了更开放的网络。



迷宫/无声 [3★] (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:

我们的第一个Gitlab源码搜寻仓库,Soundless是PHP的功能性模板引擎。 这是一种完全不同的模板编写方式,尽管它可能对只使用前端的团队和您团队中的设计人员造成极大的困扰,但它却有其用途。 就像仓库本身说的那样:

Soundless gives you

无声给你

  • Automatic escaping

    自动转义
  • Easy source code formatting, no fiddling with HTML syntax/whitespace

    简便的源代码格式,无需摆弄HTML语法/空格
  • Seamless and type safe integration into other parts of your app

    无缝并将类型安全地集成到应用程序的其他部分
  • All PHP features for composition, abstraction, type safety…

    组成,抽象,类型安全的所有PHP功能…

Possible drawbacks

可能的缺点

  • The syntax is a little clumsy

    语法有点笨拙
  • HTML related tools (i.e. autocompletion/inspections of your IDE) won’t work

    与HTML相关的工具(即IDE的自动完成/检查)不起作用
  • 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).

就我个人而言,这太令人费解了–我从不在后端编写复杂的模板,因为如果需要,我的所有视图现在都是VueJS。 但是我可以看到人们在还不是单页的高度复杂的应用程序中使用它们,并且可以想象它在像社交网络这样的环境中特别强大,而该社会网络实际上不需要JavaScript(今天是个小奇迹)。



翼龙/面板 [169★] (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.

在某种程度上,翼手龙面板是面向用户,网络和游戏提供商的开源自托管控制面板。 它可以让您控制游戏和服务器,例如Minecraft,Counterstrike,TF,Teamspeak,Mumble等。 如果您曾经想为任何一个服务器托管自己的服务器,那么此面板是必不可少的。

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.

该面板使用Docker管理服务器并保持可扩展性,该面板显示了每个服务器的CPU / RAM使用情况,它们的当前数量,允许使用不同的主题,甚至还提供了一个API,可以轻松地对所有托管服务器进行API访问。

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.

该社区强大而健康,在Discord和论坛上有官方讨论频道,提供深入的安装说明等,但它仍然可以使用更多的测试人员和参与者来获得反馈。 此外,还有很多问题需要解决



povils / phpmnd [31★] (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:

其中的7是一个不可思议的数字,不应在其中-密码长度不应在类的中间任意定义,而应通过配置或常量来定义。 根据项目的定义:

[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.

[a]幻数是一个数字文字,没有定义为可能在以后更改的常量,因此可能很难更新。 在源代码中直接使用数字而不进行解释是一种不良的编程习惯。 在大多数情况下,这会使程序更难以阅读,理解和维护。

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.

这似乎是对任何测试套件的绝佳补充。 有一些PR和Issues的附加功能,因此请深入研究并帮助改进此开发良好且已经相当稳定的代码质量工具。



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!

与往常一样,请使用#sourcehunt标签将您的链接扔给我们! 如果您使用我们提到的项目构建项目,或者提交您想谈论的详尽请求请求,请向我们喊叫,我们将确保全世界都知道!

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:

上次一样,(顺便提一句,这个挑战仍然无人能解决,如果您这样做,其中有500美元会给您!),我们正在使用上述软件包来启发您创建一两个可能有用的应用程序:

App+Tutorial idea(s) of the month:

本月的App + Tutorial想法:

  • implement support for a custom game server into Pterodactyl

    在翼手龙中实现对自定义游戏服务器的支持
  • host your own clone of the Minds social network

    托管您自己的Minds社交网络克隆
  • fix Opus by running it through some basic code quality tools, and help identify the most serious auto-detected issues

    通过一些基本的代码质量工具运行Opus来修复它,并帮助识别最严重的自动检测到的问题

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

联系我们,以了解这些对我们来说有多少价值!

Happy coding!

祝您编码愉快!

翻译自: https://www.sitepoint.com/make-social-network-game-server-knowledgebase/

社交网络app数据库设计

Logo

一站式 AI 云服务平台

更多推荐