NodeJSis used for building Backend part of this Website.MongoDBused for Database to store data.ExpressJSis used as Backend Framework.Materialize-CSSis used for CSS Framework and the website is Responsive for all Devices.ChartJSis used for Charting the responses and Data.
PassportJSis used for Authentication purpose.- Two types of Strategy is used in this Website. (viz. [Local Strategy] and [Google oAuth Strategy]).
- User can Register via
Googleor by submittingEmailandPasswordas Standard Login.
- Only logged in user can create a Survey.
- Completely newly created
Surveywill have no question on it initially - Only Survey owner can added question to Survey.
- Only survey owner can view the analysis of his survey.
- Only those surveys show on
Public Surveyssection which has atleastonequestion. - In
My Surveyssection an user can view all of his surveys. - There have total 7 types of feedback Question (eg. Multiple Choice, Yes/No, slider, Select Many, Like-Dislike, Emoji Feedback, Star Rating etc. and also has a
Comment Boxfeature.) - In User
Dashboard, an user canDelete,UpdateandAdd Questionto a Survey.
ChartJSis used for charting the Data got from Responses of a Survey.- Two types of Chart is used. One is
Bar Chartand another isDoughtnut. - Easily Understandable to all users.
- Encrypt passwords with
bcrypt - Prevent cross site scripting -
XSSusingxss-clean. - Prevent NoSQL injections using
express-mongo-sanitize. - Add a rate limit for requests of 50 requests per 10 minutes using
express-rate-limit. - Protect against http param polution using
hpp. - Add headers for security using
helmet. - Use
CORSto make API public.
- Prerequisites
- NodeJS installed on your machine
- MongoDB installed on your local machine or have an Atlas Account.
- Google API keys for Google OAuth-Authentication
- Credentials Setup
- Project Setup
- Clone this Repository or Download the zip File.
>> git clone https://github.com/nil1729/poll-app - Create a new file named
default.jsononconfigdirectory. - In
default.jsonfile put all secret Credentials. (In following Format){ "sessionSecret": "<Session Secret for Passport Authentication>", "mongoURI": "<MongoDB Atlas URI or Local MongoDB URI>", "googleClientSecret": "<Google Client Secret>", "googleClientID": "<Google Client ID>", }
- Clone this Repository or Download the zip File.
Made With ❤ by Nilanjan Deb







