Skip to content

Fully playable online social (slow-paced) city builder with minigames

License

Notifications You must be signed in to change notification settings

dpmm99/Towngardia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup

  1. Install either MySQL or MariaDB on your system.
  2. Execute the InitializeDatabase.txt script therein.
  3. 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.
  4. 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.)
  5. Configure the appropriate local callback URL in that app, such as http://localhost:3005/towngardia/auth/google/callback.
  6. Set TOWNGARDIA_DISCORD_ID and TOWNGARDIA_DISCORD_SECRET, TOWNGARDIA_GOOGLE_ID and TOWNGARDIA_GOOGLE_SECRET, or TOWNGARDIA_FACEBOOK_ID and TOWNGARDIA_FACEBOOK_SECRET accordingly.
  7. Run npm install in the repository root directory.
  8. Run via npm run build and npm run start from the repository root directory.
  9. Navigate to http://localhost:3005/towngardia/ in your browser.
  10. Log in.

Optional setup (to allow push notifications)

  1. 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"
  2. Set the VAPID_PUBLIC_KEY and VAPID_PRIVATE_KEY environment variables to the public and private keys generated by the previous command.

Notes

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).

About

Fully playable online social (slow-paced) city builder with minigames

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages