- Demo: Cyber Pets (e-store web application)
-
GitHub Repository: EECS4413-Project
https://github.com/crsalves/EECS4413-Project
-
Source Code: app
https://github.com/crsalves/EECS4413-Project/tree/main/app
-
SQL Database Scripts: scripts.sql
https://github.com/crsalves/EECS4413-Project/blob/main/app/database/scripts.sql
This project's deployment uses Docker with public images hosted on Docker Hub.
Before proceeding, ensure Docker Engine and Docker Compose are installed:
docker --version
docker-compose --version
- Navigate to the app directory and execute the command:
make run-app
- Access the Web Application on http://localhost:3000
make stop-app
Note!
Refer to the Makefile script for detailed information about the command lines that are automatically executed when running this application.
To run the project locally without Docker, the installation of necessary software and packages has been automated using a Makefile commands to set-up and start the necessary parts of application (Database, Backend, and Frontend). Following the steps and execute the commands subsequently:
Step 1. Set-up the Database
- Create the connection using the configuration below:
Port: 3306
user: root
password: password
database name: pet_store
- Set Execute the queries from the schema scripts.sql file to create the database and populate the tables with the provided sample records.
Note that, it is possible to use the docker-compose for individuals containers. To set-up the database separately, got to app directory and execute the command:
make start-db
Step 2. Set-up the Backend
- Install backend dependencies and start the server program by running the following command in the
backend
directory:
npm install
npm run start-node-dev
Step 3. Set-up the Frontend
- Install frontend dependencies and start the React development server by running the following command in the
frontend
directory:
npm install
npm start
- Frontend: http://localhost:3000
- Backend/API: http://localhost:8080
- Database: Verify the MySQL database connection using tools such as MySQL Workbench.
Use the following credentials to log in as the admin user:
Admin-user id: [email protected]
Password: admin
Port: 3306
User: root
Password: password
Database: pet_store