Skip to content

ScotchLabs/inventory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting started:

Please ensure you have uv and npm (use NVM in install) installed.
Run inside backend

uv sync

Run inside frontend

npm install

Alternatively, run the following inside your parent folder

chmod +x ./setup.sh
./setup.sh

Backend:

To run the backend in terminal:

  1. cd into backend
  2. make a .env file in backend based on the DATABASE_URL found in .env.example
  3. run the following for something
    docker-compose up -d
  1. if you made changes since last time (?) then migrate:
    uv run alembic upgrade head
  1. run the following to start server on http://localhost:8000
    uv run uvicorn app.app:app --reload

Remove the reload flag if you'd like to stop the server from refreshing for file changes

  1. To interact, use curl (changing the values in the json)

refs/remotes/origin/main

    curl -X POST http://localhost:8000/ -H "Content-Type: application/json" -d '{"username":"test"}'
  1. to actually view the database, make sure you have postgresql installed and then run
    psql -h localhost -p 5432 -U user -d db

the password is password lol then also do exit; to get out of SQL and stuff

  1. If new schema is added, run the backend, cd into frontend, and run
npx openapi-typescript ../backend/dist/openapi.json -o ./src/api/schema.d.ts

Frontend:

To edit with Mantine:

npm install @mantine/core @mantine/hooks

To look at the frontend (cd into the folder):

    npm run dev

Type q to exit. Have the sql running to make sure the two are working together as expected

TODO

  • Framwork for frontend/backend
  • @willschremmer implement create/delete asset functions
  • @mkengland setup frontend public facing

About

[IN PROGRESS] Inventory solution for Scotch'n'Soda's workshop.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors