- Install either MySQL or MariaDB on your system.
- Execute the InitializeDatabase.txt script therein.
- Create a user named 'localuser' with the password 'local', or set the DBUSER and DBPASS environment variables if you want to use a different database user.
- Register a Discord or Google app with OAuth 2.0 client credentials. (Facebook is also supported, but it's commented out in index.html because they require you to be an actual business.)
- Configure the appropriate local callback URL in that app, such as
http://localhost:3005/towngardia/auth/google/callback
. - Set TOWNGARDIA_DISCORD_ID and TOWNGARDIA_DISCORD_SECRET, TOWNGARDIA_GOOGLE_ID and TOWNGARDIA_GOOGLE_SECRET, or TOWNGARDIA_FACEBOOK_ID and TOWNGARDIA_FACEBOOK_SECRET accordingly.
- Run
npm install
in the repository root directory. - Run via
npm run build
andnpm run start
from the repository root directory. - Navigate to
http://localhost:3005/towngardia/
in your browser. - Log in.
- Execute openssl req -nodes -new -x509 -keyout private-key.pem -out certificate.pem -days 365 -subj "/C=US/ST=CA/L=Chicago/O=Towngardia/OU=IT/CN=localhost"
- Set the VAPID_PUBLIC_KEY and VAPID_PRIVATE_KEY environment variables to the public and private keys generated by the previous command.
I generated a Dockerfile but never tried using it.
If you modify the list of building types, resource types, achievement types, etc., or the shared/server code, such as Serialization.ts
, the server needs to be restarted. Otherwise, you can generally get away with only updating bundle.js
via npm run build
.
Probably around 40% of the code was generated by Claude 3.5 Sonnet and GitHub Copilot. All the images were generated by Flux.1 dev without LoRAs (though I had to use ControlNet Depth for Altitect rooms).