Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

Green Inventory Management System for a greener future or corporate resources. #hackyeah2022

License

Notifications You must be signed in to change notification settings

sewera/green-inventory

Repository files navigation

Green inventory

An application for managing corporate inventory in a more sustainable way. It encourages companies not to scrap broken devices, but rather repair them or trade them in, so that the device is reused.

Full-stack application using Pocketbase as backend, and Vite + React + Mantine combo as frontend.

Screenshots

Light Mode

Dark Mode

Actions

Add Item

Cheat sheet

  • make — download all dependencies (see Workspace setup below);
  • make -j2 d — full-stack development servers;
  • make t — ui component unit tests;
  • make tu — ui component update Jest snapshots;
  • make -j2 b — build ui/dist and Pocketbase simultaneously;
  • make s — run Pocketbase serving ui/dist under /;
  • make v — run only frontend Vite development server;
  • make cp — copies example config to a working copy and links it to ui;
  • make cc — cleans all working config files;
  • make c — clean all dist files (ui/dist and ./pocketbase).

Prerequisites

Quick start

Workspace setup

After installing prerequisites, you have to set up the workspace. The following commands will download a proper Node.js, enable it in the workspace, install Yarn, and download all the dependencies, both for ui and Go.

nvm install  # if using nvm
nvm use      # if using nvm
npm -g i yarn
make

Other commands

The following command will open a dev Vite server with hot reload, and a Pocketbase server alongside it.

make -j2 dev

or make -j2 d for short.

The following will only build and run the Pocketbase executable.

make pb

The following will build the static dist Vite package, and run a Pocketbase server that serves it under the root path (/).

make start

or make s for short.

It is an equivalent of:

make build pb

or make b pb for short.

The following command will unit test the ui components using Jest.

make test

or make t for short.

To update the snapshots when running component unit tests, run:

make test-update

or make tu for short.

To copy an example config file (app.config.example.json to app.config.json), which contains the backend (Pocketbase) host, run:

make copy-example-config

or make cp for short.

To clean all working config files, run:

make clean-config

or make cc for short.

To clean all dist files, i.e.: ui/dist and ./pocketbase, run:

make clean

or make c for short.

Credentials

Field Value
Email [email protected]
Pass panda-blog-scorer

Default URLs

The Pocketbase URL can be configured in app.config.json. Both backend and frontend will respect this configuration. See also make copy-example-config recipe.

Further reading

About

Green Inventory Management System for a greener future or corporate resources. #hackyeah2022

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages