The Core Application (50 points)
Build an application using Laravel with the following requirements:
- At least 4 pages (excluding login, logout, and registration)
- At least 3 POST routes (excluding login, logout, and registration)
- Pages where users can create, edit, and delete data
- Server-side validation with Laravel's validation rules
- Display error messages as flashed data for when form submissions fail validation. Your error messages should be specific to the fields that failed validation as opposed to showing a single generic error message on the page. Display these failed validations near the respective form control, like this: https://getbootstrap.com/docs/5.2/forms/validation/#server-side.
- Form submissions that fail validation should repopulate the form with the user's input
- Notifications or Bootstrap-style alerts as flashed data for when inserts, updates, and deletions are successful
- Authentication - Sign up, Login, and Logout
Use of Gates or Policies for Authorization- Whenever you render a list and that list is empty, show some helpful text to the user. For example, let's say you have a site where users can create recipes. If the user hasn't created any recipes, the table/list of recipes could render something like "You haven't created any recipes. Create one now (this could be a link to the create recipe page)".
- Blade templates that share a common layout. You're welcome to create a few different layouts (public pages, authenticated pages, and admin pages).
- The document title (the
title
tag) for each page should be unique and contain meaningful, contextual data. This includes pages with different data. For example, on Amazon, the document title of a product page is different for every product listed. - Use Eloquent for some or all of your database access.
- Your site should look organized and have a consistent layout. Feel free to use Bootstrap or any other CSS library if you'd like.
Feature 1: Comments (25 points)
Build a commenting system from scratch for some entity in your application. The comments should be unique to that entity. For example, if you were building a blog, you would have comments that are unique for each post. Comments for Post A wouldn't show up in the comments for Post B.
- The comments in your commenting system should at the very least contain the commenter's name, a comment body, and a timestamp.
- When comments are displayed, they should be sorted from the most recent to the oldest.
- Comments don't need to be commentable (nested comments), but you're welcome to do this if you'd like to take on that challenge.
- A user should be able to edit and delete their own comments but nobody else's.
Feature 2: Bookmarks / Favorites (25 points)
Build a bookmarks / favorites system from scratch for some entity in your application. For example, if you were building a blog, users would be able to favorite different posts, which they could view on a Favorites page. The posts that User 1 favorited wouldn't show up in the list of favorited posts by User 2.
- A user should be able to add and remove a particular resource from their bookmarks / favorites section.
- When you display the entity in the bookmarks / favorites section, display information about the entity and the date/time of when the item was bookmarked / favorited.
The Database
Design and build a SQLite or MySQL database. Once you have figured out what your database will look like, create it using Laravel migrations.
Code Quality
- All code should be nicely formatted. Points will be deducted for sloppy code.
- Be sure to put all sensitive information (like API keys and credentials) in environment variables.
- Format dates / times in a human friendly way.
Complexity
When grading your project, I will take into account your application's complexity. You will not get full credit by doing the bare minimum. Your project should be different from the application(s) that we built in class, the assignments, and the midterm.
Extra credit
- Use of gates or policies for authorization in at least 2 areas of your application. Since we didn't cover this in class, here is a short tutorial. (5 points)
- Use a third-party HTTP API similar to what we did in class (5 points)
- Build a REST API for some entity in your application with 5 endpoints that match the conventions we covered in class (GET - an array of resources, GET - a single resource, POST, DELETE, PUT or PATCH). (5 points)
Video Walkthrough
Create a video with Zoom where you demo all parts of your project and explain where you fulfilled each requirement. This video should have audio. Please keep this video under 10 minutes.
Submission
Send an email to me with the subject "ITP 405 Spring 2024 Final Project Submission" with the following links:
- A link to your GitHub repo. This will be a personal repo.
- The URL to your video walkthrough
- A copy of your
.env
file
You are done! 👏