Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .glitch-assets
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{"name":"drag-in-files.svg","date":"2016-10-22T16:17:49.954Z","url":"https://cdn.hyperdev.com/drag-in-files.svg","type":"image/svg","size":7646,"imageWidth":276,"imageHeight":276,"thumbnail":"https://cdn.hyperdev.com/drag-in-files.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(102, 153, 205)","uuid":"adSBq97hhhpFNUna"}
{"name":"click-me.svg","date":"2016-10-23T16:17:49.954Z","url":"https://cdn.hyperdev.com/click-me.svg","type":"image/svg","size":7116,"imageWidth":276,"imageHeight":276,"thumbnail":"https://cdn.hyperdev.com/click-me.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(243, 185, 186)","uuid":"adSBq97hhhpFNUnb"}
{"name":"paste-me.svg","date":"2016-10-24T16:17:49.954Z","url":"https://cdn.hyperdev.com/paste-me.svg","type":"image/svg","size":7242,"imageWidth":276,"imageHeight":276,"thumbnail":"https://cdn.hyperdev.com/paste-me.svg","thumbnailWidth":276,"thumbnailHeight":276,"dominantColor":"rgb(42, 179, 185)","uuid":"adSBq97hhhpFNUnc"}
{"uuid":"adSBq97hhhpFNUna","deleted":true}
{"uuid":"adSBq97hhhpFNUnb","deleted":true}
{"uuid":"adSBq97hhhpFNUnc","deleted":true}
105 changes: 44 additions & 61 deletions README.md
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,74 +1,57 @@
Assignment 3 - Persistence: Two-tier Web Application with Flat File Database, Express server, and CSS template
===

Due: September 16th, by 11:59 AM.

This assignnment continues where we left off, extending it to use the most popular Node.js server framework (express), a flat file database suitable for small applications (lowdb), and a CSS application framework / template of your choice (Boostrap, Material Design, Semantic UI, Pure etc.)


Baseline Requirements
Readme
---

Your application is required to implement the following functionalities:

