Reference no: EM133296964
iGSE - An Energy Tool
Learning outcome 1: Use appropriate server-side and client-side scripting languages to create a web application
Learning outcome 2: Solve security and session handling issues and use supporting techniques
Coursework Description
The Valley of Shangri-La is experiencing an unprecedented energy crisis due to the recent disruption to gas supplies. As a result, the government launched a public consultation on how to help its residents manage their fuel bills and keep warm as it gets closer to its winter season. The residents of Shangri-La voted overwhelmingly to support the Energy Bills Support Scheme, and the creation of GSE (Great Shangri-La Energy), a publicly-own energy company committed to providing affordable and sustainable energy supplies to Shangri-La.
Requirements
Your task is to develop a web interface for an energy tool, iGSE, to provide Shangri-La residents with a platform to submit regular meter readings and view their bills online, and pay the bills using energy vouchers provided by the government. iGSE may be implemented as a Web Application, a Native Android/iOS app, or a Hybrid app.
In addition, GSE plans to provide open access to energy consumption data and statistics via its platform. Your second task is to develop a REST API to allow the general public to search energy consumption data.
Task 1 - Web/App GUI
There are two types of accounts in iGSE: (1) Customer account and (2) GSE Admin account.
Customer account: a customer must register first to be able to use the customer dashboard. A new customer will need to provide the detail as follows to complete the registration.
• Customer ID (email address)
• Password
• Address
• Property type (detached, semi-detached, terraced, flat, cottage, bungalow and mansion)
• Number of bedrooms (integer)
• One valid 8-digit Energy voucher code (EVC)
As part of Shangri-La's Energy Bills Support Scheme, the government gives away free energy vouchers worth £200 each to all eligible households. Every energy voucher has a unique 8-digit EVC (Energy Voucher Code). Also, a QR code is printed on the voucher [See Appendix (3) for examples of all valid vouchers]. A customer must either scan the QR code or manually enter a valid EVC to complete the registration. A newly created customer account is pre-loaded with £200 energy credit.
Functional requirements (Customer):
1. A customer can submit new meter readings, which consists of four parts:
a. Submission date (e.g. 2022-11-05, default value: today)
b. Electricity meter reading - Day (e.g. 100 kWh)
c. Electricity meter reading - Night (e.g. 250 kWh)
d. Gas meter reading (e.g. 800 kWh 1)
2. A customer can view and pay the latest unpaid bill with energy credit*.
3. A customer can top up the credit with a valid EVC*.
* See Appendix (2) for more information on how to calculate energy bills; See Appendix (3) for a list of valid EVC and its QR codes.
iGSE admin account: there is only one pre-defined GSE admin account, which has a login name "[email protected]" and a default password "gse@energy". Bear in mind that any passwords must be
Functional requirements (Admin):
1. Admin can set the price per kWh (or unit cost) for the electricity (day/night) and gas.
2. Admin can access meter readings submitted by all customers.
3. Admin can view the energy statistics- show the average gas and electricity consumption (in kWh) per day for all customers based on their latest billing period.
Error handling
The system should display meaningful error messages (using error pages or ajax message). For example:
• Invalid EVC code during the registration or top-up (a voucher code is unique and can only be used once per customer.)
• Invalid customer ID or password.
• Another customer has already used the provided EVC or already scanned the QR code.
• The provided email is already associated with an existing customer.
• The new meter reading is less than a previous reading.
Task 2 REST Service interface
Your second task is to implement "iGES Open Data REST API" according to the specification below:
Get the number of properties by property type: HTTP request:
JSON Response:
1 Assume measurement unit for gas is kWh not M3 (cubic meter)
Get energy usage statistics for a specific property type and the number of bedroom.
e.g. Get energy usage statistics for all 3 bedroom semi-detached houses HTTP request:
JSON Response:
Marks breakdown
(1) Customer registration (for resident users), log-in/sign-out. [30 marks]
(2) Customer Dashboard: submit readings, pay bills, credit top-up. [20 marks]
(3) iGSE admin Dashboard: unit price setting, view bills and statistics. [30 marks]
(4) REST API [20 marks]
Note that
• Your solutions to (1)(2)(3) can either be a web application or a native mobile app or hybrid app (Android or iOS); for (4), you are allowed to use any languages or frameworks. See Appendix 1 for more detail.
• Use appropriate techniques to remember the last Customer ID (e.g., Cookies / Shared Preferences)
Feel free to use Shangri-La.sql provided on Blackboard for this coursework, and you are free to may any changes you deem necessary. You do NOT have to use it if you intend to use NoSQL (e.g. Mongodb, Firebase etc.) or other data persistence frameworks (e.g. Spring JPA). If you intended to use departmental MySQL server (mysql.mcscw3.le.ac.uk) for this coursework, please make sure you tested the connection string before the submission.