Challenge Overview

App environment:
- REST API application based on Java 8, Maven, and MS SQL.
- AWS SDK for Amazon Simple Email Service

Basic requirements for this challenge:
- Improve Java Services with AWS Amazon Simple Email Service best practice implementations.
- Improve Java Services and AWS SES usage to send email notifications with proper HTML email formats

Project Background
The goal of this project is to create a web based tool for operators to share frac schedules and locations with other operators. Currently we have a consortium of 15 operators that share their schedules via email roughly once a week to monthly. The email list changes monthly with people being added or taken off, which makes it tough to manage if you are getting all the schedules you need. Not only does the email list change, but so does each individual company’s frac schedule. With so many moving parts, manually sharing emails and aggregating schedules is unsustainable. These emails contain API # (unique public well identifier), well name, Frac start, Frac end, Bottom Hole Lat/Long, Surf Hole Lat/Long, and sometimes the underground formation name.  

In the current state, we go into our internal mapping tool or the State website and manually measure out the distances between our well locations and the offset operators locations to see if we need to prepare our wells.  From this frac schedule, it us up to the individual companies to check in to see if offset fracs are on time or delayed and if the operator will impact any of their assets. This methodology is cumbersome and time consuming. A tool should be easily accessible, be able to quickly upload operator information and provide a visual and user adjustable display of areas and times where frac operations may cause operational hazards due to “frac hits” http://www.eagleford.training/2015/08/what-are-frac-hits/

For this challenge, we need improve existing REST API services to send emails with proper configuration and email formats specifically with Amazon Simple Email Service. You might need include the Amazon SES SDK usage, read documentation here: https://docs.aws.amazon.com/ses/latest/DeveloperGuide/Welcome.html

Technology Stack
Programming language(s) to be used:
- Java 8
- Maven
- AWS SES SDK

Deployment environment requirements
- localhost
- AWS

Database
- MS SQL Server

Code access

Email HTML Prototype: https://drive.google.com/open?id=18XHRqOJ1iSxH3TU1B1ciWoeo-0a95T5a
Check email-prototype.zip for email design prototype

AngularApp Source Code
https://gitlab.com/quartz-energy/ops-frac-schedule/web-application
Application support 3 roles, make sure your updates affect all roles
systemadmin/password
operatoradmin/password
operator/password

Java REST API Source Code
https://gitlab.com/quartz-energy/ops-frac-schedule/java-services

Postman Collection for API endpoints Testing
https://gitlab.com/quartz-energy/ops-frac-schedule/java-services/tree/dev/docs

General Requirements and Current Application Problems
- Current Java services supported Email sending to verified email only via Amazon Simple Email Services
- For this challenge we need leverage and optimize the usage of Amazon Simple Email Services on development and production environments
- Read some documentation of Amazon SES here before you do the updates
https://docs.aws.amazon.com/ses/latest/DeveloperGuide/quick-start.html
https://docs.aws.amazon.com/ses/latest/DeveloperGuide/using-the-api.html
https://docs.aws.amazon.com/ses/latest/DeveloperGuide/samplecodeindex.html
- Some problems we need get solution from this challenge are listed below:
-- Right now, we need add user manually to Amazon SES Email address or domain. We need fix that, so after user register OR when system admin add new user on the app, need able to auto-add that user email address to Amazon SES email list, and then send verification email. If possible need add user without verification. You might need use AWS SDK and Shared Credentials
-- Use different email templates for some individual templates below. Sending email need able to capture HTML, CSS look and feel.
-- From those HTML email templates, create some message template variables.
-- We need create 1 email address that will able to receive any email. The How to set-up for this Amazon SES?
-- How to check all emails logging history?
- Any configurations need store on env.sh with dynamic variable on instance?
- As part of this challenge submissions you need created detailed documentation of your solution for development and production environments. Listed all informations about any things we need aware.

Individual Requirements
Check email-prototype folder. These are some different HTML Email templates need used on different situations:

1). Auto-generated password after user do self registrations
Frontend Demo: http://ec2-18-207-109-34.compute-1.amazonaws.com/login
- We need send Auto-generated password
- Need clearly view the password

2). When manual/batch upload done
Frontend Demo: http://ec2-18-207-109-34.compute-1.amazonaws.com/upload-data
- User see this after batch upload done

3). Forgot password
Frontend Demo: http://ec2-18-207-109-34.compute-1.amazonaws.com/password-reset  
- After flow on Forgot password, user will received email to help them get the new generated password

4). Forgot username
Frontend Demo: http://ec2-18-207-109-34.compute-1.amazonaws.com/password-reset
- After flow on Forgot username, user will received email to help them get the their password

5). Account locked
Frontend Demo: http://ec2-18-207-109-34.compute-1.amazonaws.com/login
- Need send email to System Admin and Operator Admin tied with this user company to notice the account locked.
- Need send email to user inform that their account locked.

6). Account unlocked
Frontend Demo: http://ec2-18-207-109-34.compute-1.amazonaws.com/users-management
- Need send email the related user that their account already unlocked.

Final Submission Guidelines

What To Submit?
- Submit git patch based current repo on dev branch: https://gitlab.com/quartz-energy/ops-frac-schedule/java-services  
- README in markup language
- Challenge winner need send Merge Request to our repo.

ELIGIBLE EVENTS:

Topcoder Open 2019

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30067595