Branding Customization
Changing the Logo
Prepare Your Logo
Create a logo file (SVG or PNG format). For best results:
- Use SVG for scalability
- Recommended dimensions: 512x512px
- Keep file size under 500KB
- Use a square aspect ratio (works best with
rounded-full)
Changing Brand Name
Update Header Brand Name
Update Header Brand Name
In each HTML file (
index.html, pos.html, products.html, reports.html):Update Footer Copyright
Update Footer Copyright
Update PWA Manifest
Update PWA Manifest
In
manifest.json:Color Scheme Customization
Using Tailwind’s Default Colors
The system uses Tailwind’s indigo color scheme. To change the primary color:Custom Color Palette
To add custom colors, extend the Tailwind configuration:tailwind.config.js
After modifying
tailwind.config.js, rebuild your CSS:Currency Customization
Changing Currency Symbol
The system currently uses ₹ (Indian Rupee). To change to another currency:Database Schema Extensions
Adding Product Fields
Example: Add Product Category
Example: Add Product Category
Step 1: Update database schema in Step 2: Update product form in Step 3: Update
js/db.js:products.html:js/products.js:Example: Add Product Stock Tracking
Example: Add Product Stock Tracking
Step 1: Update Step 2: Deduct stock on sale in
addProduct and related functions:js/db.js
js/pos.js:Adding New Features
Adding a New Page
Important: After adding new object stores to the database, increment This triggers the
DB_VER in js/db.js:onupgradeneeded event to create new stores.Adding Export Functionality
The reports page already has CSV export. To add PDF export:Add PDF Export with jsPDF
Add PDF Export with jsPDF
Step 1: Include jsPDF library:Step 2: Add export button:Step 3: Implement in
reports.html
js/reports.js:UI Customization
Changing Layout
Example: Change Dashboard Grid
Example: Change Dashboard Grid
In
index.html, modify the stats card grid:Example: Customize Card Styles
Example: Customize Card Styles
Modify card styling in any page:
Adding Animations
Fade-in Animation for Cards
Fade-in Animation for Cards
Step 1: Add animation utility:Step 2: Apply to elements:Step 3: Rebuild CSS:
src/input.css
Best Practices
Keep Modules Small
Each JavaScript module should handle one responsibility (products, sales, etc.)
Use Async/Await
All database operations are asynchronous. Always use
async/await for cleaner code.Validate User Input
Add validation before saving to the database to prevent errors.
Test Offline Mode
After changes, test that the PWA still works offline by enabling offline mode in DevTools.
Performance Tips
Optimize Tailwind CSS
Optimize Tailwind CSS
Remove unused styles in production:Keep your
tailwind.config.js content array accurate to ensure proper purging.Optimize Images
Optimize Images
Compress SVG and PNG files:
Lazy Load Components
Lazy Load Components
For large product lists, implement virtual scrolling or pagination:
Next Steps
Local Setup
Review the development setup process
Project Structure
Understand the codebase organization