A full-stack laboratory inventory app built with HTML, CSS, and JavaScript.
- How to get this app
- How to use this app
- Design
- For Developers
- Tech Stack
- Roadmap
- Contributing
- Contributors
- Fork this repository
- Select a hosting service
- Follow their instructions to host from a GitHub repository
Create a Javascript Wrapper class to call several of the functions we plan to implement for users:
- takeout supplies
- checkout information
- update product information
- this javascript wrapper class code will be hosted and called on by API requests
Request Informations with examples: [GET] get information to load information on the website and apply search filters [Parameters] ?type (string) = equipments = supplies ?id = id of the equipment / supply ?action = getCategory = getReservationList [Returns] JSON [POST] add / delete new tools, update status (availability, reservation, etc) [Parameters] ?type (string) = equipments = supplies ?id = id of the equipment / supply ?action = addNew = delete = reserve (from / until) = update = takeOut [Returns] JSON
Description: handles Database calls to the microsoft azure server - creating a new supply / equipment - creating a new reservation - updating stock / availability information
Example Response:
{
[
{
item name: "Thermo Fischer beaker 500mL",
item_descrip: "a very large beaker",
last_updated: 5/12/2023,
num_in_stock 10,
unit_size: 500mL,
item_location: Fridge drawer 201,
location_descrip: On the lab bench on the right of the fridge,
min_stock_replen: 3
},
{1},
....,
{N}
]
}
Error Handling:
- Server side errors
- If the item is out of stock or at low stock the program will throw an error preventing the user from checking out the supplies. Returns error message: {error: "No Supplies found"}
- Same for if the equipment is not available for checkout.
- Client side errors
- If the requst parameters are missing, client side error occurrs and returns error message: {error: "invalid request"}
Implement Several Databases using the following schema using a Microsoft Azure Server:
Used by research users to log in/out equipment
CREATE TABLE Equipment (
catalog_num varchar(100) PRIMARY KEY,
gen_item_name varchar(100), -- maps to general name in spreadsheet
specific_item_name varchar(150),
item_room varchar(50),
item_location_descrip varchar(100),
item_status BOOLEAN FOREIGN KEY REFERENCES Checkout(item_status) -- string determines if an item is checked out
);
Table in charge of actually handling scheduling equiquipment checkout duration
CREATE TABLE Checkout (
catalog_num varchar(100) PRIMARY KEY,
item_status BOOLEAN PRIMARY KEY,
last_checkout_date DATETIME,
checkout_duration INT,
checkout_due_by DATETIME,
);
Only accessible to admin accounts to look at current inventory levels
CREATE TABLE Equipment_financials (
catalog_num varchar(100) FOREIGN KEY REFERENCES Equipment(catalog_num),
Vendor varchar(100),
price float,
funds_used varchar(100),
Model_number varchar(100),
Serial_number varchar(100),
order_num varchar(100)
);
Used so people can take out supplies from the shared inventory
CREATE TABLE Supplies (
item_name varchar(100),
item_descrip varchar(150),
last_updated DATE FOREIGN KEY REFERENCES Resupply(last_updated),
num_in_stock INT FOREIGN KEY REFERENCES Resupply(num_in_stock),
unit_size VARCHAR(25),
item_location VARCHAR(100),
location_descrip VARCHAR(50),
min_stock_replen INT FOREIGN KEY REFERENCES Resupply(min_stock_replen)
);
Keeps track of current inventory levels and other admin information
CREATE TABLE Resupply (
item_name VARCHAR(100),
num_in_stock INT PRIMARY KEY,
min_stock_replen INT,
price FLOAT,
order_num VARCHAR(25),
added_by VARCHAR(50),
last_updated DATE PRIMARY KEY,
Expiration_date DATETIME,
Notes VARCHAR(250),
);
Once forked and cloned, you will need to install Node in the root of the project.
This project is built in HTML, CSS, and JavaScript. We selected vanilla JavaScript to reduce the chances of deprecated libraries or dependancies causing issues for deployments in the future.
Planned Features: (in no particular order)
- Group-based "checkout"/listed-as-consumed of items, especially by experiment
- Google account OAuth login
- Export experimental protocol to
.txt
file. - Scheduling equipment time
- Admin account that can add/remove users
- Send alert when item's inventory reaches 0 or preset amount, with button/reply functionality to list item as being on order
- Show if an item is on order, regardless of inventory amount
- When item is on order it also shows a button to add the received items (once they've arrived). Once that button is pressed, a prompt to enter the number of items appears, with final 'add to inventory' button
- Ability to group items into experimental protocol "ingredient list"
- Ability to check out items / groups of items by experiment protocol
Contributions are welcome! Please feel free to fork this repo, add any changes, and create a pull request against this repo's main branch. Please limit contributed code to HTML, CSS, and JavaScript. Please limit neaw features and/or fixed bugs to one feature/bug per branch. Please label your branches with A-B
, where A
is your name or GitHub username, and B
is the feature, bug, or a description of the change, separated by a hyphen.
- Semin Kim
- Dylan Renard
- RainyCityCoder
- Huge Thank you to Matt Akamatsu for hosting this repository