BatchVault is a modern, full-stack web application for small food production management. Built with Next.js 14, TypeScript, and Bootstrap, the application provides a scalable, secure, and user-friendly platform for managing recipes, ingredients, batches, orders, clients, products, pricing, cost, and profit workflows.
- Recipe Management: Create, edit, and organize production recipes with detailed ingredient lists and instructions
- Order Tracking: Complete order lifecycle management from creation to fulfillment
- Client Database: Comprehensive client management with contact information and order history
- Product Catalog: Manage your food product lineup with pricing and descriptions
- Inventory Control: Track ingredients and manage stock levels
- Price Management: Dynamic pricing system for products and services
- JWT-based Authentication: Secure token-based authentication system
- Automatic Session Management: Smart token validation with automatic logout on expiration
- Cross-tab Synchronization: Consistent auth state across multiple browser tabs
- Protected Routes: Role-based access control for sensitive operations
- CSRF Protection: Built-in protection against cross-site request forgery attacks
- Custom Design System: Smoked Ember theme with burgundy/wine color palette
- Dark/Light Theme: Seamless theme switching with localStorage persistence
- Responsive Design: Fully responsive interface with mobile-optimized navigation
- Real-time Updates: Live data updates using SWR for optimal performance
- Multilingual Support: Complete i18n support for English, Russian, and Serbian
- Interactive Charts: Beautiful data visualization with D3.js and interactive tooltips
- Smart Navigation: Grouped sidebar sections with iconography and language switcher
- Progressive Loading: Smart loading states and error handling
- Toast Notifications: User-friendly feedback system
- TypeScript: Full type safety throughout the application
- Modern Architecture: Clean separation of concerns with proper component structure
- Unified Components: Consistent SelectDropdown component across all forms
- Environment Validation: Strict environment variable validation with Zod
- Docker Support: Complete containerization for easy deployment
- Hot Module Replacement: Instant development feedback
- Next.js 14 - React framework with Pages Router (not App Router)
- TypeScript - Type-safe development environment
- React 18 - Latest React features with concurrent rendering
- Bootstrap 5.3 - Modern CSS framework for responsive design
- React Bootstrap - Bootstrap components for React
- D3.js - Data visualization and analytics
- React Icons (react-icons/fa) - FontAwesome icon library
- SWR - Smart data fetching with caching and revalidation
- React Context - Global state management for authentication
- Smoked Ember Design System - Custom burgundy/wine color palette
- CSS Variables - Design tokens for consistent theming
- Dark/Light Themes - Seamless theme switching
- Responsive Design - Mobile-first approach with breakpoint support
- ESLint - Code linting and formatting
- Docker Compose - Multi-container orchestration
- GitHub Actions - Automated CI/CD pipeline
- T3 Env - Type-safe environment variable management
jerky-vault/
βββ src/
β βββ components/ # Reusable UI components
β β βββ charts/ # Chart components (DonutChart)
β β βββ modal/ # Modal components for CRUD operations
β β βββ SelectDropdown.tsx # Unified dropdown component
β β βββ ... # Other UI components
β βββ pages/ # Next.js pages (Pages Router)
β βββ styles/ # Global styles and design system
β βββ types/ # TypeScript type definitions
β βββ utils/ # Utility functions and helpers
β βββ env.js # Environment validation
βββ locales/ # Internationalization files (en, ru, rs)
βββ public/ # Static assets (images, flags, etc.)
βββ docker-compose.yml # Docker Compose configuration
βββ server.js # Custom Next.js server
- Primary Color: Burgundy/Wine (#8B2635)
- Light Theme: White/light gray surfaces with dark text
- Dark Theme: Dark gray surfaces with light text
- Accent Colors: Status-based colors (success, warning, error)
- Unified SelectDropdown: Consistent dropdown behavior across the entire application
- Interactive Charts: D3-based donut charts with hover tooltips
- Grouped Navigation: Sidebar organized into logical sections
- Language Switcher: Quick-access language buttons with flags
- Theme Toggle: One-click dark/light mode switching
- Node.js 20.0 or higher
- npm 10.0 or higher
- Docker (optional, for containerized deployment)
git clone https://github.com/dzarlax/jerky-vault.git
cd jerky-vaultnpm installCreate a .env.local file in the project root:
# API Configuration
NEXT_PUBLIC_API_URL=http://localhost:8080
NEXT_PUBLIC_FRONTEND_URL=http://localhost:3000
# Authentication
NEXT_PUBLIC_AUTH_ENABLED=true
JWT_SECRET=your_jwt_secret_key
SECRET=your_general_secret_key
# Optional Features
MAPBOX_ACCESS_TOKEN=your_mapbox_token
# Development Flags
NODE_ENV=development
SKIP_ENV_VALIDATION=falsenpm run devThe application will be available at http://localhost:3000
-
Start all services
docker-compose up -d
-
Rebuild frontend after changes
docker-compose up -d --build jerky_vault_frontend
- jerky_vault_frontend - Next.js frontend (port 3000)
- jerky_vault_backend - Go API backend (port 8080)
Configure environment variables in docker-compose.yml:
NEXT_PUBLIC_API_URL- Backend API URLNEXT_PUBLIC_FRONTEND_URL- Frontend URLNEXT_PUBLIC_AUTH_ENABLED- Enable/disable authentication
BatchVault supports multiple languages out of the box:
- English (en) π¬π§
- Russian (ru) π·πΊ
- Serbian (sr) π·πΈ
- Language selector in sidebar footer
- Three flag buttons for instant language switching
- All UI text translated automatically
All user-facing text is managed through translation keys in:
locales/en/common.jsonlocales/ru/common.jsonlocales/rs/common.json
- Real-time business metrics and KPIs
- Interactive donut charts with hover tooltips
- Order status distribution
- Ingredient type distribution
- Profit analytics (revenue vs cost vs profit)
- Recent orders table with quick actions
- Complete recipe CRUD operations
- Ingredient quantity tracking
- Step-by-step instructions
- Recipe categorization and search
- Cost calculation per recipe
- Full order lifecycle management
- Card-based order items in modal
- Status tracking (pending, in progress, ready, finished, canceled)
- Client assignment and communication
- Order history and reporting
- Quick status change from dashboard
- Comprehensive client database
- Contact information management
- Order history per client
- Client communication tools (phone, telegram, instagram)
- Search and filtering options
- Product information management
- Pricing and cost tracking
- Recipe assignment
- Package selection
- Product performance metrics
- Image URL support
- Secure user authentication
- Profile management
- Password change functionality
- Session management
- Access control
- 260px fixed width on desktop
- Grouped sections:
- Main: Dashboard, Recipes, Ingredients
- Management: Products, Orders, Clients, Prices
- Account: Profile
- Language switcher: Three flag buttons (EN, RU, RS)
- Theme toggle: Moon/Sun icon button
- Mobile responsive: Hamburger menu with slide-in sidebar
- SelectDropdown: Unified dropdown component with:
- Portal rendering (prevents z-index issues)
- Dark theme support
- Error states and helper text
- Searchable and clearable options
- Card-based layouts: Modern card designs for order items
- Dark theme: All modals fully support dark/light themes
- Donut charts built with D3.js
- Hover tooltips showing:
- Segment name with colored indicator
- Absolute values
- Percentages (color-coded: green β₯20%, orange <20%)
- Smart positioning: Tooltips avoid screen edges
- JWT Authentication: Secure token-based authentication
- Token Validation: Automatic token expiration handling
- Protected Routes: Authentication middleware for sensitive pages
- CSRF Protection: Built-in request validation
- Input Validation: Comprehensive data validation
- Error Handling: Secure error messages without sensitive data exposure
- SWR Caching: Intelligent data caching and revalidation
- Portal Rendering: Dropdowns render to document.body for z-index management
- Code Splitting: Automatic code splitting for reduced bundle sizes
- Image Optimization: Next.js built-in image optimization
- Smart Refresh Rates: Different SWR configs for different data types
# Development
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint
# Docker
docker-compose up # Start all services
docker-compose up -d --build jerky_vault_frontend # Rebuild frontend
docker-compose down # Stop all services
# Build variants
npm run build:docker # Build with Docker optimizations
npm run build:no-ssg # Build without static generationFor detailed development documentation, see CLAUDE.md.
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Commit changes:
git commit -am 'Add new feature' - Push to branch:
git push origin feature-name - Submit a pull request
This project is licensed under the MIT License. See the LICENSE file for details.
- Repository: GitHub
- Issues: Bug Reports & Feature Requests
BatchVault - Food production management for recipes, batches, orders and profit, built with modern web technologies and the Smoked Ember design system.