Game Instance


Let the games begin

Forking RATTS

Starting your web application

The idea that led to the creation of RATTS was to have a quick & handy, DevOps-ready starter web application based on a Rust + PostgreSQL stack. It was meant for fast-prototyping deployments needing user registration and authentication, yet remaining simple and easily extensible. However, it lacked until now a clear path on how to properly start your project, (re)brand it and continue development while benefiting from regular improvements and security updates.

Repo fetch

The first step is a one-timer and the most important of your fork: cloning the RATTS github repository. Do it in the location of your choosing knowing that a ratts directory will be created inside it.

git clone https://github.com/gameinstance/ratts.git
cd ratts
git remote add upstream https://github.com/gameinstance/ratts.git
Check your remotes:
git remote -v
# You should see something like:

origin    https://github.com/gameinstance/ratts.git (fetch)
origin    https://github.com/gameinstance/ratts.git (push)
upstream  https://github.com/gameinstance/ratts.git (fetch)
upstream  https://github.com/gameinstance/ratts.git (push)

By now you should have a fully deployable RATTS instance. Feel free to test with it before moving on to the next step.

Rebrand

all RATTS entries with your project's name. You may want to capture the before and after git snapshots, in case you ever need to revert to the initial point.

git status
git commit -am "Pre-rename snapshot" # if any changes
git tag PRE-RENAME

find . -type f \
  -not -path "*/.git/*" \
  -exec sed -i 's/ratts/cool_project/g' {} +
find . -type f \
  -not -path "*/.git/*" \
  -exec sed -i 's/RATTS/Cool Project/g' {} +
find . -type f \
  -not -path "*/.git/*" \
  -exec sed -i 's/gameinstance.com/coolproject.org/g' {} +

git add .
git commit -m "Rename project to Cool Project"

Dev cycle

There's consensus about developing new features in dedicated git branches and that's valid here as well. This helps maintaining a clean and stable main branch while simplifying bug tracking and overall project management. In this case, further RATTS security updates and improvements will be easier to deal with.

Feature branch:
git checkout -b feature-branch

You may choose to sever all ties with the remote RATTS repo, for your super-cool and sensitive project. Should you prefer not to, there will be periodic improvements and security releases you can still benefit from. Do check them out and rebase your main branch onto them (or merge them onto yours).

Fetch & merge:
git fetch upstream
git checkout main
git merge upstream/main

Creating a script for this purpose, should you ask, would not benefit anyone. Abstracting git calls that are part of our daily vocabulary brings no extra value at the cost of precious development time. Besides, a textual procedure is transparent/auditable and keeps developers involved in a phase that requires attention.