OpenStock is a parts inventory management system designed to help individuals manage their personal projects efficiently. Whether you're a hobbyist or a DIY enthusiast, OpenStock simplifies the process of organizing and tracking parts for your various projects.
Before running OpenStock, make sure you have the following installed on your system:
- Node.js
- Yarn (optional, but recommended for package management)
- Docker & Docker Compose (optional, but recommended for running local db)
You can use Docker to simplify the database setup. From the root directory, run the following command:
cp .base.env .env ### You'll probably want to change the values in here.
docker-compose up -d ### This will pull the latest image from PostgreSQL in docker hub and start it up.
This will start a PostgreSQL database with the credentials provided in the .env
file.
After the database is up and running, follow these steps to initialize it:
- Navigate to the
packages/server
directory. - Run the following commands in sequence:
yarn generate
yarn migrate
yarn db:seed
These commands will generate Prisma, create the initial database migration, and seed some sample data. You can modify the data as needed.
To start the server, execute the following command from the root directory:
yarn server:start
This will run the server locally on port 4000.
To preview the production build of the front-end, use the following command:
yarn webui:start
For development mode, run:
yarn webui:start dev
This will start the web user interface to interact with your parts inventory.
OpenStock is a personal project and is provided under the MIT License. You can find more information in the LICENSE
file.
Enjoy using OpenStock for managing your parts inventory!