A full-stack, deployed website for the company Pop Umai!
The purpose of this project was to collaboratively build a real-world, full-stack web application that demonstrates everything we have learned over the last several months in our bootcamp. For a full list of the various libraries, packages, and technologies utilized for this project, please refer to the Technologies section below.
For this project we decided to partner up with a local business owner in order to build a website for her company, Pop Umai. Because of this, we had multiple meetings with the client and had to take into consideration her ideas and desires for the website. We would then take her ideas and turn them into reality, implementing them on the website.
The live website can be accessed by clicking here.
Please be sure to carefully follow the installation instructions.
- This app is powered by Node.js and MySQL, as a result, make sure those are properly installed and configured before continuing on.
- Navigate to the root of this repo and run
npm install
in your console/terminal to download all the necessary npm packages. - Create a
.env
file in the root of the repo. Within this file, copy and paste the following:
DB_NAME=pop_db
DB_USER=<user_name>
DB_PASSWORD=<user_password>
ADMIN_NAME=<admin_name>
ADMIN_EMAIL=<admin_email>
ADMIN_PASSWORD=<admin_password>
- Change the value of
DB_USER
andDB_PASSWORD
to your MySQL user and password respectively. Save these changes. - Change the value of the
ADMIN
variables to whatever you want your administrator login for the website to be. - Execute
mysql -u root -p
in your console/terminal. - Once succesfully logged in, execute
source db/schema.sql
to create database. Exit when finished. - In your console/terminal, execute
npm run seed
to seed your newly created database. - You are now ready to turn on the server by running
npm start
ornpm run watch
for nodemon (to view changes live).
The administrator dashboard is hidden and inaccessible by default and can only be accessed by following these instructions (after following the previous installation instructions).
Note: Administrator dashboard can only be accessed on locally-run version of the website. The deployed version is ready for use for our client so she has her own admin login set up already.
- Once the server is running, the website is accessible on
http://localhost:3001
. - In the url search bar add
/dashboard
to the end of the url. It should look likehttp://localhost:3001/dashboard
. Hit enter. - You will be redirected to a login page if you are not already logged in.
- Enter in the admin credentials you created in your
.env
file. - Upon successful login, you will be redirected to the admin dashboard where the user can make changes to specific parts of the website.
Note: After logging in, a session is set to expire within 30 minutes, which afterwards will automatically logout the admin. You can adjust the time(milliseconds) in the root server.js
Below is a list of all the technologies we utilized in order to build this website.
Below are the objective project grading requirements as well as a response as to how we utilized different aspects of the website to fulfill these requirements. The subjective requirements have been omitted.
-
Use Node.js and Express.js to create a RESTful API. ✅
- Node.js and Express.js used to return information about
events
from MySQL database.
- Node.js and Express.js used to return information about
-
Use Handlebars.js as the template engine. ✅
-
Use MySQL and the Sequelize ORM for the database. ✅
- Database is generated in and utilizing MySQL.
- Sequelize is used to create and seed
events
andadmin
tables.
-
Have both GET and POST routes for retrieving and adding new data. ✅
- Navigating to different pages for
GET
requests. Also retrieving all events from database on the "Events" page. - Admin login, as well as creating new events on the admin dashboard page are done using
POST
requests.
- Navigating to different pages for
-
Use at least one new library, package, or technology that we haven’t discussed. ✅
- EmailJs
- Sweet Alert
-
Have a folder structure that meets the MVC paradigm. ✅
-
Include authentication (express-session and cookies). ✅
- Login page on
/dashboard/login
, will only allow access to dashboard page if the admin credentials match to the hashed information in the database.
- Login page on
-
Protect API keys and sensitive information with environment variables. ✅
-
Be deployed using Heroku (with data). ✅
-
Be interactive (i.e., accept and respond to user input). ✅
Below are various screenshots of the website:
If you have any questions, please contact any of us below:
Github: n7-gil
Email: [email protected]
Github: TDGNate
Email: [email protected]
Github: Cesar-Infante
Email: [email protected]
Github: TonyQ032
Email: [email protected]
Copyright © 2022 Pop Umai - All Rights Reserved