spectro Svelte Themes

Spectro

A multi-channel confession bot for Discord that supports anonymous replies and channel moderation.

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.

Development

Spectro is a standard full-stack SvelteKit web application that leverages PostgreSQL as the database layer.

Managing the Database

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

Running the Web Server

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

Linting the Codebase

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

Acknowledgements

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.

  • For the selfless student leaders keeping the spirit of the department alive.
  • For the tireless mentors who frequently share their knowledge and gifts to every academic inquiry.
  • For the seasoned veterans and alumni who impart their wisdom about the "real world" out there.
  • For the harshest critics of the department who only strive for the quality of education that we deserve.
  • For the wittiest comedians who brighten up the otherwise dry discourse.
  • For the persevering pupils who exemplify utmost scholarship even in the face of setbacks.
  • For the struggling students who nevertheless keep pushing out of passion for their craft.
  • For the anonymous lurkers who now feel safer and empowered to participate.

Spectro is here is for you. 👻


Coded with ❤ by Basti Ortiz. Themes, designs, and branding by Jelly Raborar.

Top categories

Loading Svelte Themes