Skip to content

joachimschmidt557/nochfragen

Repository files navigation

nochfragen

A small web app for asking and moderating questions

nochfragen in action

Introduction

Questions can be submitted by any user. Initially, questions are hidden for non-moderators. Moderators can make hidden questions visible and can hide visible questions. In addition, moderators can also delete questions.

Any user can upvote a question, but a session cannot give more than one upvote for a single question.

nochfragen stores questions and surveys in an SQLite database and keeps track of sessions in Redis.

Development

Backend

The backend is implemented in the backend directory.

A recent stable rust toolchain is required. The SQLite (development) library is also required on your system. The exact name of this package varies in every distribution/package ecosystem.

The nochfragen main executable provides the backend API routes under /api/ and also serves frontend content from $ROOT_DIR (defaults to ../build).

cargo run

Frontend

The frontend is written in Svelte and requires the nodejs toolchain.

First, set up an example .env file for the build:

cp .env.example .env

Then, build the static site:

npm i
npm run build

Configuration

nochfragen is configured with environment variables:

Environment variable Default Description
$NOCHFRAGEN_PASSWORD (required) None Moderation password
$OIDC_ISSUER_URL (optional) None URL of OpenID Connect provider
$OIDC_CLIENT_ID (optional) None OpenID Connect client ID
$OIDC_CLIENT_SECRET (optional) None OpenID Connect client secret
$BASE_URL (optional) None Base URL where nochfragen is served at
$LISTEN_ADDRESS 127.0.0.1:8080 Address to listen on
$REDIS_ADDRESS 127.0.0.1:6379 Redis connection address
$DATABASE_URL db.sqlite Path to SQLite database
$ROOT_DIR ../build Path to frontend build

License

nochfragen is licensed under the MIT (Expat) License.

About

Small web app for asking and moderating questions

Resources

Security policy

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages