Comet Cupboard: Inventory Tracking
Table of Contents
- [Comet Cupboard: Inventory Tracking](#comet-cupboard-inventory-tracking)
- [Conceptual Overview](#conceptual-overview)
- [Users/Roles](#usersroles)
- [User](#user)
- [UTD Student](#utd-student)
- [UTD (Student) Volunteer](#utd-student-volunteer)
- [Comet Cupboard Staff](#comet-cupboard-staff)
- [Functional Requirements](#functional-requirements)
- [Shopping Page](#shopping-page)
- [Questionaire Page](#questionaire-page)
- [Cart Verification Page](#cart-verification-page)
- [Inventory Page](#inventory-page)
- [Data Analytics Page](#data-analytics-page)
- [Other Requirements](#other-requirements)
- [Third Party Integrations](#third-party-integrations)
- [Tech Stack](#tech-stack)
- [Deployment Notes](#deployment-notes)
- [Migration Scripts](#migration-scripts)
- [Setting Up Development Environment](#setting-up-development-environment)
- [Install the repo](#install-the-repo)
- [Set up environment variables](#set-up-environment-variables)
- [Database Setup](#database-setup)
- [Running the Application](#running-the-application)
- [Useful Dev Tips](#useful-dev-tips)
- [Prettier Formatting](#prettier-formatting)
- [Prisma](#prisma)
- [Postman](#postman)
- [Documentation](#documentation)
Conceptual Overview
The purpose of the Comet Cupboard Inventory Tracking is to
- Provide a streamlined view of the inventory of the food pantry
- Faciliate add/removal of inventory items through restocking and cart checkout
- Provide analytics for the admin about useful statistics such as Comet Cupboard weekly usage or most popular items in a week
Users/Roles
User
- Anyone who is able to login through UTD SSO
UTD Student
- Must be currently enrolled at UT Dallas
- Check out items at the Comet Cupboard (up to 6 item counts/week)
UTD (Student) Volunteer
- Verify carts
- Manage inventory
- Check out items at the Comet Cupboard (up to 6 item counts/week)
Comet Cupboard Staff
- Verify carts
- Manage inventory
- Admin privileges such as adding/removing volunteer roles
- Look at data analytics
Functional Requirements
Shopping Functionality
- The page shall display the item picture, item name, and any existing deal associated with each item for all in-stock items.
- The user shall be able to search for items.
- The user shall be able to filter for items by category and deals.
- The student shall be able to add/remove an item to/from cart.
- The student shall be able to denote the expired count for items in cart.
- The student shall be able to view all cart item information.
- The student shall be able submit cart for verification.
Questionaire Functionality
- The student shall be able to accept/decline the Statement of Understanding and Nondiscrimination clause.
Cart Verification Functionality
- For a pending cart, the volunteer/staff shall be able to view the cart's owner and the adjusted count breakdown dependent on actual item count, applied deals, and applied expired items.
- For a pending cart, the page shall display a notification for the following conditions.
- Cart contains expired items.
- Adjusted cart item count exceeds 6 items.
- Adjusted cart item count for a category exceeds 1 item.
- The volunteer/staff shall be able to accept/reject a cart.
- Upon cart acceptance, the system shall record the cart transaction in the database.
- Upon a cart acceptance/rejection, the corresponding cart owner shall be notified of the result of cart verification.
Inventory Functionality
- The page shall display the item picture, item name, and any existing deal associated with each item for all items.
- The volunteer/staff shall be able to search for items.
- The volunteer/staff shall be able to filter for items by category and deals.
- The volunteer/staff shall be able to modify an item's image, name, category, quantity, or deal.
- The volunteer/staff shall be able to select a source (eg. Community Garden) when modifying item counts.
- The volunteer/staff shall be able to add an item entity to the inventory.
- The staff shall be able to delete an item entity from the inventory.
Data Analytics Functionality
data and graphs goes crazy here
Other Requirements
- The web application must be supported on various devices such as phone, tablet, and PC.
- The user shall sign into the website via UTD SSO.
- The staff shall be able to add/remove volunteer roles from users.
Third Party Integrations
Tech Stack
- Frontend/Backend - Nuxt.js
- Database - SQLite and Prisma
- Testing - Vitest
Deployment Notes
N/A
Migration Scripts
N/A
Setting Up Development Environment
Ensure Node.js, npm, Visual Studio Code, Git, WSL2 (windows only) are installed. Ensure that everyone is working on the latest Long-Term-Support (LTS) Node.js version.
Install the repo
git clone https://github.com/UTDallasEPICS/Comet-Cupboard.git
cd Comet-Cupboard
npm install
Set up environment variables
# Fill out the environment variables accordingly
cp .env.example .env
Database Setup
# Initialize the database and test data seeding
npx prisma migrate dev --name init
Running the Application
# Pick your favorite way to run (-o flag will automatically open a new tab)
npx nuxt dev -o
npm run dev
npm run dev -- -o
Useful Dev Tips
Prettier Formatting
npm run format
Prisma
# Prisma GUI to view database
npx prisma studio
Postman
Use Postman to test HTTP, SSE, and WebSockets. Keep in mind that some features like SSE do not work on the Postman extension for VSCode, so have the Postman desktop app for full functionality.
Documentation
See ./notes, ./figma