Skip to content

Zangetsu101/question-bank

Repository files navigation

Getting Started

  1. clone the repo
  2. install bun
  3. run bun install to install all the dependencies
  4. then run bun vercel link to link to a vercel project

This app uses vercel postgres so you need add a postgres storage to the vercel project.

  1. use bun vercel env pull .env.development.local to pull the environment variables for local development
  2. run bun db:push to sync the local db/schema with your remote db
  3. finally run bun dev to start the local development server

Open http://localhost:3000 with your browser to see the result.

Question Bank

This is platform where the user can submit questions which goes through an approval process before getting added to the question bank

Features

Questions have 2 statuses, in-review & accepted. When the user first submits a question it gets in-review status. When the question gets approved then it receives an accepted status.

  • Create questions: User's are able to submit their questions. Each question requires has the following fields:
    • Title: The title of the question
    • Difficulty: Easy/Medium/Hard
    • Tags: Related tags for the question which can then be used for filtering in the question bank
    • Question: The actual question. The question should be supplied in the markdown format as it covers most if not all of the things that one would want to add in a question e.g. tables, figures (using mermaid) etc.
  • My questions: A list all the user's question, both in-review & accepted ones.
  • Review questions: Reviewers can give feedback on the questions as comments.
  • Timeline: The full timeline of the question (comments, approvals) are shown along with the question when reviewing or when updating the question
  • Update questions: Based on the given feedback, the submitter of the question can update his/her question
  • Edit history: The full edit history of the question is available although it's not shown in the UI currently.
  • Approval: A question requires a set amount of approvals before it can be added to the question bank. It requires the following amount of approvals depending on the set difficulty of the question
    • Easy: 1
    • Medium: 1
    • Hard: 2
  • Question Bank: After a question has been given the set amount of approvals, it will get the accepted status and become available in the question bank. Currently the questions can be filtered using thier tags

TODO

  • Access control
  • Markdown preview
  • More filtering options(e.g. by title, question body etc.)
  • Randomized question set generation
  • UX review