Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a3-Aaron-Zhang #55

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
134 changes: 45 additions & 89 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,113 +1,69 @@
Assignment 3 - Persistence: Two-tier Web Application with Database, Express server, and CSS template
===
---

Due: September 19th, by 11:59 AM.
## Taskly

This assignnment continues where we left off, extending it to use the most popular Node.js server framework (express),
a database (mongodb), and a CSS application framework / template of your choice (Boostrap, Material Design, Semantic UI, Pure etc.)
https://a3-azzhang3.glitch.me

Baseline Requirements
---
(Late Pass)

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 all data associated with a logged in user (except passwords)
- a `Form/Entry` functionality which allows users to add, modify, and delete data items (must be all three!) associated with their user name / account.
- Persistent data storage in between server sessions using [mongodb](https://www.mongodb.com/cloud/atlas) (you *must* use mongodb for this assignment). You can use either the [official mongodb node.js library](https://www.npmjs.com/package/mongodb) or use the [Mongoose library](https://www.npmjs.com/package/mongoose), which enables you to define formal schemas for your database. Please be aware that the course staff cannot provide in-depth support for use of Mongoose.
- 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.
### Goal
The goal of this application is to provide users with an efficient and intuitive platform for managing their tasks. Users can create, edit, prioritize, and track tasks based on their deadlines, allowing them to stay organized and focused. The application is designed to help users manage their workload by clearly showing upcoming deadlines, highlighting tasks that need attention, and providing a user-friendly interface for managing both ongoing and completed tasks.

Your application is required to demonstrate the use of the following concepts:
### Challenges
- Ensuring that tasks were correctly displayed
- Creating a layout that looks good and functions well, which required substantial work with both the CSS framework and custom styling adjustments.
- Implementing dynamic elements, such as the collapsible task for users to see descriptions. This also ensured that tasks would automatically resize and fit their content.
- Ensuring that tasks with urgent deadlines or those that were past due were visually emphasized without cluttering the interface.

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.
### Authentication
For user authentication, there are two ways: Google Authentication and a default username and password. Google Auth was used because it provided a secure way to authenticate users, and allowed for integration with existing identity providers. Additionally, it simplified user registration and login process, making the app easier to use. The username and password was used because it provided a way for users to sign up and use the application without any third party requirements. Additionally, users may not feel comfortable connecting their account to the app, and a simple username and password allows them to still access the app.

Note that it might make sense to have two pages for this assignment, one that handles login / authentication, and one that contains the rest of your application.
For example, when visiting the home page for the assignment, users could be presented with a login form. After submitting the login form, if the login is
successful, they are taken to the main application. If they fail, they are sent back to the login to try again. 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.
### CSS Framework
Materialize CSS was chosen as the CSS framework for this project. Materialize was chosen because it offers a modern, responsive design with pre-built components that helped accelerate development. The framework provided a clean, intuitive UI that fits well with the goal of creating a user-friendly task manager.

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.
#### Custom CSS Modifications

JavaScript:
- At minimum, a small amount of front-end JavaScript to get / fetch data from the server.
See the [previous assignment](https://github.com/cs-4241-23/shortstack) for reference.
While Materialize CSS provided a solid foundation, several custom modifications were made to enhance the design and functionality:

Node.js:
- A server using Express and a persistent database (mongodb).
1. Dark Mode Toggle: A custom dark mode toggle was implemented using JavaScript and custom CSS. The dark mode switches the background color, text color, and other UI elements to provide a more comfortable viewing experience in low-light environments.
2. Task Header Adjustments: To improve the layout of the task headers, I used custom flexbox layouts which helps with consistent spacing between the task title, due date, priority, and status.
3. Urgency Indicators: Custom CSS for visual urgency indicators were added using red icons and color changes for tasks that were past due or had only one day remaining. This modification helped to prioritize tasks visually and improve the user experience.
5. Textarea Resizing: To solve a bug where the textarea size would remain enlarged after editing, I implemented a custom solution that ensures the textarea automatically resizes based on the content.

General:
- Your site should achieve at least 90% on the `Performance`, `Best Practices`, `Accessibility`, and `SEO` tests
using Google [Lighthouse](https://developers.google.com/web/tools/lighthouse) (don't worry about the PWA test, and don't worry about scores for mobile devices).
Test early and often so that fixing problems doesn't lead to suffering at the end of the assignment.
There were also other custom CSS styling which all help with the user experience, making everything simple and user-friendly.

Deliverables
---
## Technical Achievements
- **Tech Achievement 1**: Implemented the Google Authentication method as an alternative for users to sign-up and sign-in with. This was done through the passport library. The default registration and login method is using the user-name and password, but google authentication simplifies the process, if the user chooses to use it.

Do the following to complete this assignment:
- **Tech Achievement 2**: The website achieved 100% in all four lighthouse tests required for this assignment on both the login page and the home page.

1. Implement your project with the above requirements. I'd begin by converting your A2 assignment. First, change the server to use express. Then, modify the server to use mongodb instead of storing data locally. Last but not least, implement user accounts and login. User accounts and login is often the hardest part of this assignment, so budget your time accordingly.
2. If you developed your project locally, deploy your project to Glitch (unless completing the alternative server technical acheivement described below), 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 (or an alternative server), it displays correctly.
4. Ensure that your project has the proper naming scheme `a3-yourfirstname-yourlastname` so we can find it.
5. Fork this repository and modify the README to the specifications below.
6. Create and submit a Pull Request to the original repo. Name the pull request using the following template: `a3-firstname-lastname`.
![visual](images/pic1.png)

Acheivements
---
![visual](images/pic2.png)

Below are suggested technical and design achievements. You can use these to help boost your grade up to an A and customize the
assignment to your personal interests, for a maximum twenty additional points and a maximum grade of a 100%.
These are recommended acheivements, but feel free to create/implement your own... just make sure you thoroughly describe what you did in your README,
why it was challenging, and how many points you think the achievement should be worth.
ALL ACHIEVEMENTS MUST BE DESCRIBED IN YOUR README IN ORDER TO GET CREDIT FOR THEM.

*Technical*
- (10 points) Implement OAuth authentication, perhaps with a library like [passport.js](http://www.passportjs.org/).
*You must either use Github authenticaion or provide a username/password to access a dummy account*.
Course staff cannot be expected, for example, to have a personal Facebook, Google, or Twitter account to use when grading this assignment.
Please contact the course staff if you have any questions about this. THIS IS THE HARDEST ACHEIVEMENT OFFERED IN WEBWARE. You have been warned!
- (5 points) Instead of Glitch, host your site on a different service like [Heroku](https://www.heroku.com) or [Digital Ocean](https://www.digitalocean.com). Make sure to describe this a bit in your README. What was better about using the service you chose as compared to Glitch? What (if anything) was worse?
- (5 points) Get 100% (not 98%, not 99%, but 100%) in all four lighthouse tests required for this assignment.
- (up to 5 points) List up to five Express middleware packages you used and a short (one sentence) summary of what each one does. THESE MUST BE SEPARATE PACKAGES THAT YOU INSTALL VIA NPM, NOT THE ONES INCLUDED WITH EXPRESS. So express.json and express.static don't count here. For a starting point on middleware, see [this list](https://expressjs.com/en/resources/middleware.html).

*Design/UX*
- (10 points) Make your site accessible using the [resources and hints available from the W3C](https://www.w3.org/WAI/), Implement/follow twelve tips from their [tips for writing](https://www.w3.org/WAI/tips/writing/), [tips for designing](https://www.w3.org/WAI/tips/designing/), and [tips for development](https://www.w3.org/WAI/tips/developing/). *Note that all twelve must require active work on your part*.
For example, even though your page will most likely not have a captcha, you don't get this as one of your twelve tips to follow because you're effectively
getting it "for free" without having to actively change anything about your site.
Contact the course staff if you have any questions about what qualifies and doesn't qualify in this regard.
List each tip that you followed and describe what you did to follow it in your site.
- (5 points) Describe how your site uses the CRAP principles in the Non-Designer's Design Book readings.
Which element received the most emphasis (contrast) on each page?
How did you use proximity to organize the visual information on your page?
What design elements (colors, fonts, layouts, etc.) did you use repeatedly throughout your site?
How did you use alignment to organize information and/or increase contrast for particular elements.
Write a paragraph of at least 125 words *for each of four principles* (four paragraphs, 500 words in total).

Sample Readme (delete the above when you're ready to submit, and modify the below so with your links and descriptions)
---

## Your Web Application Title
## Design/Evaluation Achievements
- **Design Achievement 1 (5 Points?)**: Instead of using a traditional table to display tasks, the app uses a collapsible dropdown to organize the task list. The collapsible component allows tasks to be presented in a clean, minimalistic manner while still providing access to detailed information when needed. It provides a more streamlined and user-friendly interface, where only the most relevant information (such as the task title, due date, and priority) is displayed at first glance. Users can then expand individual tasks to view detailed information like descriptions and action buttons (edit, complete, delete), keeping the interface less cluttered. Additionally it keeps users focused on what’s important, and not overwhelmed with too much information at once.

your glitch (or alternative server) link e.g. http://a3-charlie-roberts.glitch.me
- **Design Achievement 2 (5 Points?)**: Dark mode was integrated into the application to enhance both user experience and accessibility. By allowing users to toggle between light and dark themes, the application caters to different lighting environments and user preferences. Dark mode provides a more comfortable viewing experience in low-light or nighttime environments. Bright screens can cause eye strain, especially during prolonged usage, and dark mode helps alleviate this by reducing the brightness and harshness of the UI. Additionally, for users with sensitivity to bright light, dark mode can significantly improve accessibility. It reduces the overall brightness of the screen, making the application more comfortable for individuals who struggle with bright interfaces.

Include a very brief summary of your project here. Images are encouraged, along with concise, high-level text. Be sure to include:

- the goal of the application
- challenges you faced in realizing the application
- what authentication strategy 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
## Pictures

## Technical Achievements
- **Tech Achievement 1**: I used OAuth authentication via the GitHub strategy
![visual](images/pic3.png)

![visual](images/pic4.png)

![visual](images/pic5.png)

![visual](images/pic6.png)

![visual](images/pic7.png)

![visual](images/pic8.png)

![visual](images/pic9.png)

### Design/Evaluation Achievements
- **Design Achievement 1**: I followed the following tips from the W3C Web Accessibility Initiative...
![visual](images/pic10.png)
Binary file added images/pic1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/pic10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/pic2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/pic3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/pic4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/pic5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/pic6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/pic7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/pic8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/pic9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added node_modules/.DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions node_modules/.bin/color-support

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/mime

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/mkdirp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/node-pre-gyp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/nopt

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/rimraf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/.bin/semver

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading