A modern, feature-rich Point of Sale (POS) application built with Ruby on Rails.
Designed to streamline retail operations β managing sales, inventory, customers, and reporting β all from a sleek, dark-themed web interface.
π Dashboard
At-a-glance sales snapshot, low-stock alerts, quick actions, and core module navigation tiles.
π§Ύ Point of Sale (Billing)
Full-featured POS with product search, live bill preview, payment method selection, and invoice generation.
π¦ Inventory Management
Track stock levels, reorder points, and warehouse locations with color-coded stock indicators.
π Reports & Analytics
Six analytics tiles: Today's Sales, Sales by Period, Top Products, Sales by Category, Inventory Summary, and Top Customers.
π§Ύ Invoices
View all generated invoices with customer info, totals, payment status, and printable views.
| Module | Highlights |
|---|---|
| π Authentication | Session-based login, role-based access (Admin / Employee), secure logout |
| π Dashboard | Sales snapshot, low-stock alerts, quick action buttons, core module tiles |
| π§Ύ Point of Sale | Product search, live bill builder, customer selection, Cash/UPI payment, auto-tax calculation |
| π¦ Inventory | Product CRUD, category filtering, stock quantity tracking, reorder level alerts, warehouse location |
| π₯ Customers | Customer CRUD with search, contact info, and address management |
| π Invoices | Invoice creation, line-item management, status tracking (Draft/Issued/Paid/Cancelled), printable view |
| π Reports | Today's Sales, Sales by Period (CSV export), Top Products, Sales by Category, Inventory Summary, Top Customers |
| π·οΈ Categories | Product category management with per-category tax percentages |
| π€ Admin Panel | User management for administrators |
| Layer | Technology |
|---|---|
| Backend Framework | Ruby on Rails 7.1 |
| Language | Ruby 3.2 |
| Database | SQLite3 |
| Frontend | Hotwire (Turbo + Stimulus), ERB Templates |
| CSS Framework | TailwindCSS 3.3 |
| Asset Pipeline | Propshaft + Importmap |
| Web Server | Puma |
| Authentication | Custom session-based auth with bcrypt |
| Pagination | Pagy / will_paginate |
RetailBuddy/
βββ app/
β βββ controllers/
β β βββ application_controller.rb # Auth helpers, login guards
β β βββ billing_controller.rb # POS interface
β β βββ categories_controller.rb # Category CRUD
β β βββ customers_controller.rb # Customer CRUD + search
β β βββ help_controller.rb # Help page
β β βββ inventory_controller.rb # Stock management + filtering
β β βββ invoices_controller.rb # Invoice CRUD + printable view
β β βββ pages_controller.rb # Login & Dashboard pages
β β βββ products_controller.rb # Product CRUD + search API
β β βββ reports_controller.rb # 6 analytics report actions
β β βββ sessions_controller.rb # Login / Logout
β β βββ admin/
β β βββ users_controller.rb # Admin user management
β βββ models/
β β βββ category.rb
β β βββ customer.rb
β β βββ inventory.rb
β β βββ invoice.rb # Tax & subtotal calculations
β β βββ invoice_line.rb
β β βββ payment.rb
β β βββ product.rb # Delegates tax from category
β β βββ user.rb # Role-based, session auth
β βββ views/
β βββ billing/ # POS interface
β βββ categories/ # Category management
β βββ customers/ # Customer management
β βββ inventory/ # Inventory tracking
β βββ invoices/ # Invoice list + printable
β βββ pages/ # Login + Dashboard
β βββ reports/ # Analytics views
βββ config/
β βββ database.yml # SQLite3 configuration
β βββ routes.rb # All application routes
βββ db/
β βββ schema.rb # Database schema
β βββ seeds.rb # Sample data seeder
βββ Gemfile # Ruby dependencies
βββ Dockerfile # Docker deployment
erDiagram
USERS ||--o{ INVOICES : creates
CUSTOMERS ||--o{ INVOICES : "billed to"
INVOICES ||--|{ INVOICE_LINES : contains
INVOICES ||--o{ PAYMENTS : "paid via"
PRODUCTS ||--o{ INVOICE_LINES : "listed in"
CATEGORIES ||--o{ PRODUCTS : categorizes
PRODUCTS ||--|| INVENTORIES : "tracked by"
USERS {
integer userid PK
string name
string email
string role
string password
}
CATEGORIES {
integer id PK
string category_name
text description
decimal tax_percentage
}
PRODUCTS {
integer id PK
string product_name
decimal price
integer stock_quantity
integer category_id FK
}
INVENTORIES {
integer id PK
integer product_id FK
integer reorder_level
string warehouse_location
}
CUSTOMERS {
integer id PK
string name
string email
string phone
text address
}
INVOICES {
integer id PK
datetime invoice_date
integer customer_id FK
integer user_id FK
decimal subtotal
integer status
}
INVOICE_LINES {
integer id PK
integer invoice_id FK
integer product_id FK
integer quantity
decimal unit_price
}
PAYMENTS {
integer id PK
string payment_method
string payment_status
datetime payment_date
integer invoice_id FK
decimal amount
}
- Ruby 3.2+
- Bundler (
gem install bundler) - Node.js (for TailwindCSS asset compilation)
# 1. Clone the repository
git clone https://github.com/yourusername/RetailBuddy.git
cd RetailBuddy
# 2. Install dependencies
bundle install
# 3. Set up the database
bin/rails db:create db:schema:load db:seed
# 4. Start the server
bin/rails serverThen open http://localhost:3000 in your browser.
| Role | Password | |
|---|---|---|
| Admin | admin@retailbuddy.com |
password123 |
| Employee | staff@retailbuddy.com |
password123 |
The db/seeds.rb file populates the database with realistic sample data:
- 2 Users β Admin and Staff accounts
- 3 Categories β Electronics (18% tax), Accessories (12% tax), Furniture (5% tax)
- 6 Products β Wireless Keyboard, USB-C Hub, Monitor Stand, Mechanical Keyboard, Laptop Bag, Desk Lamp
- 6 Inventory Records β Warehouse locations A1βC3 with reorder levels
- 3 Customers β With Bengaluru addresses
- 2 Invoices β Pre-created paid invoices with line items and payments (Card & UPI)
| Method | Path | Description |
|---|---|---|
GET |
/ |
Login page |
POST |
/login |
Authenticate user |
DELETE |
/logout |
Destroy session |
GET |
/success |
Dashboard |
GET |
/billing/new |
Point of Sale interface |
GET |
/inventory |
Inventory management |
GET/POST |
/products |
Product CRUD |
GET |
/products/search |
Product search API (JSON) |
GET/POST |
/customers |
Customer CRUD |
GET/POST |
/invoices |
Invoice CRUD |
GET |
/invoices/:id/printable |
Printable invoice view |
GET/POST |
/categories |
Category CRUD |
GET |
/reports |
Reports hub |
GET |
/reports/todays_sales |
Today's sales report |
GET |
/reports/sales_by_period |
Sales by date range (HTML + CSV) |
GET |
/reports/top_products |
Top selling products |
GET |
/reports/sales_by_category |
Revenue by category |
GET |
/reports/top_customers |
Top customers by revenue |
GET/POST |
/admin/users |
Admin user management |
GET |
/help |
Help page |
RetailBuddy includes a Dockerfile and Kamal configuration for containerized deployment:
# Build the Docker image
docker build -t retailbuddy .
# Run the container
docker run -p 3000:3000 retailbuddy| Name | GitHub |
|---|---|
| Mihir Sahay | @sahaymihir |
| Rishi Khandelwal | @RishiK1706 |
| Omkar Nayak B | @omkar3599 |
This project is open source and available under the MIT License.






