Here is a link to the app presentation: https://view.genial.ly/61bb884656c96a0dce09a67c/presentation-ecowhat
This project was created as part of the Bright Network Technology Academy bootcamp. It features a React front end and Spring Boot back end connected to a PostgreSQL database. We also use open APIs in the front and back end to collate information on Members of Parliament and their voting history on the environment. Our database stores user information and comments, as well as environmental and geographic data, which our API allows us to use in the front end.
- Encrypted passwords for secure user login
- Find your constituency through our postcode search or interactive map that redirects you to the matching constituency page
- Comments for logged in users, which can be upvoted or downvoted and are censored for inappropriate language
- Declarative component routing using React Router to create several 'pages'
- Up-to-date data from the government's MP and votes APIs
- Tweet or email your MP from their constituency page
Then, create a local PostgreSQL database called ecowhat. You will need to update the application.properties file in the server side of the repository, changing the username and password to your Psql username and password. This file can be found in the /server/proj/proj/src/main/resources folder. You may also need to connect the Spring application to your local ecowhat database.
After this, you should be able to run the Spring application by running the main method in the ProjApplication.java file, which can found in the /server/proj/proj/src/main/java/com/capston/proj folder. Or, you may be able to run the project as a whole from your IDE. It may take a few seconds for the application to fully start up.
To set up the React portion of the application, navigate to the client/my-app directory and run $ npm install
to install all the required dependencies. Then, use $ npm start
to start the application, on port 3000 by default. This will automatically open the website or you can go to http://localhost:3000/ to access it.
As a logged in user, you can then access all the features of the website. The extra functionality for logged in users includes the ability to leave coments and a Profile page which shows you your details and comment history.
The About page provide information on the background of the project, and the What You Can Do page provides resources for offline actions that individuals can take to help protect the environment.
Most of the content is on the constituency pages, which can be accessed either by selecting a consituency through the map, or submitting a postcode through the search bar. Users can then toggle a list of of climate related votes the MP for that constituency has taken, as well as send them a tweet or email asking them to do more for the environment.
Each constituency has a comments section, where logged in users can post comments and upvote or downvote them.
- Helena
- Chaam
- Vinh
- Jonathan
- Tamara