Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Ivanruii/ragemp-monorepo-boilerplate

Repository files navigation

RAGE Multiplayer Monorepo Boilerplate

Welcome to the RAGE Multiplayer (RAGE MP) Monorepo Boilerplate! This repository provides a starting point for setting up a RAGE MP server with a monorepo structure, making it easier to manage and scale your game server project.

Important

This is not a complete gamemode, just a starting point for those developers who want to start a ragemp server in a simple way.

🛠️ Features

  • Monorepo Structure: Organize your server, client, and cef code in a single repository.
  • TypeScript Support: Write your scripts in TypeScript for better code quality and maintainability.
  • React Support: Using react to create the cef.
  • Modular Architecture: Easily add and manage new features or packages.
  • Built-in Scripting: Preconfigured scripts to set the ragemp structure automatically.
  • Events names package: A monorepo package with enums to prevent mistakes when naming events.

🚀 Getting Started

🚨 Prerequisites

Before you begin, ensure you have the following installed on your machine:

  • Node.js (v20.9.0 or upper recommended, may not work with previous versions)
  • pnpm

⚙️ Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/ragemp-monorepo-boilerplate.git
    cd ragemp-monorepo-boilerplate

    (You can also use this repo as a template in github)

  2. Install dependencies:

    pnpm i
  3. Add your database connection:

    • Go to apps > server and create a .env file with the following data:

      VITE_DB_HOST= // Database IP
      VITE_DB_NAME= // Database name
      VITE_DB_USERNAME= // Database username
      VITE_DB_PASSWORD= // Database password
      VITE_DB_DIALECT= // Database dialect (Availabe databases with sequelize: Postgres, MySQL, MariaDB, SQLite, Microsoft SQL Server, Oracle)

Warning

I have installed Postgres. If you want to use a different database system, you must uninstall mine and install yours. More information in sequelize getting started docs: https://sequelize.org/docs/v6/getting-started/

  1. Add your ragemp server files:

    • Add your ragemp server files to the server-files directory, you should delete the client-packages and packages folders.
  2. Run build command:

    pnpm run build

    The contents of your dists folders will be automatically moved to their corresponding directory after the build.

    • Server build will go to server-build>packages>server
    • Client will go to server-build>packages_client
    • Cef build will go to server-build>client_packages>cef
  3. Start your RageMP server:

    pnpm run start:server

⚙️ Future Additions

  • Add a better architecture for the server, client and cef.
  • Add connection to a database.
  • Dockerize the monorepository.
  • SASS support.
  • Add testing (probably vitest).
  • Add a system to test the operation of the boilerplate, to serve as an example for anyone to follow from there (Login and registration system).
  • Add an event management system between CEF, client and server.

README.md is still WIP ⚒️

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published