Commit Graph

7 Commits

Author SHA1 Message Date
root eeb3e58814 feat: add Docker support and fix page refresh issues
- Add Dockerfile with root user for simplified deployment
- Add docker-compose.yml for local development
- Add docker-compose.prod.yml for production deployment
- Add start.sh script for container initialization
- Fix page caching: add dynamic rendering to all pages
- Update database initialization to handle permissions
- Update README with deployment instructions

This is the first fully functional version with Docker support.
No manual permission setup required on deployment.
2026-01-20 05:49:57 +00:00
root 43141d19f5 fix: Group edit and delete buttons together in BatteryCard
Wrap edit and delete buttons in a flex container so they appear
next to each other instead of spread apart.

🤖 Generated with [Qoder][https://qoder.com]
2026-01-19 17:22:34 +00:00
root 9d59024fed feat: Add edit button and modal for battery groups
Users can now edit battery group counts and notes via an edit button on
each battery card. The edit modal allows updating available count,
charging count, and notes.

Changes:
- Create EditBatteryModal component
- Add edit button (pencil icon) to BatteryCard
- Uses existing PATCH /api/batteries/[id] endpoint

🤖 Generated with [Qoder][https://qoder.com]
2026-01-19 17:17:31 +00:00
root febdc8beab feat: Add upsert behavior for battery groups
When adding batteries with the same brand-type-chemistry combination as
an existing group, the quantity is now added to the existing group instead
of failing with a duplicate error.

Changes:
- Update POST /api/batteries to check for existing group and upsert
- Add isNew flag to API response for UI feedback
- Update AddBatteryModal to show contextual success message
- Document upsert behavior in FSD.md and TSD.md

🤖 Generated with [Qoder][https://qoder.com]
2026-01-19 17:11:55 +00:00
root 9c4a9a141a feat: Add battery chemistry as third identification dimension
Battery groups are now identified by a 3-element combination: brand, type,
and chemistry (NiMH, Li-ion, LiFePO4, etc.) instead of just brand and type.

Changes:
- Add chemistries table with default values
- Update battery_groups schema with chemistry_id foreign key
- Create /api/chemistries endpoint for CRUD operations
- Update UI components to display and select chemistry
- Update documentation (FSD.md, TSD.md)

🤖 Generated with [Qoder][https://qoder.com]
2026-01-19 16:59:59 +00:00
root e7ca93f510 feat: Initial implementation of Battery Tracker
- Dashboard with stats overview (available, in-use, charging counts)
- Battery management (add, edit, delete battery groups by brand/type)
- Device management (add, edit, delete devices)
- Assign/remove batteries to/from devices
- Move batteries between states (available/charging)
- SQLite database with Drizzle ORM
- Responsive UI with Tailwind CSS

🤖 Generated with [Qoder][https://qoder.com]
2026-01-19 16:26:36 +00:00
root 289f83ad5c Initial commit from Create Next App 2026-01-19 15:59:58 +00:00