ProtoShelf is a comprehensive inventory management system specifically designed for electronic components. Built with a modern React frontend and efficient Go backend, the application compiles into a single executable that serves both the web interface and API, making deployment incredibly simple.
- π¦ Component Management: Add, edit, delete, and search electronic components with detailed specifications
- π Location Tracking: Organize components by units and bins with hierarchical storage system
- π‘ Location pinging: Locate bins by illuminating them with WLED modules
- π·οΈ Category Management: Categorize components for better organization and filtering
- π Inventory Tracking: Track component quantities, locations, and usage across projects
- π Project Management: Create and manage personal projects with component assignments
- π Work Orders: Track work orders within projects and component usage
- πΎ Backup/Restore: Comprehensive export and import functionality with automatic backups
- ποΈ Database Support: SQLite for local storage with configurable paths and network support
- π¨ Modern UI: Responsive React interface with dark/light theme support
- π± Mobile Friendly: Fully responsive design with mobile navigation
- π·οΈ Label Generation: Generate PDF labels with QR codes for bins and components
- βοΈ Flexible Configuration: Configurable settings for UI preferences and database options
ProtoShelf is perfect for:
- Electronics Hobbyists: Track your growing component collection
- Makers & DIY Enthusiasts: Organize parts for various projects
- Small Workshops: Manage inventory for electronics repair and prototyping
- Students & Educators: Organize educational electronic components
- Home Labs: Professional-grade inventory for home electronics labs
protoshelf/
βββ client/ # React frontend application
β βββ public/ # Static assets
β βββ src/ # React source code
β β βββ components/ # Reusable UI components
β β βββ pages/ # Page components
β β βββ stores/ # Zustand state management
β β βββ types/ # TypeScript type definitions
β β βββ config/ # Configuration files (API endpoints)
β β βββ utils/ # Utility functions
β βββ package.json # Node.js dependencies
β βββ README.md # React-specific documentation
βββ server/ # Go backend application
β βββ handlers/ # HTTP request handlers
β βββ models/ # Data models
β βββ services/ # Business logic services
β βββ config/ # Server configuration
β βββ db/ # Database utilities
β βββ main.go # Main server entry point
β βββ go.mod # Go module dependencies
β βββ server.yaml # Server configuration file
βββ data/ # Database files
β βββ sqlite/ # SQLite database files
βββ docs/ # Documentation
βββ build.ps1 # PowerShell build script
βββ build.bat # Windows batch build script
βββ docker-compose.yml # Docker configuration
βββ README.md # This file
- Go 1.23.4+ - Download Go
- Node.js 16+ - Download Node.js
- npm - Comes with Node.js
The easiest way to build ProtoShelf is using the provided build scripts:
.\build.ps1
build.bat
# 1. Install React dependencies
cd client
npm install
# 2. Build React application
npm run build
cd ..
# 3. Build Go server with embedded React files
cd server
go build -o ../protoshelf.exe .
cd ..
# 4. Run the application
./protoshelf.exe
After building, simply run the executable:
./protoshelf.exe
The application will start on port 3001. Open your browser and navigate to:
http://localhost:3001
ProtoShelf features a clean, modern interface with:
- Dashboard: Overview of your inventory with quick stats
- Components: Detailed component management with search and filtering
- Locations: Visual unit and bin organization
- Projects: Project tracking with component assignments
- Settings: Comprehensive configuration options
- Labels: Generate professional labels with QR codes
For development, you can run the frontend and backend separately:
cd server
go run main.go
Server runs on http://localhost:3001
cd client
npm start
Development server runs on http://localhost:3000
The React application automatically detects the environment:
- Development: API calls go to
http://localhost:3001
- Production: API calls use relative URLs (same origin)
ProtoShelf uses SQLite by default, with the database file stored in:
data/sqlite/protoshelf.db
The Go server provides the following API endpoints (all prefixed with /api
):
GET /api/components
- Get all componentsPOST /api/components
- Add new componentPATCH /api/components/{componentID}
- Update componentDELETE /api/components/{componentID}
- Delete component
GET /api/locations
- Get all unitsPOST /api/locations/unit
- Add new unitPATCH /api/locations/unit/{unitID}
- Update unitDELETE /api/locations/unit/{unitID}
- Delete unitPATCH /api/locations/unit/{unitID}/layout
- Update unit layoutPOST /api/locations/{unitID}/bins
- Add bin to unitPATCH /api/locations/{unitID}/bins/{binID}
- Update binDELETE /api/locations/{unitID}/bins/{binID}
- Delete bin
GET /api/categories
- Get all categories
GET /api/projects
- Get all projectsPOST /api/projects
- Add new projectGET /api/projects/{id}
- Get single projectPATCH /api/projects/{id}
- Update projectDELETE /api/projects/{id}
- Delete projectPOST /api/projects/{id}/components
- Assign component to projectDELETE /api/projects/{id}/components/{componentID}
- Remove component from projectPOST /api/projects/{id}/notes
- Add note to project
POST /api/locate
- Locate a bin in a unit (WLED integration)
GET /api/backups/export
- Export data backupPOST /api/backups/import
- Import data backupPOST /api/backups/create
- Create manual backupGET /api/backups/list
- List available backupsPOST /api/backups/restore
- Restore backup
GET /api/settings/database
- Get database settingsPUT /api/settings/database
- Update database settingsGET /api/settings/database/test
- Test database connectionGET /api/settings/system
- Get system information
POST /api/labels/generate
- Generate labels for multiple binsGET /api/labels/{unitID}/bins/{binID}
- Generate label for single bin
- React 19 with TypeScript for modern, type-safe development
- Zustand for lightweight state management
- React Hook Form for efficient form handling
- Tailwind CSS for utility-first styling
- Lucide React for beautiful, consistent icons
- React Router for client-side routing
- React Toastify for user notifications
- Chi Router for fast HTTP routing
- Viper for flexible configuration management
- Logrus for structured logging
- SQLite for reliable local data storage
- Embedded React files for single executable deployment
- React 19 with TypeScript
- Zustand for state management
- React Hook Form for form handling
- Tailwind CSS for styling
- Lucide React for icons
- React Router for client-side routing
- Chi Router for HTTP routing
- Viper for configuration management
- Logrus for logging
- SQLite/MongoDB for data storage
- Embedded React files for single executable deployment
The application uses Go's embed
directive to include the React build files directly in the Go binary. This approach provides several benefits:
π― Key Advantages:
- Zero Dependencies: Single executable with no external files needed
- Easy Deployment: Just copy one file and run
- Consistent Experience: Frontend and backend always in sync
- No Web Server Required: Built-in static file serving
π How It Works:
- React app builds to
client/build/
- Build files are copied to
server/static/
during build process - Go embeds these files using
//go:embed static/*
- Go server serves embedded files for non-API routes
- API routes (
/api/*
) are handled by Go handlers - Client-side routes are handled by serving
index.html
and letting React Router take over
The server provides smart routing that handles both API and frontend concerns:
- π Static Files: Files with extensions (
.js
,.css
,.png
) are served directly from embedded assets - π API Routes: All routes prefixed with
/api
are handled by Go backend handlers - π§ Client Routes: Paths without extensions (
/components
,/settings
,/projects
) serveindex.html
for React Router - π Page Refreshes: Work correctly on any route (no 404 errors on browser refresh)
- π« Conflict Prevention: API and frontend routes are cleanly separated
Server settings are configured in server/server.yaml
:
server:
port: 3001
host: localhost
database:
type: sqlite
path: ../data/sqlite/protoshelf.db
logging:
level: info
format: text
NODE_ENV
- Set toproduction
for production buildsPORT
- Override default server port (3001)
The simplest deployment method - after building, you only need:
protoshelf.exe
- The main executable (contains everything)server.yaml
- Configuration file (optional, has sensible defaults)data/
- Directory for database files (created automatically)
For containerized environments, use the provided Docker configuration:
docker-compose up -d
ProtoShelf supports various database path configurations:
- Local:
./data/protoshelf.db
- Network (Windows):
\\server\share\protoshelf.db
- Network (Unix):
//server/share/protoshelf.db
- Absolute:
/path/to/database/protoshelf.db
- π Advanced Search: Full-text search across all component data
- π Analytics Dashboard: Usage statistics and inventory insights
- π Smart Notifications: Low stock alerts and maintenance reminders
- π€ Advanced Export: CSV, Excel, and custom format support
- π’ Multi-User Support: User accounts and permissions
- π Integration APIs: Connect with other tools and services
- Performance optimizations
- Enhanced label generation
- Improved mobile experience
- Additional component fields
We welcome contributions! Here's how to get started:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Make your changes and test thoroughly
- Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Submit a pull request
- Follow existing code style and conventions
- Add tests for new features
- Update documentation as needed
- Test on multiple platforms when possible
- π Bug Reports: Use GitHub Issues for bug reports
- π‘ Feature Requests: Suggest new features via GitHub Issues
- β Questions: Check existing issues or create a new one
- π Documentation: Refer to this README and inline code comments
- New: Enhanced project management with work orders
- New: Advanced component assignment system
- New: Improved table views and data presentation
- New: Better mobile navigation with hamburger menu
- New: Professional label generation with QR codes
- Enhanced: Settings page with comprehensive configuration options
- Enhanced: Backup and restore functionality
- Enhanced: Database configuration with network support
- Fixed: Various UI improvements and bug fixes
- Performance: Optimized component loading and filtering
This project is licensed under the MIT License - see the LICENSE file for details.
This project is licensed under the MIT License. See LICENSE
for details.
π£ Note to developers: If youβre interested in contributing or reviewing the source, keep an eye out for the v1.0 release β the full repository will go public then!
For issues and questions, please use the GitHub issue tracker.