• Home
  • Experiences
  • Projects
  • About

NX

> Description
NX is a modular, monorepo-based development framework designed for building high-performance, scalable systems, on FiveM (a multiplayer platform for GTA V). It emphasizes service-oriented architecture, full-stack type safety, and a developer-friendly experience. The system is composed of resource-based applications, shared service packages, and tooling for building, and validating modular runtime logic within FiveM environments. NX is currently in alpha and open to contributions.
> Goals
  • Provide a scalable, modular architecture for FiveM server development.
  • Support strong typing and shared validation schemas across server, client, and shared logic.
  • Improve developer experience with tooling, automation, and structured service boundaries.
> Features
  • Monorepo architecture: Built with Turborepo and PNPM, the workspace separates concerns between applications, shared libraries, configuration, scripts, and service definitions.
  • Resource-based application modules: Each application module (e.g., rc) includes client, server, and shared folders with support for command handlers, event bindings, and service controllers.
  • Decorator-based service exposure: Public methods within services are exposed to FiveM’s global runtime using custom decorators and TypeScript metadata reflection.
  • Dynamic runtime exports: Server classes dynamically introspect and export services and methods to the FiveM global context for use across modules.
> Usage
  • // Example service method export
    @ExportedMethod()
    kickPlayer(reason: string) {
      // Implementation
    }
    
    // Auto-registered and exposed to <NX>.kickPlayer
    
  • // Usage example
    const NX = exports.NX.useServer()
    
    const nxPlayer = NX.Players.Get(1)
    
    nxPlayer.kickPlayer(reason)
    
> Tech Stack
  • TypeScript
  • Lua
  • React
  • Vite
  • Zod
  • Sass
  • Zustand
  • MySQL
  • Esbuild
  • ESLint
> Learning Outcomes
  • Designed a modular, service-based framework targeting game server infrastructure.
  • Built runtime-safe service exports using decorators and reflection metadata.
  • Applied modern monorepo practices to manage application topologies.