Skip to content
Projekte

Über uns

All contributors welcome! Successor to EpicMafia

Web- und App-Entwicklung

So werden diese Zahlen gemessen

Gemessener Sternzuwachs

in 24h
0
in 7 days
0
in 15 days
+1
in 1 month
Verlauf wird gesammelt

Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.

README.md

Original

UltiMafia

This is the source code powering UltiMafia.com, a website built to provide online chat mafia to all.

Table of Contents

WIP

Setup

It is recommended to set some kind of alias to shorten your docker compose commands, like so:

alias d="docker compose -f docker-compose-core.yml -f docker-compose-dev.yml"

# From here

New contributors:

If you have any questions or concerns please feel free to ask in our Discord server.

Prerequisites

Before building your developer environment locally, you will need the following set up:

Install and Build

For a full walkthrough aimed at beginners, use the Local Setup Guide.

For an automated script (Mac/Linux / Codespaces), use the totalsetup.sh script in the root project directory:

$ bash totalsetup.sh

If you want to perform your setup manually, follow these setups:

  1. Load the default development environment ENV files

    $ cp ./docs/client_env ./react_main/.env
    $ cp ./docs/server_env ./.env
    
  2. Install NVM, node, npm, and backend dependencies

    $ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
    $ source ~/nvm/nvm.sh
    $ nvm install 22.17.0
    $ nvm use 22.17.0
    $ nvm alias default 22.17.0
    $ npm install
    
  3. Download front-end dependencies and build

    $ cd react_main
    $ npm install
    $ bash build.sh
    $ cd ..
    
  4. Build and deploy the containers using the dev docker compose

    $ docker compose -f docker-compose-core.yml -f docker-compose-dev.yml up -d
    

    Use docker compose -f docker-compose-core.yml -f docker-compose-dev.yml build if you wish to build without running.

There is a clean-up script you can run from the root project directory to remove this checkout's build output (node_modules, react_main/node_modules, react_main/build_public):

$ bash cleanup.sh --dry-run   # show what would be deleted
$ bash cleanup.sh             # confirm, then delete

It is scoped to this directory: it does not stop containers, remove images, or touch Docker volumes or the tracked package-lock.json files. If you also want to clear Docker's own leftovers, bash cleanup.sh --docker-garbage removes dangling images and unused anonymous volumes only — named volumes such as ultimafia_mongodb are never candidates.

NOTE: do NOT use sudo when running any scripts or commands unless you are sure you know what you're doing. Running sudo is linked to many issues including permission problems.

Running and Stopping

Prefer Docker Compose as described in the Local Setup Guide:

docker compose -f docker-compose-core.yml -f docker-compose-dev.yml up -d

The site will be accessible at http://localhost:3001. Use localhost (not 127.0.0.1) so Firebase Auth works. First-time login: http://localhost:3001/auth/login.

If you ran totalsetup.sh, the project may already be running. To stop Compose:

docker compose -f docker-compose-core.yml -f docker-compose-dev.yml down

Troubleshooting

1. Site Does Not Load

If you are able to briefly see a loading graphic when attempting to enter the site before a blank screen, it is most likely due to a bug for the dev environment in which the launch screen will not load unless you are logged in.

To fix this:

  1. Go to http://localhost:3001/auth/login
  2. Sign-up with a new account. If you have already created an account in the past for your local build, you may use the same one to login instead.

Once you log in, you should be redirected to the lobby page and the site should function properly.

More local troubleshooting is in the Local Setup Guide.

Contributing

  1. Fork the repository
  2. Make your changes to your forked repository
  3. Open a pull request on the master branch of this repository
  4. Perform a final test on the main site after merge into master

Running the site on codespaces

If you are a beginner, please follow the easy setup guide and ask in Discord if you are stuck at any step.

Role and game creation

This site is based on the code provided by r3ndd from this repository and is used under the Creative Commons license (Attribution-NonCommercial-ShareAlike 4.0 International). It has been changed and is not affiliated with the creator or the website that uses the original repository's code.

Additional Credits

Music is by Fred, check out his youtube @fredthemontymole

Sign in with Apple notifications

Apple sends account events to POST /api/auth/apple/notifications (set this URL under the App ID's Sign in with Apple configuration in the Apple Developer portal). The signed payload is checked against Apple's keys, iss, exp, and APPLE_SIWA_AUDIENCE (see docs/server_env).

  • email-enabled / email-disabled: stores appleEmailForwarding on the user.
  • consent-revoked: revokes Firebase refresh tokens, clears site sessions, sets appleConsentRevoked.
  • account-delete: same as above, sets appleAccountDeleted and logs for moderator follow-up. No data is deleted.

Apple does not send password or Apple ID email changes.

Ähnliche Projekte entdecken

Wird geladen…