6f0e0ad6c6
SvelteKit + PostgreSQL app for tracking vintage computers, audio equipment, components, and installation history. Features device/component CRUD, operation logs, QR code labels, global search, image uploads, and dark mode. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2.5 KiB
2.5 KiB
buildfor_life_repair
Inventory and repair tracking system for vintage computers and audio equipment. Built with SvelteKit, PostgreSQL, and Tailwind CSS.
Features
- Device tracking — computers, audio equipment, peripherals with full specs, images, documents
- Component tracking — individual parts (BlueSCSI, RAM, logic boards, etc.) linked to devices
- Installation log — full history of component installs/removals with timestamps
- Operation/repair log — per-device repair, inspection, cleaning, modification history
- QR code labels — printable labels for devices and components, scannable for quick lookup
- Global search — find devices/components by ID, name, or scanned QR code
- Dark mode — follows system preference or manual toggle
Prerequisites
- Node.js 18+
- PostgreSQL 14+ (or Docker)
Setup
1. Install dependencies
npm install
2. Set up the database
Option A: Use your own PostgreSQL instance
CREATE USER bflr WITH PASSWORD 'bflr_dev';
CREATE DATABASE buildfor_life_repair OWNER bflr;
\c buildfor_life_repair
GRANT ALL PRIVILEGES ON DATABASE buildfor_life_repair TO bflr;
GRANT ALL ON SCHEMA public TO bflr;
Option B: Use Docker
docker compose up -d
3. Configure environment
Copy the example env file and edit as needed:
cp .env.example .env
Edit .env with your database connection string:
DATABASE_URL=postgresql://bflr:bflr_dev@localhost:5432/buildfor_life_repair
UPLOAD_DIR=static/uploads
BASE_URL=http://localhost:5173
4. Run database migrations
Push the schema to your database:
npm run db:push
Or generate and run migrations:
npm run db:generate
npm run db:migrate
5. Start the dev server
npm run dev
The app will be available at http://localhost:5173.
Database commands
| Command | Description |
|---|---|
npm run db:push |
Push schema changes directly to the database |
npm run db:generate |
Generate SQL migration files from schema changes |
npm run db:migrate |
Run pending migrations |
npm run db:studio |
Open Drizzle Studio (visual database browser) |
Build for production
npm run build
npm run preview
Tech stack
- Frontend: SvelteKit 5, Svelte 5 (runes), Tailwind CSS v4
- Backend: SvelteKit server, Drizzle ORM, PostgreSQL
- Validation: Zod
- Other: sharp (image thumbnails), qrcode (QR generation), date-fns