- Notifications
You must be signed in to change notification settings - Fork405
openmultiplayer/web
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
open.mp multiplayer game framework
A multiplayer mod for Grand Theft Auto: San Andreas that is fully backwards compatible with San Andreas Multiplayer.
This monorepo contains the web services and documentation for open.mp and SA-MP.
docs/
Wiki documentation for SA-MP and open.mp in Markdown format including translations.frontend/
Next.js app for thehttps://open.mp site.prisma/
Prisma database models for generating Go code and SQL migrations.app/
Backend API for server listings, accounts, etc.
To work on the frontend, you mostly only need to focus on thefrontend/
directory. Runnpm
commands in there such asnpm run dev
. See the readme file in there for more details.
The only files that the frontend need thatare not in that directory aredocs/
which it uses to for thehttps://open.mp/docs pages..env
is not used for frontend development.
When working on the backend, the root of the repository is where you need to be. The server application will assume it's being run from the root,not from withincmd/
.
To start the API server, useTaskfile and runtask
, the default task is to build and run the API server.
The frontend, by default, only uses the live API. To change this you must edit any URLs fromhttps://api.open.mp/...
tohttp://localhost/...
.
You can run the following command to get a minimal development environment ready:
docker-compose -f .\docker-compose.dev.yml up -d
The.dev.yml
Compose configuration contains services that aren't secure or production ready and suitable for local testing.
The frontend is deployed directly toVercel from themaster
branch.
The backend is deployed to a server from themaster
branch using thedocker-compose.yml
file. You can simulate a production deployment by runningdocker-compose up
.
We host large static assets such as images and videos on an S3-compatible object storage. This runs atassets.open.mp
and you can use the taskupload-assets
to upload all public assets fromfrontend/public
.
The easiest way to do this is via theMinio client. Once installed, set up an alias calledomp
:
mc alias set omp https://assets.open.mp ACCESS_KEY SECRET_KEY
Replace the two keys with the real keys.
Then run the task:
task upload-assets
About
The open.mp web services monorepo. Homepage, documentation, server index, and more! All in one place.