Jump to content

Recommended Posts

Posted (edited)

OpenCore Framework

A secure, event-driven TypeScript framework and runtime engine for multi-adapter GTA multiplayer servers.

OpenCore is built for developers who want to create serious server projects in FiveM, RageMP, and RedM without falling into the usual script sprawl.

It is not a gamemode and it is not an RP framework.
It is a framework/runtime layer designed to help you build your own architecture with better boundaries, better tooling, and better long-term maintainability.

Why OpenCore?

Most multiplayer server projects start simple, then become harder to maintain as they grow.

- global state everywhere
- mixed client/server concerns
- weak validation around commands and events
- difficult testing
- hard-to-reuse systems across runtimes

OpenCore was created to solve that with a more structured approach.

- TypeScript-first runtime
- Dependency Injection with explicit contracts
- Decorator-driven controllers and services
- Commands, events, and RPC with validation and security hooks
- Adapter-based architecture for different multiplayer runtimes
- Runtime-aware CLI and compiler for server, client, and UI builds

What it gives you

- A clear execution model for server, client, and views/UI
- Clean separation between core systems, resources, and standalones
- Better safety around input validation, throttling, permissions, and runtime boundaries
- A modern frontend workflow with Vite for UI projects
- A consistent architecture that can scale from a small server to a large modular codebase

Small example

Server controller example:

import { z } from '@open-core/framework'
import { Command, Controller, Guard, Player, Throttle } from '@open-core/framework/server'

const GiveMoneySchema = z.tuple([
  z.coerce.number().int().positive(),
  z.coerce.number().positive(),
])

@Controller()
export class AdminMoneyController {
  @Guard({ permission: 'economy.give' })
  @Throttle(1, 1000)
  @Command({
    command: 'givemoney',
    usage: '/givemoney <playerId> <amount>',
    schema: GiveMoneySchema,
  })
  async handle(player: Player, [targetId, amount]: z.infer<typeof GiveMoneySchema>) {
    player.emit('chat:message', `Giving ${amount} to ${targetId}`)
  }
}

 

Adapter-first design

OpenCore uses adapters so the same framework philosophy can work across multiple runtimes:

- FiveM
- RageMP
- RedM

That means you keep the same architectural model while adapting runtime-specific behavior, output layouts, and platform APIs where needed.

This is especially useful if you care about:

- portability of business logic
- cleaner boundaries between framework and platform code
- long-term maintainability instead of one-off scripting

UI / Views

For browser-based UI, OpenCore now follows a simple model:

- Vite for modern UI stacks
- vanilla fallback for simple HTML/CSS/JS/TS views

The CLI handles runtime-aware build orchestration, while Vite stays responsible for modern frontend tooling.

That makes it easier to build UIs for both standard NUI/browser environments and older embedded browser targets such as RageMP CEF.

Good fit for

- server owners building long-term projects
- developers who want cleaner code structure
- teams that want testable gameplay logic
- projects that need stronger architectural boundaries
- people tired of maintaining large script piles with no clear system design

Links

Website: https://opencorejs.dev/
Documentation: https://opencorejs.dev/docs/intro
CLI / Compiler docs: https://opencorejs.dev/docs/cli/introduction
Discord: https://discord.gg/9294AZrF8

If you are building a new server or refactoring an old one and want a more serious TypeScript foundation for FiveM, RageMP, or RedM, OpenCore may be worth a look.

Feedback is welcome.

Edited by Flussen
markdown fix

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...