Skip to content

A beginner friendly project which aims to reduce the domestic electricity usage. The project is currently incomplete and open for contributions.

oss2019/prevelec

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prevelec

forthebadge forthebadge forthebadge forthebadge

  • This website aims to reduce the amount of electricity used by people in their daily lives by providing them a report on their usage and providing bonusses on consuming lesser energy.

Instructions for execution of the code

Software to be installed beforehand:

  1. NodeJs

Steps to be performed:

  1. Go to MongoDB Atlas and log in. Then, create a cluster and connect it. An url will be provided by MongoDB. Save it somewhere as we will need it shortly.
  2. Create a .env file in the project directory and name it ".env". Paste the following code in it.
        DB_URL='XXXXXXXXXXXXXXX'
        JWT_SECRET='secret'
    
  3. Replace the XXXXXXXXXXXXXXX in DB_URL with the link obtained in step 1. Now, follow the below steps to run it.

Running the application:

The website server is initiated by -
npm i
npm run start
~command on git bash.

About the website

  • You are first asked to log in to your account.
  • If you don't have an account, click on register and make one. Otherwise, log in with your credentials (Username is your email id).
  • Once logged in, you are navigated to the dashboard. The dashboard contains a graph of the energy used by the user in the year (sampled on a monthly basis).
  • The dashboard also contains a leaderboard of registered users and their energy consumption.
  • Blog: The blog is for sharing posts and can be accessed through the navbar on the top. Posts may be composed using the compose link in navbar.
  • Home: An introductory page that contains information about the website.
  • Achievements: Lists the badges obtained by the user by fulfilling the energy conservation criterias.
  • Signout: Signs a user out of the active session.

Note

The website is currently incomplete and has a lot of oppurtuinities for contribution and you may use this project to get started with open source contributions as such.

The issues listed below are provided along with their difficulty levels so you may pick them accordingly.

How to contribute

  • Create an Issue and wait for being assigned to it. (I shall be assigning them about twice a day)
  • Fork the repository.
  • Make changes and commits on the forked repository
  • Create a pull request to the master branch of the original repository
  • Valid pull requests will be merged

Enhancements available to do

(difficulty mentioned out of 5 and graded relatively)

  • In dashboard overall rank, rename the heading as leaderboard and pull the list of users from the database. use random values generated by the random function for the number of units used. leaderboard image
  • Add a form page to upload the units used per month in an year. It should have the fields: 'units used' (text) , 'month' (drop down). Upon submitting, the data needs to be persisted to database connected along with a reference field of userId. (This PR will be counted as 2 PRs).
  • Add option to add images in compose page. Make sure the image is visible along with title and post once published in the blog page. (will be counted as 2 PRs)
  • The components in dashboard are shifted to left align. Fix it to make it center aligned.

  • Remake the landing page - it should have the following things (Each of the following count as a separate PR).
    • use particle js to make a jumbotron with heading as PREVELEC and a short description of the website (20-30 words from lorem ipsum).
    • List of contributors to the project (use format as shown below) image
    • Nav bar should have only signin option if user is not signed in.
    • Footer with contact info (phone number, email and github repo would be fine)
  • Making the webpage responsive (one page per PR)(2)
  • Making server side code more modular (separating out the routes and controllers) (counts as 3 PRs).

PS: For the issues that I have opened already, comment in the issue to let me know if you are taking it up. (like by commenting 'I would like to take this up')

For any queries, contact me at 190020009@iitdh.ac.in

About

A beginner friendly project which aims to reduce the domestic electricity usage. The project is currently incomplete and open for contributions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • EJS 86.4%
  • JavaScript 12.0%
  • CSS 1.6%