System requirements
Before installing the Mini POS System, ensure your system meets these requirements:Browser requirements
Modern Browsers
- Chrome 80+
- Firefox 75+
- Safari 13.1+
- Edge 80+
Browser Features
- IndexedDB support
- Service Worker API
- ES6 modules
- LocalStorage
Development requirements
- Node.js: Version 14 or higher (for Tailwind CSS compilation)
- npm/yarn/pnpm: Latest stable version
- Local server: Any HTTP server (Live Server, Python, Node.js, etc.)
- Git: For cloning the repository
The application itself is pure vanilla JavaScript and doesn’t require Node.js to run in production. Node.js is only needed for compiling Tailwind CSS during development.
Installation steps
1. Clone the repository
Get the source code from GitHub:2. Install dependencies
Install Tailwind CSS and its dependencies:3. Build Tailwind CSS
The application uses Tailwind CSS with a custom configuration defined intailwind.config.js:
tailwind.config.js
One-time build
For a production build:Development mode (watch)
For continuous development with auto-rebuild:4. Set up local server
Choose your preferred local server method:VS Code Live Server
VS Code Live Server
- Install the Live Server extension from VS Code marketplace
- Right-click on
index.html - Select Open with Live Server
- Access at
http://127.0.0.1:5500
Python HTTP Server
Python HTTP Server
http://localhost:8000Node.js serve
Node.js serve
http://localhost:3000)PHP Built-in Server
PHP Built-in Server
http://localhost:80005. Verify installation
Open your browser and navigate to your local server URL. You should see:-
Dashboard page with four stat cards:
- Today’s Sales (₹0.00)
- Total Sales (₹0.00)
- Transactions (0)
- Products (0)
-
Navigation menu with four sections:
- Dashboard
- Products
- POS
- Reports
-
Quick Actions section with buttons to:
- Start a New Sale
- Add Product
- View Reports
The application uses Indian Rupee (₹) as the default currency symbol. You can customize this in the configuration.
Database initialization
The Mini POS System uses IndexedDB for client-side storage. The database is automatically initialized when you first open the application.Database schema
Fromjs/db.js:1:
- products: Stores product inventory with auto-incrementing IDs
- sales: Stores transaction records with a date index
Service worker setup
The application includes a service worker (sw.js:1) for offline functionality:
PWA manifest
The Progressive Web App manifest (manifest.json:1) enables installation on mobile devices:
Troubleshooting
CSS not loading
Problem: Styles are missing
Problem: Styles are missing
Symptom: The page loads but has no styling.Solution:
- Check if
css/style.cssexists - Run the Tailwind build command:
- Hard refresh your browser (Ctrl+Shift+R or Cmd+Shift+R)
Problem: Styles not updating
Problem: Styles not updating
Symptom: Changes to HTML aren’t reflected in styling.Solution:
- Make sure watch mode is running:
npm run dev - Check that your HTML files are included in
tailwind.config.js - Clear browser cache and service worker
Service worker issues
Problem: Old content is cached
Problem: Old content is cached
Symptom: Changes don’t appear even after refreshing.Solution:
- Open DevTools (F12)
- Go to Application → Service Workers
- Click Unregister
- Clear storage: Application → Storage → Clear site data
- Hard refresh the page
Problem: Service worker fails to install
Problem: Service worker fails to install
Symptom: Console shows service worker errors.Solution:
- Ensure you’re on localhost or HTTPS
- Check that all cached files exist
- Update the cache version in
sw.js(e.g.,mini-pos-v3)
Database issues
Problem: Data not persisting
Problem: Data not persisting
Symptom: Products or sales disappear after refresh.Solution:
- Check browser IndexedDB support
- Ensure you’re not in incognito/private mode
- Clear browser data and restart:
- Open DevTools → Application → Storage
- Check IndexedDB → pos-db
Problem: Module import errors
Problem: Module import errors
Symptom: Console shows “Cannot use import statement outside a module”.Solution:
- Verify scripts use
type="module"in HTML: - Use a proper HTTP server (not file:// protocol)
Port conflicts
Problem: Port already in use
Problem: Port already in use
Symptom: Server fails to start on the default port.Solution: Use a different port number:
Next steps
Now that you have the Mini POS System installed:Quick Start
Follow the quickstart guide to make your first sale.
Local Setup
Learn about the development environment and customization options.
Project Structure
Understand the codebase organization and file structure.
Branding
Customize the logo, colors, and app name.