Git Product home page Git Product logo

survey-maker's Introduction

A responsive web application built with next-js to let User type A (e.g. teacher/speaker) collect feedback from users of type B (e.g. audience). User type B can share their feedback anonymously in less than 30 seconds.

#Screenshots Group 28

#Style Guide Group 2 (1)

Project Plan

https://docs.google.com/spreadsheets/d/1caZhcuWzN1u0i26zU5BxitP3eqygxm1YQzY7vDRISqs/edit?usp=sharing image

Features

Must-Haves

User A (teacher)

  • Signup / Login
  • Dashboard user/[username]
  • User not Found page
    • Create new Survey (Name, Slug)
      • Add Questions
        • Pick question type (Premium Feature)
        • Customize Question/Answers
      • Edit Questions
      • Delete Questions (also when responses exists) - [ ] Save Survey as Draft - [ ] Publish Survey
    • Get URL onClick
    • View Survey Results (Statistics)
    • Delete Survey (also when questions exists)
  • Logout

User B (audience)

  • Open survey via URL
  • Fill out form
  • Thank you page on Submit

Nice to Haves (work in progress)

User A

  • Redirect on Login (Authentication - User Login - 1:50:00)
  • Reset Password
  • Duplicate Survey
  • Filter results by date (from dd.mm.yy to dd.mm.yy)
  • Create own template
  • Fancy UI for statistics & charts
  • optimize design also for web
  • Edit survey name + URL
  • Cookie & Privacy settings
  • accept terms and conditions
  • double opt in via mail

User B Landingpage elements to interact live with USER A

  • "Let's have a break" - Button
  • Input Field to submit a question/comment
  • Button to Start Survey
  • See survey results after submit
  • optimize design also for web
  • set a cookie to let every user participate only once

Database

  • Define Structure
  • Create a PostgreSQL database and table(s)
  • Connect to and query information from database

image

ENUM question_type { x_slider y_slider gauge binary }

Tests

  • E2E - Cypress (in progress)
  • Unit Tests - Jest (in progress)

TypeScript / JSDoc

  • for all major components

Deploying

Group 29

Technologies used

  • Next.js
  • Postgres.js
  • Jest
  • Cypress.io
  • GitHub Actions

Libraries used

  • emotion/core
  • nextcookies
  • camelcase-keys
  • ley
  • dotenv
  • recharts

Setup Instructions

Database Setup

Install postgres on your machine: https://www.postgresql.org/

Start postgres

postgres

Login with super-User on Windows: psql -U postgres postgres on mMac: psql postgres

Setup new user and new database

CREATE DATABASE <database name>;
CREATE USER <user name> WITH ENCRYPTED PASSWORD '<user password>';
GRANT ALL PRIVILEGES ON DATABASE <database name> TO <user name>;

Connect to the database using new user

quit psql \q and reconnect with newly created user psql -U <user name> <database name>;

Rename example.env to .env and insert your data

\_PGHOST=<localhost>
\_PGDATABASE=<database_name>
\_PGUSER=<user_name>
\_PGPASSWORD=<password>
\_CSRF_TOKEN_SECRET=<secret_token>

Add .env to .gitignore!

Migrations

Running the migrations To set up the structure and the content of the database, run the migrations using Ley:

yarn migrate up To reverse the last single migration, run:

yarn migrate down

Start Server

_npm run dev_

or

_yarn dev_

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

Deployment instructions

Deploy on Heroku https://dashboard.heroku.com/

  • create a new app
  • Connect to your Github Repo
  • Install the Heroku Postres Add-on
  • Deploy

Tests

Jest

_yarn jest_

Cypress

yarn cypress start

survey-maker's People

Contributors

judithkuneth avatar nabil6391 avatar karlhorky avatar

Stargazers

Ilyas LEFEBVRE avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.