arimelody-web/README.md

48 lines
1.9 KiB
Markdown
Raw Permalink Normal View History

# ari melody website
2024-09-04 17:18:56 +01:00
home to your local SPACEGIRL! 💫
---
a slightly-overcomplicated webserver built to show off everything i've worked
on, and then some! this server comes complete with twitch live status tracking,
a portfolio database, and a full-fledged admin CMS panel to manage it all!
2024-09-04 17:18:56 +01:00
## build
2024-11-10 05:34:04 +00:00
- `git clone` this repo, and `cd` into it.
- `go build -o arimelody-web .`
2024-09-04 17:18:56 +01:00
## running
2024-11-10 05:34:04 +00:00
the server should be run once to generate a default `config.toml` file.
configure as needed. a valid DB connection is required to run this website.
if no admin users exist, an invite code will be provided. invite codes are
the only way to create admin accounts at this time.
2024-09-04 17:18:56 +01:00
2024-11-10 05:34:04 +00:00
the configuration may be overridden using environment variables in the format
2024-11-10 05:49:00 +00:00
`ARIMELODY_<SECTION_NAME>_<KEY_NAME>`. for example, `db.host` in the config may
be overridden with `ARIMELODY_DB_HOST`.
2024-09-04 17:18:56 +01:00
2024-11-10 05:34:04 +00:00
the location of the configuration file can also be overridden with
`ARIMELODY_CONFIG`.
2024-09-04 17:18:56 +01:00
2025-01-21 01:03:25 +00:00
### command arguments
by default, `arimelody-web` will spin up a web server as usual. instead,
arguments may be supplied to run administrative actions. the web server doesn't
need to be up for this, making this ideal for some offline maintenance.
2025-01-21 01:03:25 +00:00
- `createTOTP <username> <name>`: Creates a timed one-time passcode method.
- `listTOTP <username>`: Lists an account's TOTP methods.
- `deleteTOTP <username> <name>`: Deletes an account's TOTP method.
- `testTOTP <username> <name>`: Generates the code for an account's TOTP method.
2025-01-27 19:57:46 +00:00
- `cleanTOTP`: Cleans up unconfirmed (dangling) TOTP methods.
- `createInvite`: Creates an invite code to register new accounts.
- `purgeInvites`: Deletes all available invite codes.
2025-01-20 19:11:16 +00:00
- `listAccounts`: Lists all active accounts.
- `deleteAccount <username>`: Deletes an account with a given `username`.
2025-04-29 23:22:48 +01:00
- `lockAccount <username>`: Locks the account under `username`.
- `unlockAccount <username>`: Unlocks the account under `username`.
- `logs`: Shows system logs.