deshmukhakash55 / poller-backend

This acts as backend for Poller.

Home Page:https://poller-e5529.web.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Poller

image

Poller is MERN stack social media project to start your polls and also respond to some of others polls.

For Demo, please visit:

https://poller-e5529.web.app

Poller uses following tech tack and tools :

Frontend:

  • React
  • Redux
  • Redux Saga
  • React router

Backend

  • Node.js
  • Express
  • Sendgrid - For emails
  • Mongoose - MongoDB ORM
  • Morgan - Reqeust logging
  • socket.io - Notificatons
  • Firebase - file storage
  • MongoDB - Database

Deployment

  • Frontend - Firebase Hosting
  • Backend - Heroku
  • Database - MongoDB Atlas

How to deploy the project.

  • Frontend Since it's just a react project, just follow below steps:
    1. Clone the poller-frontend project.
    2. Open terminal and navigate to the project folder
    3. Execute npm i to download dependencies
    4. Execute npm run build to generate prod build. or
    5. Execute npm start to start local server.
    6. Deploy the build from dist\ folder on your server.

Note - Frontend will rest endpoints which has base url starting with https://poller-backend.herokuapp.com, so in case of your base url varies, make sure you update it in endpoints.js file

  • Database Get the MongoDB URI. Make sure the DB user has proper privileges. Create the Database poller

  • Backend Backend for poller is Node.js. So follow the below steps to execute it

    1. Clone the poller-backend project.
    2. Open the terminal and navigate to the folder.
    3. Execute npm i.
    4. Create a folder named configs.js in project root which exports a object as default.
    5. Create a account on Sendgrid for mailing services and add your API key to the Object. image
    6. Also populate Object with MONGODB uri and other details.
    7. Create a account on firebase (if you don't have one) and then create a new project.
    8. Create a keys folder in project root.
    9. Get the admin key JSON and add it in keys folder.

And you are good to go!!!!

Login Page

image

Register Page

image

Main Page

image

Search

image

Search

image

New Poll

image

Notifications Page

image

Followings Page

image

And if you like the project, make sure you star the project so others can also learn.