Architecture
Packages and Runtime Boundaries
Understand the monorepo packages and what each one is responsible for.
Core Packages
@ragemp-fivem-bridge/server: servermpimplementation.@ragemp-fivem-bridge/client: clientmpimplementation.@ragemp-fivem-bridge/cef: CEF runtime (_bridge.js).@ragemp-fivem-bridge/plugin-manager: builtin/external plugin loading.@ragemp-fivem-bridge/shared: baseEntity,Pool,Vector3, event emitter, storage helpers.@ragemp-fivem-bridge/cli:mp-fivemcommands.
mp Initialization Guard
Server and client entries only initialize when resource metadata ragemp_bridge is not library.
This prevents the standalone bridge resource from self-running its own gameplay runtime and ensures it runs inside the consuming resource context.
Plugin Load Lifecycle
At startup:
- Built-ins are registered.
- Disabled plugin list is read from metadata (
disable_plugin). - Built-ins are loaded.
- Started resources are scanned for external plugins (
bridge_plugin 'yes'). - Future resource starts are watched for plugins.