anket Svelte Themes

Anket

Svelte and Sveltekit application for lecturers to get survey feedback from their students.

Example JSON files are provided in the src directory for survey data. Technically you can name the question objects (zero level deep keys) anything, but naming them serially like "question1, question2 ..." is recommended for consistency.

Pre-requisites

  • Node.JS
  • PostgreSQL

Initialization

  1. You must initialize a PostgreSQL database with the contents of src/initialize_db.sql first.

You should also create a cron job on your system to clear expired sessions for safety and performance reasons. Look up pg_cron.

Example:

DELETE FROM session WHERE expires_at <= (SELECT floor(extract(epoch from now() at time zone 'utc')) as now)
  1. Rename .env.example to .env and fill its contents with your database and host server info.

  2. npm i

  3. Create an academician user by running node create_academician.cjs.

Installation

npm run build
node -r dotenv/config build 
# or `node --env-file=.env build` for v20.6+

Top categories

Loading Svelte Themes