Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 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:
    make db-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

Additional scripts

Frontend

  • make spec to sync openapi schema from backend to frontend
  • npm run format to format with prettier & npm run lint:fix to lint

Backend

  • make spec to rewrite the openapi spec to backend/dist/openapi
  • make format to format using ruff
  • make check to lint using ruff
  • make fix to format + lint fix whatever you can.
    • If trying to configure mappers, you can use # noqa for wildcard imports

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

Watchers

Forks

Releases

Packages

Contributors

Languages