Assignment 3
Assignment 3
Introduction
This assignment is the third of six assignments. It has been designed to give you practical experience
capturing form-submissions and validating forms using server-side JavaScript. You will have the
opportunity to store your source-code on a GitHub repository and host your web app on Cyclic. Finally,
you will use a cloud-based email service (like SendGrid) to send emails.
Before you begin this assignment, you must finish your previous assignment. All objectives listed for this
assignment are to be made “on top” of your previous assignment.
Most of the materials posted in this course are protected by copyright. It is a violation of Canada's
Copyright Act and Seneca's Copyright Policy to share, post, and/or upload course material in part or in
whole without the permission of the copyright owner. This includes posting materials to third-party file-
sharing sites such as assignment-sharing or homework help sites. Course material includes teaching
material, assignment questions, tests, and presentations created by faculty, other members of the
Seneca community, or other copyright owners.
It is also prohibited to reproduce or post to a third-party commercial website work that is either your
own work or the work of someone else, including (but not limited to) assignments, tests, exams, group
work projects, etc. This explicit or implied intent to help others may constitute a violation of Seneca’s
Academic Integrity Policy and potentially involve such violations as cheating, plagiarism, contract
cheating, etc.
These prohibitions remain in effect both during a student’s enrollment at the college as well as
withdrawal or graduation from Seneca.
This assignment must be worked on individually and you must submit your own work. You are
responsible to ensure that your solution, or any part of it, is not duplicated by another student. If you
choose to push your source code to a source control repository, such as GIT, ensure that you have made
that repository private.
A suspected violation will be filed with the Academic Integrity Committee and may result in a grade of
zero on this assignment or a failing grade in this course.
WEB322 – ASSIGNMENT #3 – WINTER 2024 DUE: MARCH 7, 2024 @ 11:59 PM EST
Technical Requirements
• All back-end functionality must be done using Node.js, Express, express-ejs-layouts, and
dotenv.
• You can use SendGrid (@sendgrid/mail) to send emails.
• You will use the body-parser module to handle form submissions.
• You will use SendGrid to send email messages.
• Your views must be created with EJS.
• You can use a front-end CSS framework such as Tailwind CSS, daisyUI, or Bootstrap to make your
website responsive and aesthetically pleasing.
• You are not allowed to use any Front-End JavaScript Frameworks. For example, you may not
use React, Vue, or Angular.
Objectives
Server-Side Validation
You are required to implement server-side validation for both the login and registration form.
When a user fills out the registration form and clicks on the submit button, provided that all the
validation criteria were met, your website must then send a welcome email message to the user’s email
address and then redirect the user to a welcome page.
Email Message:
Welcome page:
Do not forget to protect any API keys. Create a file to store environment variables and use the dotenv
module to add the API key to the process.env object.
GitHub
You must push your web application to a remote GitHub repository in your own account. Do not forget
to set your remote repository to private. Add your professor as a collaborator so he/she can view your
web application. Failure to set your repository as private or add your professor as a collaborator may
result in a severe penalty or a mark of zero on the assignment.
Your new repository must be called “web322-<SenecaID>”. The Seneca ID is your Seneca College
username, it appears in your email address before “@myseneca.ca”. For example, your professor will
use “web322-nick_romanidis” as the repository name.
Include a .gitignore file to prevent pushing the node_modules folder and the environment variables file
to GitHub. Do not forget to provide the URL to your professor (in the README.md file).
You must ensure you show at least four reasonable commits. A realistic view of your progress will be
determined by looking at your commits.
After creating your GitHub repository, remember to provide the URL to your professor (in the
README.md file). For more information, see the README.md section.
WEB322 – ASSIGNMENT #3 – WINTER 2024 DUE: MARCH 7, 2024 @ 11:59 PM EST
Cyclic
After creating your new Cyclic web app, remember to provide the URL to your professor (in the
README.md file). For more information, see the README.md section.
README.md
You must add a README.md file in the root folder of your assignment. Copy and paste the text provided
on Blackboard in an empty text file called README.md and remember to personalize the content. When
the repository is accessed on GitHub, this readme file should be displayed by default.
This assignment will be marked on the cloud as well as locally. Failure to correctly include and
personalize the README.md file may result in a severe penalty or a mark of zero on the assignment.
The README.md file with the correct information filled out must be supplied on Blackboard as part of
your project submission.
WEB322 – ASSIGNMENT #3 – WINTER 2024 DUE: MARCH 7, 2024 @ 11:59 PM EST
Rubric
• Password regular
expression validation. Used
<input type=”password”>.
Form validation
Registration Email
Welcome Page
Cloud Services
Make sure you submit your assignment before the due date and time. It will take a few minutes to
package up your project so make sure you give yourself a bit of time to submit the assignment.
1. Make sure all commits appear on GitHub and that the readme.md file contains the URL for both
cyclic.sh and GitHub. Test your site on Cyclic.
2. Locate the folder that holds your solution files. You must delete the “node_modules” folder but
do not delete any other files or folders.
3. Compress the copied folder into a zip file. You must use ZIP compression, do not use 7z, RAR,
or other compression algorithms or your assignment will not be marked.
5. Submit/upload your zip file. The page will accept unlimited submissions so you may re-upload
the project if you need to make changes. Make sure you make all your changes before the due
date. Only the latest submission will be marked.