Skip to content

MK-DlR/inventory-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

182 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

HerbTrack

Full-stack medicinal plant inventory web app where guests and an admin can manage plants based on stock and useage.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

HerbTrack Screen Shot

(back to top)

Built With

  • EJS
  • Express
  • Javascript
  • Node.js
  • Postgres

(back to top)

Getting Started

To get a local copy up and running, follow these steps.

Prerequisites

  • Node.js (recommended v22+)
  • npm
  • Neon account (free tier works)

Installation

  1. Clone the repository
    git clone https://github.com/MK-DlR/inventory-app.git
    cd inventory-app
  2. Install dependencies
    npm install
  3. Create a Neon database
    1. Sign up for a free account at https://neon.tech
    2. Create a new project
    3. Open the project dashboard and copy the PostgreSQL connection string
    4. The connection string should look similar to:
      postgresql://username:password@host/database?sslmode=require
      
  4. Set up environment variables
    cp .env.example .env
    Open .env and fill in:
    • DATABASE_URL (from Neon)
    • SESSION_SECRET
    • ADMIN_PASSWORD
    • TREFLE_API_KEY (optional)
  5. Set up the database
    npm run setup
    This will create all tables and seed the database with a guest account, admin account, and sample plant data.
    Only run this once on a fresh install — it will wipe any existing data.
  6. Start the application
    npm run dev
  7. Open the app at http://localhost:3005

Notes

  • Backend: Express + PostgreSQL
  • Frontend: EJS
  • Database: Neon (cloud PostgreSQL)
  • Authentication: Session-based
  • Trefle API is optional — the app works without it, but plant image fetching will be unavailable
  • Default seed includes a guest account and admin account, plus sample plant data

(back to top)

Usage

This is an Express based medicinal plant inventory management application where users can maintain their stock of plants along with any medicinal uses they may have.

The application allows filtering, sorting, and searching and includes a pre-seeded database with an admin account for actual stock management.

How to Use the App

  1. Open the app at http://localhost:3005 or visit the live demo
  2. CRUD plants and medicinal uses on the live demo
    • Create new plants for the Trefle API to fetch images for
    • Alternatively, set up and run a copy locally to CRUD plants as an admin
  3. Search by plant name, filter by medicinal use and/or stock, quantity, and order status, and sort by various options

Default Setup Behavior

  • Default plants and medicinal uses are created automatically via the setup script
  • An admin account is created for management of plants separately from guest (logged out) view plants
  • Admin and guest plants are managed separately, allowing guests to demo the functionality without damaging any in-use data

(back to top)

Roadmap

  • Add LICENSE.txt
  • Admin account
    • Guest account
    • Login page
  • Upgrade CSS
  • Add live demo link
  • User supplied images
  • Bug: API giving unrelated images

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

As this is a student project created for The Odin Project curriculum, it is currently not open for contributions.

(back to top)

Top contributors:

contrib.rocks image

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Adrien Newman - @MK_DlR - adriennewman92@gmail.com

Project Link: Repository & Live Demo

(back to top)

Acknowledgements

(back to top)

Majima weakly swiping a knife

Releases

No releases published

Packages

 
 
 

Contributors