- a `Server`, created using Express (no alternatives will be accepted for this assignment)
- a `Results` functionality which shows the entire dataset residing in the server's memory
- a `Form/Entry` functionality which allows users to add, modify, and delete data items (must be all three!) associated with their user name / account.
- Use of at least five [Express middleware packages](https://expressjs.com/en/resources/middleware.html). Explore!
- Basic authentication using the [Passport middleware](http://www.passportjs.org) for Express (this counts as one of your five middleware packages). We encourage using the Local strategy, but OAuth (Open Authentication) can also be used for additional technical achievement. The course staff cannot help you with the various flavors of OAuth strategies. YOU MUST PROVIDE US WITH ACCOUNT CREDENTIALS TO LOGIN TO YOUR APPLICATION IF YOU USE OAUTH. The course staff cannot be expected to have credentials for any particular OAuth service.
- Persistent data storage in between server sessions. [lowdb](https://github.com/typicode/lowdb) is a suitable database package for this assignment and will be discussed in class.
- Use of a [CSS framework or template](https://github.com/troxler/awesome-css-frameworks). This should do the bulk of your styling/CSS for you and be appropriate to your application. For example, don't use [NES.css](https://nostalgic-css.github.io/NES.css/) (which is awesome!) unless you're creating a game or some type of retro 80s site.

Your application is required to demonstrate the use of the following concepts:

HTML:
- HTML input tags and form fields of various flavors (`<textarea>`, `<input>`, checkboxes, radio buttons etc.)
- HTML that can display all data *for a particular authenticated user*. Note that this is different from the last assignnment, which required the display of all data in memory on the server.
## A3 Virtual Shopping List

Note that it might make sense to have two simple pages for this assignment, one that handles login / authentication, and one that contains the rest of your application. For this assignment, it is acceptable to simply create new user accounts upon login if none exist, however, you must alert your users to this fact. If you're not using OAuth
Website link: https://a3-ryan-cirella.glitch.me/

CSS:
- CSS styling should primarily be provided by your chosen template/framework. Oftentimes a great deal of care has been put into designing CSS templates; don't override their stylesheets unless you are extremely confident in your graphic design capabilities. The idea is to use CSS templates that give you a professional looking design aesthetic without requiring you to be a graphic designer yourself.
The goal of my application is to hold a list of items for a grocery store shopping list.

JavaScript:
- At minimum, a small amount of front-end JavaScript to get / fetch data from the server. See the [previous assignment](https://github.com/cs4241-19a/a2-shortstack) for reference.

Node.js:
- A server using Express, at least five pieces of Express middleware, and a persistent database (a flat file using lowdb is great).

Deliverables
---

Do the following to complete this assignment:

1. Implement your project with the above requirements. A good potential starting point is to use the "hello-express" project template inside of Glitch; this appears as an option when you hit the "New Project" button. Use the work you did in the last assignment as a reference to implement functionality, as well as the notes from class on 9/9 and 9/12.
2. If you developed your project locally, deploy your project to Glitch, and fill in the appropriate fields in your package.json file.
3. Test your project to make sure that when someone goes to your main page on Glitch, it displays correctly.
4. Ensure that your project has the proper naming scheme `a3-yourname` so we can find it.
5. Fork this repository and modify the README to the specifications below. You do not need to include any of your project files in this repo (we will see those on Glitch), you only need to update and commit the README file.
6. Create and submit a Pull Request to the original repo. Name the pull request using the following template: `a3-gitname-firstname-lastname`.

Sample Readme (delete the above when you're ready to submit, and modify the below so with your links and descriptions)
---
*Usage:*
- To add an item, enter it in the input box and click "Add Item"
- To remove an item, make sure the input box is blank and click on the item in the list
- To edit an item, enter the new value in the input box and click on the item to edit in the list

## Your Web Application Title
I faced challenges with using the server to get requests and responses to return the correct JSON I needed for the app to function correctly.
It was hard learning how to do this as I've never worked with express server before.

your glitch link e.g. http://a3-charlieroberts.glitch.me
The authentication strategy I chose was to just have users create accounts or login as a previously made account. I chose this because github authentication was not working for me and letting users make a username and password would work correctly.

Include a very brief summary of your project here. Images are encouraged, along with concise, high-level text. Be sure to include:
For CSS framework, I used the sakura theme. It was classless and minimalist which suited my application.
Its default colors also fit well with the concept of a shopping list with familiar colors one would expect around paper.
I only made one modification to the CSS because everything worked correctly without changes. I changed the text color to red for the username and passoword on the login screen.

- the goal of the application
- challenges you faced in realizing the application
- what authentication strategy / database you chose to use and why (choosing one because it seemed the easiest to implement is perfectly acceptable)
- what CSS framework you used and why.
- include any modifications to the CSS framework you made via custom CSS you authored.
- the five Express middleware packages you used and a short (one sentence) summary of what each one does.
The five Express middleware packages I used were:
- body-parser, for easy JSON parsing on the server side from the client.
- compression, to automatically compress server responses.
- response-time, to log how long each aspect of the website takes to load.
- morgan, to log all of the HTTP requests made from the website.
- connect-timeout, to cause the website to timeout if things take too long to load.

## Technical Achievements
- **Tech Achievement 1**: I used OAuth authentication via the GitHub strategy
- **Tech Achievement 2**: I used over ten Express middleware packages, enabling me to create a server that...
- N/A

### Design/Evaluation Achievements
- **Design Achievement 1**: I tested my application using screen reading software, and found that...
- **Design Achievement 2**: I followed best practices for accessibility, including providing alt attributes for images and using semantic HTML. There are no `<div>` or `<span>` elements in my document.
- **Design Achievement 3**: We tested the application with n=X users, finding that...
**Design Achievement 1**: I followed the following tips from the W3C Web Accessibility Initiative:
- Clear and Concise: Short descriptions on all buttons and the lists
- Heading Meaning: Heading on top of list describes its contents
- Input Proximity: The input field on the login and list is right next to its descriptor.
- Easy Feedback: An alert appears if the user enters a username or password that is incorrect.
- Layout Sizes: The websites layout of being centered gives accessibility no matter what device it is being used on.
- Indicate important information: Username and Password have asterisk showing necessity.
- Descriptive Page Titles: Page tital in browser shows exactly how many pages in app and which one you're on.
- Instructions on What User Provides: The login page provides recommendations for the password
- Contrasting Colors: The button, header and text colors contrast the grey background of the app
- Descriptive Colors: The username and password fields are red showing they are required to the user.
- Consistent Navigations: Buttons link all pages of the app together.
- Clear Instructions: Instructions for the user are short and concise.

**Design Achievement 2**: I followed the CRAP principles in the Non-Designer's Design Book readings.
- *Contrast*
- The site’s contrast begins with the color pallet on it for the headers, text and buttons. The header and text are black and the buttons are a dark shade of green. These both contrast the light grey background immensely to stand out to the user and grab attention. The big and bold header should be the first thing the user’s eyes focus on as it contrasts the rest of the page. Then, the label and text box below it should be the next thing to focus on. The buttons then should get the user’s attention because their color starkly contrasts the rest of the page. As the list fills up, it should then be the last thing looked at once complete for the user’s own use.
- *Alignment*
- Everything in the layout is aligned to an equal offset from the left and right to the page and then aligned to the left. Some elements such as input boxes are next to a label which describes what must go in the box from the user for ease of use purposes. The login page has most objects on the page aligned to the left, but the login and create account buttons are next to each other. They are both still aligned left on the line. The line to the left of the page ensures nothing is in uneven alignment for the page. The list page also has a label and input field on one line with everything else aligned to the left.
- *Repetition*
- For the list page, the buttons repeat themselves to get attention from the beginning all the way to the end of the page. The list items will stack one on top of the other as the user adds them in a non-changing format. The login screen has the required text repeat itself for both the username and the password to get the user’s attention twice as to what’s required for log in. The buttons at the bottom of the login page repeat themselves right next to each other as each is for a similar function. The input fields also repeat on the login page right above one another for two inputs from the user.
- *Proximity*
- For proximity, items pertaining to each other are right next to each other. On the logon page, the username and password labels are each right above their respective input fields. There is also text below the password field giving advisory to the user on what the contents of their password should be. The login and create account button are right next to each other at the end of the page in order to both pertain to the sign on. The header at the top has subtext under it directing the user to enter in their credentials for the login. For the list page, the grocery item label and input box are right next to each other. Then, the entire list and its interactive elements all are one on top of each other on the rest of the page.
Loading