Git Product home page Git Product logo

web's Introduction

open.mp multiplayer game framework

Wiki | Discord

A multiplayer mod for Grand Theft Auto: San Andreas that is fully backwards compatible with San Andreas Multiplayer.

open.mp


open.mp Web Services

This monorepo contains the web services and documentation for open.mp and SA-MP.

Overview

  • docs/ Wiki documentation for SA-MP and open.mp in Markdown format including translations.
  • emails/ MJML email templates for account registration and other things.
  • frontend/ Next.js app for the https://open.mp site.
  • prisma/ Prisma database models for generating Go code and SQL migrations.
  • app/ Backend API for server listings, accounts, etc.

Frontend Development

To work on the frontend, you mostly only need to focus on the frontend/ directory. Run npm commands in there such as npm run dev. See the readme file in there for more details.

The only files that the frontend need that are not in that directory are docs/ which it uses to for the https://open.mp/docs pages. .env is not used for frontend development.

Backend/Full Stack 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 within cmd/.

To start the API server, use Taskfile and run task, 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 from https://api.open.mp/... to http://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.

Deployment

The frontend is deployed directly to Vercel from the master branch.

The backend is deployed to a server from the master branch using the docker-compose.yml file. You can simulate a production deployment by running docker-compose up.

Uploading Assets

We host large static assets such as images and videos on an S3-compatible object storage. This runs at assets.open.mp and you can use the task upload-assets to upload all public assets from frontend/public.

The easiest way to do this is via the Minio client. Once installed, set up an alias called omp:

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

web's People

Contributors

southclaws avatar amyrahmady avatar daddydot avatar ipollo avatar adib-yg avatar gurkansahinn avatar ulasbayraktar avatar jtylr avatar tars-c avatar rsetiawan7 avatar 0xqwertyy avatar zbyss avatar leonardssh avatar dentis-t avatar mergevos avatar skuzzis avatar gitsoms avatar cnrxomox avatar coool9 avatar dobbysgamertag avatar sanityzeropercent avatar artdsl avatar y-less avatar barathsku avatar bronzal avatar abhaysv avatar woutprovost avatar alilogic avatar codezulan avatar phoenixx14 avatar

Stargazers

SwitchDeveloper avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.