Commit Graph

4 Commits

Author SHA1 Message Date
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