Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hexa Development

HEXA DOCS

Official documentation for Hexa Framework

Installation guides, API references, examples, and development documentation for hexa_core and the Hexa ecosystem.


Documentation VitePress Vue.js RedM


Guides · API Reference · Examples · Migration · Development


About

hexa-docs is the official documentation website for the Hexa Framework ecosystem.

The documentation is designed to provide a single source of truth for server owners and developers working with Hexa.

It covers everything from installing hexa_core to building custom RedM resources using Hexa APIs.

Live Documentation


Documentation Scope

The documentation includes areas such as:

Hexa Documentation
│
├── Getting Started
│   ├── Installation
│   ├── Server Configuration
│   └── First Resource
│
├── Core Concepts
│   ├── Players
│   ├── Characters
│   ├── Jobs
│   ├── Money
│   ├── Items
│   └── Metadata
│
├── API Reference
│   ├── Functions
│   ├── Exports
│   ├── Events
│   ├── Callbacks
│   └── Permissions
│
├── Bridge
│   ├── RSG Compatibility
│   ├── VORP Compatibility
│   └── Migration
│
└── Development
    ├── Resource Structure
    ├── Examples
    └── Best Practices

Documentation continues to expand alongside the framework.


Tech Stack

Technology Usage
VitePress Static documentation framework
Vue.js Components and interactive documentation
Markdown Documentation content
TypeScript VitePress configuration
GitHub Actions Automated deployment
GitHub Pages Documentation hosting

Local Development

Clone the repository and install dependencies:

git clone https://github.com/hexa-development/hexa-docs.git
cd hexa-docs

npm install

Start the VitePress development server:

npm run docs:dev

The documentation will be available locally at:

http://localhost:5173

Changes to Markdown files and VitePress configuration will automatically refresh during development.


Build

Generate the production version of the documentation:

npm run docs:build

The generated static files are written to:

docs/.vitepress/dist

Preview the production build locally:

npm run docs:preview

Deployment

Production deployment is handled automatically through GitHub Actions.

Push to main
     │
     ▼
GitHub Actions
     │
     ▼
Install Dependencies
     │
     ▼
VitePress Build
     │
     ▼
GitHub Pages
     │
     ▼
Live Documentation

Push changes to the main branch:

git add .
git commit -m "docs: update documentation"
git push origin main

The deployment workflow will build the documentation and publish the latest version to GitHub Pages.

Workflow configuration:

.github/workflows/deploy.yml

Project Structure

hexa-docs/
│
├── .github/
│   └── workflows/
│       └── deploy.yml
│
├── docs/
│   │
│   ├── .vitepress/
│   │   └── config.mts
│   │
│   ├── index.md
│   │
│   ├── guide/
│   │   └── ...
│   │
│   ├── api/
│   │   └── ...
│   │
│   ├── bridge/
│   │   └── ...
│   │
│   ├── th/
│   │   └── ...
│   │
│   └── public/
│       └── ...
│
├── package.json
└── README.md

Important directories

Path Purpose
docs/.vitepress/ VitePress configuration, navigation, sidebar, and theme setup
docs/index.md Documentation landing page
docs/guide/ Installation guides and framework concepts
docs/api/ API and developer reference
docs/bridge/ RSG and VORP compatibility reference
docs/public/ Static assets
.github/workflows/ Automated build and deployment workflows

Writing Documentation

Documentation pages are written primarily in Markdown.

Example:

# Player API

Access a player through Hexa Core:

```lua
local HexaCore = exports['hexa_core']:GetCoreObject()

local Player = HexaCore.GetPlayer(source)

VitePress also allows Vue components to be used directly inside documentation pages when more advanced presentation or interaction is required.

---

## Documentation Guidelines

When contributing documentation, keep pages focused on practical usage.

Prefer:

```text
What the API does
      ↓
How to use it
      ↓
Parameters
      ↓
Return values
      ↓
Example
      ↓
Common mistakes

Code examples should be:

  • Minimal
  • Valid
  • Copy-friendly
  • Consistent with the current Hexa API
  • Explicit about client/server context
  • Clear about expected parameters and return values

Avoid documenting internal implementation details unless developers are expected to depend on them.


Example API Documentation

A typical API reference should clearly show the environment and expected behavior.

local HexaCore = exports['hexa_core']:GetCoreObject()

local Player = HexaCore.GetPlayer(source)

if not Player then
    return
end

Player.AddMoney(
    'cash',
    100,
    'example_reward'
)

Where possible, documentation should explain:

API
├── Purpose
├── Context
│   ├── Client
│   └── Server
├── Parameters
├── Return Value
├── Example
└── Notes

Hexa Ecosystem

hexa-docs is the single source of truth for every repository below.

Project Description
hexa_core Core framework — players, jobs, items, economy, status, callbacks, permissions
hexa_inventory Persistent grid inventory — stashes, shops, ground drops, secure trading
hexa_progbar Screen-fixed progress bar — drop-in for ox_lib progressBar
hexa-bridge Compatibility layer for supported RSG and VORP resources
hexa-docs Official documentation and API reference (VitePress)
(this repository)
rdr2-unpack Read a local RDR2 install into open formats — GLB, PNG, .ymap JSON
txAdmin One-click txAdmin recipe that deploys the whole Hexa stack

Live site: hexa-development.github.io/hexa-docs · เอกสารภาษาไทย


Contributing

Documentation improvements are welcome.

Useful contributions include:

  • Fixing incorrect API documentation
  • Adding missing parameters or return values
  • Improving installation instructions
  • Adding examples
  • Documenting newly supported APIs
  • Fixing broken links
  • Improving migration guides
  • Reporting outdated information

When documenting a new framework feature, update the documentation together with the corresponding framework change whenever possible.

This helps prevent the classic framework problem where the code is three versions ahead of the docs and everyone starts reading source files like ancient prophecy.


Development Workflow

A recommended documentation workflow:

Framework Change
      │
      ▼
Update Documentation
      │
      ▼
Test Code Examples
      │
      ▼
Run Local Docs
      │
      ▼
Build Production
      │
      ▼
Push to main
      │
      ▼
Automatic Deployment

Documentation should answer the question before Discord has to.

Official documentation for Hexa Framework


Documentation · เอกสารภาษาไทย · hexa_core · hexa_inventory · hexa_progbar · hexa-bridge · Organization

About

Official documentation and API reference for the Hexa RedM framework, powered by VitePress

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors