Developing Your Own Express Application
For the final project, you will each design and develop your own Express application. You will have two weeks to complete the project. As that is a short time for a fully functional application, the applications will have to be relatively simple, with only a few features implemented.
For students who would like to become interns with Code the Dream, the final project is very important, because it is the best indication of how well you would succeed as an intern.
Goal of the Application
The goal of the project is to showcase what you have learned during class. You will have the opportunity to demonstrate your knowledge and creativity. You are required to create an Express application from scratch. A proposal for what your application will do is required to be submitted before you start working on the project.
Before You Start
Please discuss your proposal with us. You will fill out a form to describe your proposal, saying what you would like to do. We will evaluate the proposal to make sure:
- That it is doable in the allotted time. If the project seems too complicated, we may suggest that it be limited to just a few features.
- That it demonstrates the skills you have learned in the class series so far. It should not be so simple that it doesn’t show key skills.
- That it gives you an opportunity to demonstrate creativity, which is important for a developer.
You may find that you want to use some concepts, technologies, or npm packages we didn’t cover, which is worth some extra points so long as it doesn’t get too hard.
Although you will need to keep your final project simple, think about an application you might want to create eventually. Perhaps you could implement some subset or feature of this future application.
Be Careful with Your MongoDB Password
Do not include the MongoDB URI in your code, even temporarily. Use the dotenv NPM package so that it can be stored in a .env file. Be sure you have a .gitignore file so that the .env file and the node_modules directory are not delivered to Github or Render.com.
Requirements for the Project (Rubric)
- Create a full Node/Express application from scratch using the MongoDB database. It must contain the following elements:
Models & Controllers
- At least two Mongoose data models. One of these must be a User data model, as you need to implement logon.
- Implement user registration and logon. Authentication must use Passport. Passwords must be stored hashed.
- Model attributes should use several different data types (number, string, boolean, date, array etc.).
- Include validation of your attributes to prevent the creation of invalid records.
- For any models beside the User model, implement all the CRUD (create, read, update, delete) operations in your controllers.
- Bonus: implement some non-CRUD operations (like sorting, paging, etc.).
- Implement routes and controller operations so that registration, logon, and all CRUD operations can be performed. You do not implement APIs. Instead you implement methods that render EJS templates.
- Implement access control middleware so that at least the new/edit/create/update/delete operations require authentication. You can have unauthenticated read operations if you choose.
- Implement error handling middleware so that appropriate status codes and error messages are returned to the caller as operations are performed and if errors occur. When performing a redirect, you will need to store the message for the user in the session, and you will need to check that session for messages when views are displayed.
Views
- Using EJS templates, implement views for user registration and logon. Include a link on for logoff on other pages.
- Using EJS templates, implement views for the CRUD operations for each model:
- Index – view to list all the records for that model, including buttons or links for show, edit, and delete.
- New – form to create a new record
- Edit – form to update an existing record
- Show – view to see a specific record
- Form controls should include several types of input fields, which might include inputs, textareas, dropdowns, checkboxes, and radio buttons.
- Links or buttons should be provided to help the users navigate the application.
- Style your application by adding CSS to make the application attractive. Consider the inclusion of images, color, fonts, and other CSS styling.
Deployment
- Include security protections for your application.
- Deploy the application to Render.com.
Bonus
- Do something extra. This could be the implementation of a more complicated data model, or use of additional npm packages, callouts to other public APIs, or whatever your creativity inspires.
Reuse of Code
Some of the functions of this project are implemented in the Server Side Rendering and Authentication for Pages projects of the class. You can reuse code from those projects to assist you, but your Mongoose data models must be different, to support different data.
Submission
You should submit a link to a Github repository which contains your application. It is highly encouraged that you use git branches to implement each feature. This is so that if you make a mistake, it does not ruin the work you have done up to that point. Before the due date, we will share a link to a form that you can use to submit your Github link. You should also submit a link to your application on Heroku.
Presentation
Each student will present their application in a Zoom meeting. You will only have 5 minutes for each presentation, but we will have reviewed your application with you ahead of time.