A warehouse management application for agricultural produce storage.
The system is designed for warehouses that store goods in stacked palox containers instead of traditional shelf-based storage. It helps manage storage locations, inventory, products, and warehouse movements in cold storage environments.
- Palox container management
- Stack-based warehouse organization
- Cold storage location tracking
- Inventory overview
- Product and supplier management
- Warehouse movement tracking
- Database-driven inventory management
- Responsive web application
- Supabase-powered backend
- Vue 3
- Ionic Vue
- TypeScript
- Vite
- Supabase
- PostgreSQL
- Pinia
- AG Grid
- Zod
- Nix development environment
- Git
- Node.js 22+
- npm 10+
- Nix with flakes enabled (recommended)
- Podman or Docker
- Supabase CLI
The project provides a reproducible development environment using Nix.
git clone <repository-url>
cd hofladenThe project provides a flake.nix.
Start it with:
nix developVerify the environment:
node -v
npm -vExpected:
Node.js 22.x
npm 10.x
npm installSupabase CLI requires a Docker-compatible API.
Podman provides this through a socket.
Check:
systemctl --user status podman.socketIf inactive:
systemctl --user enable --now podman.socketThe development environment sets:
export DOCKER_HOST="unix://$XDG_RUNTIME_DIR/podman/podman.sock"Verify:
podman infoFor the first setup:
npm run db:first-initializationThis will:
- Start local Supabase
- Create the database
- Apply migrations
- Import
supabase/seed.sql - Generate TypeScript database types
- Generate Zod schemas
Create a .env.local file.
Used by database generation scripts.
Example:
DB_USER=postgres
DB_HOST=127.0.0.1
DB_NAME=postgres
DB_PASSWORD=postgres
DB_PORT=54322Vite variables require the VITE_ prefix.
Example:
VITE_SUPABASE_URL=http://127.0.0.1:54321
VITE_SUPABASE_ANON_KEY=<local-anon-key>Get the current local Supabase environment:
supabase status -o envStart Supabase:
npm run db:startStart the frontend:
npm run devOpen: http://localhost:5173
npm run db:resetThis will:
- Remove the local database
- Apply migrations
- Import seed data
- Regenerate database types and schemas
Create a new seed file:
npm run db:dumpThis updates supabase/seed.sql.
Afterwards:
npm run db:resetcan recreate the same state locally.
After schema changes:
npm run db:generate-types-and-zodGenerated files:
src/types/database.types.ts- generated Zod schemas
| Command | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Create production build |
npm run preview |
Preview production build |
npm run lint |
Run ESLint |
npm run test:unit |
Run unit tests |
npm run test:e2e |
Run Cypress tests |
npm run db:start |
Start local Supabase |
npm run db:stop |
Stop local Supabase |
npm run db:reset |
Reset local database |
npm run db:dump |
Export database seed |
npm run db:generate-types |
Generate TypeScript database types |
npm run db:generate-types-and-zod |
Generate types and Zod schemas |
Error:
supabaseUrl is required
Check:
VITE_SUPABASE_URLVITE_SUPABASE_ANON_KEY
Restart Vite after changing environment variables.
Error:
ECONNREFUSED localhost:5432
Local Supabase PostgreSQL runs on 127.0.0.1:54322, not the default PostgreSQL port.
If Supabase CLI reports:
A new version of Supabase CLI is available
this is only informational. The CLI version is controlled by the development environment.
Typical daily workflow:
Terminal 1:
nix develop
npm run db:startTerminal 2:
nix develop
npm run devOnly reset the database after migration changes or when rebuilding the local environment:
npm run db:resetsee CONTRIBUTING.md
see LICENSE.md
