Using the web app is fairly self explanatory. Fill in the required fields and drop downs to create a new Feature Request. Press the "Submit" button to create the feature request. There is a table at the bottom to show existing Feature Requests (for the currently selected client). There is some basic validation on the inputs - making sure something was provided for the title and description, and that the date field contains a date.
This app is designed to be used in AWS, with Elastic Beanstalk. It utilizes a requirements.txt file to ensure that all dependencies are being met in the environment, and utilizes several JavaScript libraries, such as jQuery and KnockoutJS. Bootstrap is used for formatting.
To set it up:
- Download a copy of this code as a ZIP file.
- Sign into the AWS management console.
- Search for Elastic Beanstalk
- Create a new application, named "Feature Request - WCF", with an optional description.
- Create a new environment. There is a shortcut that reads "Create one now" in the middle of the page.
- Choose "Web server environment"
- Choose a name for the environment, and a domain name; enter them in
- For Platform, choose "Preconfigured platform" and select Python from the drop down
- For Application code, choose Upload your code
- Select the ZIP file downloaded before, and upload it.
- Press the "Create Environment" button
- Wait for the environment creation to complete.
- Add a database to the environment, by clicking on "Configuration" on the left
- Find the "Database" section and select "modify"
- Select "mysql" for the Engine.
- Enter a username and password
- Press "apply"
- Wait for the DB to finish being created.
- Edit the configuration to look for app.py, by clicking on "Configuration" on the left
- In the "Software" section, click "Modify"
- Change the WSGIPath to app.py
- Press "Apply" along the bottom.
- When the environment has finished updating, the Feature Request app should be running properly.
After the app is running, you should be able to load the URL, and be taken to the main page.
Also included are several API endpoints; specifically:
GET endpoints
/api/v1/Client
This endpoint returns a JSON list of Clients from the database.
/api/v1/Area
This endpoint returns a JSON list of Areas from the database.
/api/v1/FeatureRequest
This endpoint returns a JSON list of all submitted Feature Requests.
/api/v1/FeatureRequest/Client/<id>
This endpoint returns a JSON list of submitted Feature Requests for the provided Client ID.
POST endpoints
/api/v1/FeatureRequest
This endpoint adds a new FeatureRequest to the database. The body of the POST should contain a valid JSON FeatureRequest. The endpoint will return a 200 with blank text on success.
/api/v1//api/v1/FeatureRequest/<id>
This endpoint updates the FeatureRequest with the provided ID. The body of the POST should contain a valid JSON FeatureRequest. The endpoint will return a 200 with blank text on success.