Top Git Project

Freecodecamp's open-source codebase and curriculum....


A declarative, efficient, and flexible JavaScript library...


An Open Source Machine Learning Framework for Everyone


The most popular HTML, CSS, and JavaScript framework for...

System design-primer

Learn how to design large-scale systems. Prep for the...


🙃 A delightful community-driven (with 1900+...


Flutter makes it easy and fast to build beautiful apps...


JavaScript Style Guide


All Algorithms implemented in Python


「Java学习+面试指南」一份涵盖大部分 Java 程序员所需要掌握的核心知识。准备 Java 面试,首选...

Flamework gateways-mod

Implement Flamework remotes with classes


A Flamework networking mod

✨ Featuring

🌉 Gateways - Handle remote events and functions with classes

🛡️ Guards - Block certain requests before they are processed

📞 Pipes - Transform and validate parameters passed to requests

🌻 Motivation

This is mainly a personal project to handle remotes with classes and decorators.

🔌 Installation

"typeRoots": ["node_modules/@rbxts", "node_modules/@flamework"],
npm install @flamework/[email protected]odding
npm install -D [email protected]
npm install @rbxts/flamework-gateways-mod

📚 Examples

🗂️ Client-server connection

connectServer and connectClient should be called before igniting Flamework.

Do note that guards & pipes will not be applied to external listeners like .on, .wait, etc.!

type ServerGateway = OneGateway & AnotherGateway;

const server = connectServer<ServerGateway, ClientGateway>();

server.emit("clientEvent", players, ...args);
server.broadcast("clientEvent", ...args);
type ClientGateway = OneGateway & AnotherGateway;

const client = connectClient<ServerGateway, ClientGateway>();

client.emit("serverEvent", ...args);
client.request("serverInvoke", ...args).catch(...);

🌉 Gateway

Gateways should be added to Flamework.addPaths()

  guards: [new AdminGuard(["littensy"])],
class AdminGateway {
  constructor(private readonly adminService: AdminService) {}

  @UsePipes([], CommandPipe)
  async processCommand(player: Player, message: string | Array<string>) {
    this.adminService.runCommand(player, message as Array<string>);

  async getCommands() {
    return this.adminService.getCommands();

🛡️ Guard

Creatable guards

class AdminGuard implements CanActivate {
  constructor(private readonly admins: Array<string>) {}

  canActivate(context: ExecutionContext) {
    return this.admins.includes(context.getPlayer().Name);

Singleton guards should be added to Flamework.addPaths()

class CommandDebounceGuard implements CanActivate {
  constructor(private readonly roduxService: RoduxService) {}

  canActivate(context: ExecutionContext) {
    const state = this.roduxService.getState();
    return time() >= state.commandDebounce;

📞 Pipe

Creatable pipe

class CommandPipe implements PipeTransform {
  transform(value: unknown) {
    assert(typeIs(value, "string"), "(CommandPipe) Value must be a string");
    return value.split(" ");

Singleton pipes should be added to Flamework.addPaths()

⚠️ Limitations

❌ Client-side RemoteFunctions are not supported

  • It is difficult to safely determine whether a client remote is a function or an event from the server.

❌ Some type limitations

  • Pipe transformation input/output is not type checked, use Input | Output in the parameter type to keep track (see examples).

Next saas-starter

⚡️ Free Next.js responsive landing page template for SaaS products made using JAMStack architecture.

Ts postgres

Non-blocking PostgreSQL client for Node.js written in TypeScript.


Fast and lightweight JavaScript game engine built on WebGL and glTF


IOS Android Web cross platform app for real time collaborative music listening session and playlist editing. Using...


A social media platform to create communities and make friends

Advent of-code

My solutions for Advent of Code in various languages