Spectro is a Discord bot that enables your community members to post anonymous confessions and replies to moderator-configured channels. However, for the sake of moderation, confessions are still logged for later viewing.
Spectro is a standard full-stack SvelteKit web application that leverages PostgreSQL as the database layer.
Spectro requires a PostgreSQL database for data persistence. For convenience, we use Docker Compose to set up a local installation. The following environment variables are required for this to work.
Name | Description |
---|---|
POSTGRES_DATABASE_URL |
The URL connection string for the PostgreSQL development database. |
POSTGRES_PASSWORD |
The password with which to initialize the default postgres user. |
# Download PostgreSQL with Docker (Compose).
# Run and initialize an empty database.
# Requires `POSTGRES_PASSWORD`.
docker compose --profile=dev up --detach
# Run the database migrations.
# Requires `POSTGRES_DATABASE_URL`.
pnpm db:migrate
# Shut down the PostgreSQL server.
docker compose --profile=dev down
Spectro requires some environment variables to run correctly. If the following table is outdated, a canonical list of variables can be found in the src/lib/server/env/*.ts
files.
Name | Description |
---|---|
POSTGRES_DATABASE_URL |
The URL connection string for the PostgreSQL production database. |
DISCORD_APPLICATION_ID |
The publicly known Discord application ID that will be used for the verification of incoming webhooks. |
DISCORD_PUBLIC_KEY |
The public key of the Discord application that will be used for the verification of incoming webhooks. |
DISCORD_BOT_TOKEN |
The secret key of the Discord application that will be used for the verification of OAuth2 client credential flows. |
The following variables are optional in development, but highly recommended in the production environment.
Name | Description |
---|---|
AXIOM_DATASET |
An Axiom dataset to which structured logs will be delivered. |
AXIOM_TOKEN |
The Axiom token used to authenticate with the ingest. |
# Install the dependencies.
pnpm install
# Synchronize auto-generated files from SvelteKit.
pnpm sync
# Start the development server with live reloading + hot module replacement.
pnpm dev
# Compile the production build (i.e., with optimizations).
pnpm build
# Start the production preview server.
pnpm preview
# Check Formatting
pnpm fmt # prettier
# Apply Formatting Auto-fix
pnpm fmt:fix # prettier --write
# Check Linting Rules
pnpm lint:html # linthtml
pnpm lint:css # stylelint
pnpm lint:js # eslint
pnpm lint:svelte # svelte-check
# Check All Lints in Parallel
pnpm lint
The Spectro project is licensed under the GNU Affero General Public License v3.0. However, some files (e.g., brand assets) are exceptions that have been licensed under different terms and limitations. See the COPYING.md
file for more details.
Spectro is dedicated to the hundreds of students at the Department of Computer Science, University of the Philippines - Diliman who rely on anonymous confessions for their daily dose of technical discourse, academic inquiries, heated rants, quick-witted quips, and other social opportunities.
Let Spectro bind the wider computer science community closer together in pursuit of collaboration in the service of our nation.
Spectro is here is for you. 👻
Coded with ❤ by Basti Ortiz. Themes, designs, and branding by Jelly Raborar.