Skip to content

Grocery Analytics - A tool to display customer habits and grocery store traffic

License

Notifications You must be signed in to change notification settings

JaniceLu/cmpe172_project

Repository files navigation

Grocery Analytics

Table of Contents

About

University: San Jose State University

Course: Enterprise Software - Computer Engineering 172 / Spring 2020

Team Members: Sophie Chen, Stefan Do, Janice Lu

Introduction

Grocery Store Owners often don't realize that the most valuable information they have is right in front of them, their customers and their shopping habits. Grocery stores already keep track of their inventory but often do not utilize this information to make better informed decisions to improve their stores.

Grocery Analytics aims to solve this problem. By utilizing the data that grocery stores collect, like store traffic and inventory sold, Grocery Analytics helps grocery store owners and employees to make decisions for their business that's backed by data.

Screenshots

Home Screen

Item Analytics Screen

Store Traffic Screen - Hourly

Store Traffic Screen - Weekly

Store Traffic Screen - Monthly

Store Analytics Screen

Running Grocery Analytics locally

Prerequisites

  • Docker Desktop and Docker Account
  • MySQL Workbench
  • Suggested: GitHub Desktop

Instructions

1. Clone the project

  • Option 1: Use Command Line or Terminal to clone project into desired folder
git clone https://github.com/JaniceLu/cmpe172_project.git

2. Set up database

Create database using this command in MySQL Workbench:

Create database store;

Configure application.properties file to match your database and credentials:

spring.jpa.hibernate.ddl-auto = create
spring.datasource.url = jdbc:mysql://${MYSQL_HOST:localhost}:3306/YOUR_DATABASE_NAME
spring.datasource.username = YOUR_USERNAME
spring.datasource.password = YOUR_PASSWORD

3. Run the client

Navigate to the folder that you cloned the project into then run this command:

./gradlew bootRun
  • Make sure that this can run successfully and check localhost/8080
  • Make sure that the database and its tables have been successfully created

4. Populate database

  • Stop the localhost (CTRL+C, choose Y to end process)
  • Go to MySQL Workbench and import an appropriately formatted CSV file for each table

Sequence Diagram

Database Schema

Database Queries

All queries are handled through Spring Boot JPA (CRUD repositories) and Thymeleaf's templates.

License

All parts of this project are free to use under the open-source MIT license.