Group 2 Developer Documentation

Product Info

This project is an inventory management system for the HRDC Warming Hut in Bozeman, Montana. Our goal for this project is to:

How to Obtain Source Code

Clone the GitHub repository using:

git clone https://github.com/423S25/project2.git

Directory Structure

The repository is structured into four main folders: frontend, backend, docs, and ingress.

  • Frontend: Contains the user interface code with components, pages, api, context,assets and types.
  • Backend: Contains Django-related code such as views.py, models.py, and test.py in the management folder. As well as the settings in the backend folder.
  • Docs: Contains all documentation files such as this page.
  • Ingress: Contains configuration files for deployment of the proxy.

How to Build

Before you run the software, make sure Docker is installed on your computer as well as a .env file exists. Note as well, developers may need to use docker-compose instead of docker compose.

  • Linux/Mac: Pull changes from GitHub and run make build followed by make dev. If a .env file does not exist, run touch .env The .env file also needs to have the following variables filled out and an example .env file can be seen in .env.exm.
  • Windows:With windows Makefile tools may not be available so run instead "docker-compose --env-file .env -f compose.yaml build" to build and "docker-compose --env-file .env -f compose.yaml up". As well if a .env file does not exist use "New-Item .env" similarily filled out to linux.

How to Test

We test after each developer's changes. As well we currently have a set of tests for both the frontend and the backend. All testing for the frontend is done using the selenium extension and a .side file. We also have a few tests for the backend in the test.py folder in backend/management.

How to do Frontend Tests

Testing for the frontend can be done using selenium. There is a tests folder in the frontend folder that contains a selenium file hrdc_frontend_tests.side. This file can be opened using the selenium extension in firefox or chrome. The tests currently cover the following features.

  • Add New Items
  • Delete Items
  • Edit Item
  • Login
  • Form validation
  • Download Table

Backend Tests

Backend testing is done currently through pythons standard testing library. With tests right now to test the delete and creation of items from a mock client. These tests can be run using python manage.py test management either in the backend docker container or by also running docker exec "container-name" python manage.py test management .

Automated Build and Test

Currently, we do not have an Automated Test feature, but we plan to integrate our python tests using NorthFlank's staging service and workflow feature. Selenium frontend automated tests using github actions are in the works but will only be implemented once we figure out how to get account details obsfucated from the public repo.

How to Release a Version

Releases are automatically triggered when changes are pushed to the main branch, with the build process handled by NorthFlank's CI/CD pipeline.

Bug Tracker

All bugs are tracked via GitHub issues. You can view and report them here. Similar to users, the issue need to include the following requirements as well as tag that reports it as a bug.
  • Expected behavior
  • Current behavior
  • Steps to reproduce
  • Detailed description
  • Possible solution and possible implementation.

Class Diagrams

Shoes

Class Diagram Sprint 3

Latest UML diagram showing our current architecture

Shoes

Class Diagram Sprint 2

Previous version of our class diagram