Skip to content

Repository files navigation

DBs — POS System (Frontend + Backend + Electron)

ReactTailwind CSSdaisyUIMongoDB

Point of Sale (POS) system with a React (Vite) frontend and a Node.js (Express).
The frontend also includes Electron integration for desktop usage.

POS Dashboard Preview

Features

  • POS & Checkout
    • Product selection, cart management, and invoice/receipt flow.
  • Inventory
    • Products, categories, brands, units, and stock management.
  • Sales & Purchases
    • Sales, purchases, suppliers, and invoices.
  • Reports
    • Sales report, purchase report, customer report, customer due report.
  • Multi-page App
    • Frontend routes for dashboard, POS, products, categories, brands, units, customers, suppliers, etc.

Repository

Clone this repository:

git clone https://github.com/abdulbasit56/DBs.git
cd DBs

Installation & Running

This repo contains two apps: backend/ and frontend/.

1) Backend (Express)

cd backend
npm install
npm run dev

2) Frontend (Vite + React)

In another terminal:

cd frontend
npm install
npm run dev -- --host

Database (MongoDB)

The backend connects to MongoDB using Mongoose.

Environment variable

Create backend/.env and set:

MONGODB_URI="your_mongodb_connection_string"## Technology Stack### Frontend
- **React** (Vite)
- **react-router-dom**
- **Tailwind CSS** (+ `@tailwindcss/vite`)
- **daisyUI**
- **MUI (Material UI)** (`@mui/material`, `@mui/icons-material`, `@mui/x-data-grid`)
- **@tanstack/react-table**
- **jsPDF** + **xlsx** (exports)
- **Electron integration** (`electron.js`, `preload.js`)
### Backend
- **Node.js** + **Express**
- **Sequelize** (ORM)
- **MongoDB**
- **jsonwebtoken**, **bcrypt**
- **multer** (uploads)
- **express-session**
- **dotenv**, **cors**## Project Structure```textDBs/├── backend/│ ├── .env│ ├── package.json│ └── src/│ ├── config/│ ├── middleware/│ ├── models/│ ├── routes/│ ├── services/│ ├── utils/│ ├── index.js│ ├── initialData.js│ └── seed.js├── frontend/│ ├── build/│ ├── public/│ ├── src/│ │ ├── assets/│ │ ├── components/│ │ ├── context/│ │ ├── hooks/│ │ ├── pages/│ │ ├── services/│ │ ├── App.jsx│ │ ├── main.jsx│ │ └── index.css│ ├── electron.js│ ├── preload.js│ ├── index.html│ ├── package.json│ └── vite.config.js└── README.md

Key Frontend Routes / Pages (from frontend/src/App.jsx)

  • Dashboard: /
  • POS: /pos
  • Products: /products, add product: /add-product
  • Categories: /categories, add: /add-category
  • Brands: /brands, add: /add-brand
  • Units: /units, add: /add-unit
  • Customers: /customers, add: /add-customer
  • Suppliers: /suppliers, add: /add-supplier
  • Invoices: /invoices
  • Sales: /sales, add: /add-sale, return: /sales-return
  • Purchases: /purchases, add: /add-purchase
  • Reports: /sales-report, /purchase-report, /customer-report, /customer-due-report
  • Auth: /signin, /signup

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/new-feature)
  3. Commit your changes (git commit -am 'Add new feature')
  4. Push to the branch (git push origin feature/new-feature)
  5. Open a Pull Request

License

MIT License - see LICENSE for details.

About

Modern Point of Sale system for retail management featuring sales, inventory, and customer management.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages