• Home
  • Experiences
  • Projects
  • About

NX Docs

> Description
NX Docs is an automated documentation platform built for the NX Framework, a modular monorepo architecture designed for FiveM server development. It includes a custom CLI tool developed using the TypeScript Compiler API to extract metadata from client and server modules. This metadata is output as structured JSON and powers a dynamic, UI-focused documentation site. The system ensures that API references remain accurate and synchronized with the codebase without requiring manual updates, significantly improving developer experience and operational efficiency.
> Goals
  • Automate the generation of API documentation for NX services.
  • Provide an interactive, responsive user interface for exploring code-level API structures.
  • Ensure documentation stays synchronized with the codebase across refactors and updates.
> Features
  • Auto-generated documentation: A custom CLI scans and parses service modules, producing structured JSON used to build an API reference interface.
  • Type-aware parsing: Utilizes the TypeScript Compiler API to extract detailed metadata including parameter types, return values, default arguments, and JSDoc annotations.
  • Modular support: Supports both client-side and server-side modules, organizing documentation based on service type and project structure.
  • Method introspection: Provides complete method signature details including descriptions, return types, and examples extracted from source annotations.
  • UI-centric documentation interface: A modern documentation frontend built with Next.js, SCSS, Recoil and Framer Motion, focused on performance and maintainability.
  • Live documentation updates: Changes in the codebase are immediately reflected in the documentation after running the CLI, with support for localization and scoped environments.
> Tech Stack
  • TypeScript
  • Next.js
  • SCSS
  • Recoil
  • Framer Motion
> Learning Outcomes
  • Developed static analysis tooling with the TypeScript Compiler API.
  • Created CLI utilities to automate service metadata extraction.
  • Implemented a scalable documentation system that remains in sync with source code.