A modern Point of Sale (POS) system built with Next.js and Firebase Firestore. Features inventory management, transaction processing, and real-time data synchronization.
🏪 Complete POS System
- Dashboard with business metrics
- Real-time inventory management
- Point of sale with cart functionality
- Transaction history and reporting
🔍 Smart Search
- Global search across items and features
- Quick navigation to any section
- Instant item lookup
☁️ Cloud-Powered
- Firebase Firestore integration
- Real-time data synchronization
- Persistent data storage
- Offline fallback support
🎨 Modern UI
- Clean, responsive design
- Tailwind CSS styling
- Intuitive user interface
- Loading states and error handling
-
Clone the repository
git clone <repository-url> cd pos-js-demo
-
Install dependencies
npm install
-
Set up Firebase (Required for data persistence)
- Follow the detailed guide in
FIREBASE_SETUP.md
- Copy
.env.example
to.env.local
and update with your Firebase config
- Follow the detailed guide in
-
Start the development server
npm run dev
-
Access the application
- Open http://localhost:3000
- Login with demo key:
admin123
The easiest way to deploy your POS system:
- Connect your GitHub repo to Vercel
- Add your Firebase environment variables in Vercel dashboard
- Deploy automatically on every git push
Detailed guide: VERCEL_DEPLOYMENT.md
- Netlify: Works great with environment variable support
- Railway: Good alternative with database hosting
- Self-hosted: Deploy anywhere with Node.js support
admin123
src/
├── app/
│ ├── page.js # Main POS application
│ ├── layout.js # App layout and metadata
│ └── globals.css # Global styles
└── lib/
├── firebase.js # Firebase configuration
└── firestore.js # Firestore service layer
- Frontend: Next.js 14, React, Tailwind CSS
- Database: Firebase Firestore
- Icons: Lucide React
- Hosting: Vercel (recommended)
The application uses Firebase Firestore for:
- Inventory Management: Persistent storage of products, prices, and stock levels
- Transaction History: Complete record of all sales transactions
- Real-time Updates: Live synchronization across multiple devices
- Offline Support: Graceful fallback when connection is unavailable
- Simple key-based authentication (
admin123
) - Can be extended with Firebase Auth for production use
- Add, edit, and delete inventory items
- Track stock levels with low-stock indicators
- Organize by categories and SKUs
- Real-time updates across all devices
- Add items to cart with quantity controls
- Process transactions with automatic inventory updates
- Visual feedback for successful transactions
- Cart persistence during session
- Complete record of all sales
- Detailed item breakdown for each transaction
- Total revenue tracking
- Timestamp for each transaction
- Node.js 18+
- npm or yarn
- Firebase project (see FIREBASE_SETUP.md)
The application requires Firebase configuration. See FIREBASE_SETUP.md
for detailed setup instructions.
npm run dev
- Start development servernpm run build
- Build for productionnpm run start
- Start production servernpm run lint
- Run ESLint
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
MIT License - see LICENSE file for details
For setup help or questions:
- Check the
FIREBASE_SETUP.md
guide - Review the console for error messages
- Ensure Firebase configuration is correct
- Verify Firestore security rules allow read/write access