This is the repository for the frontend of StudyInc, an unblocked game site I've been making. It is purposefully designed such that the code is inconspicuous to any AI model looking at the source code of the site.
This repository does not include several elements, including:
- The games themselves
- The online user tracker / statistics endpoint (available here)
- The AI ("calculator") endpoint (available here)
- The accounts backend (available here)
- The savedata endpoint (available here)
- The site chat (available here)
This guide will show you how to set up the entire site on your own server.
- Clone this repository
- Install pnpm (assuming you have npm, you can install it with
npm i -g pnpm) - Modify the commands
deployanddeploy-testin the filepackage.jsonsuch that it deploys to whatever your server IP is rather than "doofus" - Run
pnpm i
- Create the directory
/opt/studyinc - Ensure rsync is installed
- LOCALLY, run
pnpm run deploy, which will build the site and copy it to the server using rsync - Run
sudo apt install caddy goandgo install github.com/caddyserver/xcaddy/cmd/xcaddy@latest - Custom-build Caddy with
xcaddy build --with github.com/caddyserver/replace-response, then copy the outputted file to /usr/bin. You will also need to rebuild whenever Caddy updates or it'll error out and the site will break - Copy the Caddyfile in the "installation" folder in this repo to /etc/caddy
- Reload caddy
The site should now technically "work", but it won't have any games or anything.
- Create the directories
/opt/studyinc/games/reposand/opt/studyinc/games/res/thumbs. The repos folder will have the games themselves (cloned Git repos for better version control) and the res folder will have ID symlinks as well as the master index.json and images. - Clone your game to
/opt/studyinc/games/repos/[name-of-game] - Create a symlink to the game with a numeric ID with
ln -s /opt/studyinc/games/repos/[name-of-game] /opt/studyinc/games/res/[id] - Add your game to index.json. You need to encrypt the title using the enc.py program and, if you want to, put a fake title like "rawTitle," which can trick AI models into not thinking it's necessary to decode the title. An example index.json is also in the "installation" folder in this repo. Some games will look weird unless you specify an aspect ratio, though typically you don't need to specify one.
- Add a 3:4 vertical thumbnail for the game at
/opt/studyinc/games/repos/thumbs/[id]/vert.jpg. You can easily find vertical thumbnails at SteamGridDB, or just make them yourself if they don't have one
Simplest thing, literally just make a file at /opt/studyinc/api/motd/index.html and write whatever message you want