Skip to content

Latest commit

 

History

26 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SMART-INVENTORY-DB-API

This repository contains the source code for the database (PostgreSQL) and REST API (FastAPI) of the Smart Inventory ecosystem. The database is designed to host data for the inventory management, storage management, material order management and cabinet access monitoring features of the platforms of the ecosystem (Smart Lock, Augmented Worker Interface, DVIC's website).

Table of contents

Deployment

  1. Download the docker-compose.yml file and edit it for your application :
curl -OL https://raw.githubusercontent.com/DeVinci-Innovation-Center/SMART-INVENTORY-DB-API/main/docker-compose.yml
  1. From the same directory, start the API and DB with :
docker-compose up

Entity-Relationship Diagram

ERD

Relational Schema

Primary keys are underlined and foreign keys are preceded by a hash sign :

users (uid, firstname, lastname)

cabinets (id, description)

categories (id, title, description, #parent_id)

items (id, title, description, price, link, #category_id)

orders_requests (id, date, state, #item_id, #user_id)

storage_units (id, state, verified, #item_id, #cabinet_id)

cabinets_unlock_attempts (id, date, granted, #user_id, #cabinet_id)

Testing

Run the unit tests with:

docker exec -it smartinventory_api python3 -m pytest

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages