Skip to content

saif55045/Biz-Smart-Tracker-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Š Biz Smart Tracker

All-in-One Business Management Platform for SMEs

Node.js React Express MongoDB Socket.IO License

A comprehensive, full-stack business management platform designed for small-to-medium enterprises (SMEs). Biz Smart Tracker unifies sales tracking, inventory management, employee attendance, expense monitoring, customer management, team discussions, and financial reporting β€” all in one modern, real-time dashboard with role-based access control and multi-company support.


πŸ“‹ Table of Contents


πŸ–ΌοΈ Screenshots

Screenshot

Screenshot

Screenshot

Screenshot

Screenshot

Screenshot

✨ Key Features

πŸ“ˆ Sales & Revenue

  • Point of Sale (POS) β€” Streamlined selling interface with product search, quantity management, and invoice generation
  • Sales History β€” Complete transaction logs with date filtering, customer tagging, and export capabilities
  • Revenue Dashboard β€” Interactive Chart.js visualizations with daily, weekly, and monthly breakdowns

πŸ“¦ Inventory Management

  • Product Catalog β€” Full CRUD for products with images, pricing, stock levels, and categories
  • Custom Schema Fields β€” Define custom inventory attributes per company (e.g., "Color", "Warranty Period")
  • Low Stock Alerts β€” Automated real-time notifications when products fall below threshold levels
  • Product Status Monitoring β€” Hourly background checks for stock levels with notification dispatch

πŸ‘₯ Employee & Attendance

  • User Management β€” Invite, assign roles (Admin/Manager/Employee), and manage team members
  • Attendance Tracking β€” Daily check-in/check-out with timestamps, late arrivals, and absence logging
  • Attendance Reports β€” Monthly and weekly attendance summaries per employee

πŸ’° Expense Management

  • Expense Logger β€” Categorize and record business expenses with dates and descriptions
  • Expense Analytics β€” Visual breakdowns by category and time period

πŸ‘€ Customer Management

  • Customer Database β€” Store customer details, contact info, and purchase history
  • Customer Insights β€” Track which customers generate the most revenue

πŸ’¬ Discussion Board

  • Team Communication β€” Create discussion threads for business topics
  • Real-Time Comments β€” Socket.IO-powered live comment updates
  • Discussion Rooms β€” Join/leave discussion rooms with live user tracking
  • Filters & Stats β€” Filter by status, search, and view engagement statistics

πŸ“Š Reports & Analytics

  • Financial Reports β€” Revenue vs. expenses, profit margins, and trend analysis
  • Sales Reports β€” Top-selling products, sales by period, and customer-wise breakdown
  • Exportable Data β€” Download reports for accounting and auditing

πŸ”” Real-Time Notifications

  • Socket.IO Events β€” Instant push notifications for sales, low stock alerts, and team updates
  • Notification Center β€” In-app notification panel with read/unread status and history

πŸ—οΈ System Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     BIZ SMART TRACKER                           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                          β”‚                                       β”‚
β”‚     πŸ–₯️ Frontend          β”‚          πŸ–₯️ Backend                   β”‚
β”‚     React 19 + Vite      β”‚          Express 5 + MongoDB          β”‚
β”‚                          β”‚                                       β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”‚     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”‚
β”‚  β”‚ Landing Page     β”‚     β”‚     β”‚ Security Layer       β”‚         β”‚
β”‚  β”‚ Auth (Login/OTP) │────►│────►│ Helmet + CORS        β”‚         β”‚
β”‚  β”‚ Dashboard        β”‚     β”‚     β”‚ Rate Limiting         β”‚         β”‚
β”‚  β”‚ POS / Selling    β”‚     β”‚     β”‚ Mongo Sanitization    β”‚         β”‚
β”‚  β”‚ Inventory        β”‚     β”‚     β”‚ JWT Auth              β”‚         β”‚
β”‚  β”‚ Customers        β”‚     β”‚     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β”‚
β”‚  β”‚ Expenses         β”‚     β”‚                β”‚                     β”‚
β”‚  β”‚ Reports          β”‚     β”‚     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”‚
β”‚  β”‚ Discussion Board │◄───►│◄───►│ Socket.IO Server     β”‚         β”‚
β”‚  β”‚ User Management  β”‚     β”‚     β”‚ (Real-time events)   β”‚         β”‚
β”‚  β”‚ Settings         β”‚     β”‚     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β”‚
β”‚  β”‚ Profile          β”‚     β”‚                β”‚                     β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”‚
β”‚                          β”‚     β”‚ 13 Route Modules      β”‚         β”‚
β”‚  UI Libraries:           β”‚     β”‚ 12 Controllers        β”‚         β”‚
β”‚  β€’ Chart.js / chartjs-2  β”‚     β”‚ 14 Mongoose Models    β”‚         β”‚
β”‚  β€’ React Router v7       β”‚     β”‚ Passport.js OAuth     β”‚         β”‚
β”‚  β€’ Axios                 β”‚     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β”‚
β”‚  β€’ date-fns              β”‚                β”‚                     β”‚
β”‚  β€’ file-saver            β”‚     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”         β”‚
β”‚                          β”‚     β”‚ MongoDB Atlas         β”‚         β”‚
β”‚                          β”‚     β”‚ (Multi-tenant data)   β”‚         β”‚
β”‚                          β”‚     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜         β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚              Deployment: Vercel (Client) + Render (Backend)      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ› οΈ Tech Stack

Frontend

Technology Version Purpose
React 19 UI framework
Vite Latest Build tool & dev server
React Router v7 Client-side routing
Chart.js + react-chartjs-2 4.x Interactive charts & analytics
Axios Latest HTTP client for API calls
date-fns 4.x Date formatting & manipulation
file-saver 2.x Export reports as downloadable files
Socket.IO Client 4.x Real-time event handling

Backend

Technology Version Purpose
Node.js 18+ Runtime environment
Express 5 Web framework
Mongoose 8.x MongoDB ODM
Socket.IO 4.8 WebSocket server for real-time features
JWT (jsonwebtoken) 9.x Token-based authentication
Passport.js 0.7 Google & Facebook OAuth strategies
bcrypt 5.x Password hashing
Helmet 8.x HTTP security headers
compression 1.x Response compression (70-90% size reduction)
express-rate-limit 8.x Brute-force protection on auth routes
Joi 18.x Request body validation
Nodemailer + Resend Latest Email service (OTP, notifications)

Database

Technology Purpose
MongoDB Atlas Cloud-hosted NoSQL database
14 Collections Company, User, Product, Sale, Expense, Attendance, Customer, Discussion, Notification, AuditLog, CompanyField, CompanySettings, InventoryField, DeletedDefaultField

πŸ”Œ API Reference

Legend: πŸ”“ = Public (no login needed) Β· πŸ”’ = Protected (JWT token required)

Authentication (/api/auth)

Method Endpoint Description Auth
POST /login Email + password login πŸ”“ Public
POST /signup Register new user πŸ”“ Public
POST /google Google OAuth login πŸ”“ Public
POST /facebook Facebook OAuth login πŸ”“ Public
POST /complete-signup Complete social signup πŸ”“ Public
POST /send-otp Send OTP to email πŸ”“ Public
POST /verify-otp Verify email OTP πŸ”“ Public
POST /forgot-password Send password reset OTP πŸ”“ Public
POST /reset-password Reset password with OTP πŸ”“ Public

Products (/api/products)

Method Endpoint Description Auth
GET / List all products πŸ”’ Protected
POST / Create a product πŸ”’ Protected
PUT /:id Update a product πŸ”’ Protected
DELETE /:id Delete a product πŸ”’ Protected

Sales (/api/sales)

Method Endpoint Description Auth
GET / List all sales πŸ”’ Protected
POST / Record a new sale πŸ”’ Protected
GET /:id Get sale details πŸ”’ Protected

Customers (/api/customers)

Method Endpoint Description Auth
GET / List all customers πŸ”’ Protected
POST / Add a customer πŸ”’ Protected
PUT /:id Update customer info πŸ”’ Protected
DELETE /:id Remove a customer πŸ”’ Protected

Expenses (/api/expenses)

Method Endpoint Description Auth
GET / List all expenses πŸ”’ Protected
POST / Log an expense πŸ”’ Protected
DELETE /:id Delete an expense πŸ”’ Protected

Reports (/api/reports)

Method Endpoint Description Auth
GET /sales Sales report with filters πŸ”’ Protected
GET /expenses Expense report πŸ”’ Protected
GET /dashboard Dashboard summary stats πŸ”’ Protected

Discussions (/api/discussions)

Method Endpoint Description Auth
GET / List discussions πŸ”’ Protected
POST / Create a discussion πŸ”’ Protected
GET /:id Get discussion + comments πŸ”’ Protected
POST /:id/comment Add comment (real-time) πŸ”’ Protected

Other Endpoints

Module Base Path Endpoints
Users /api/user CRUD, role management, attendance
Notifications /api/notifications List, mark read, product status
Inventory Fields /api/inventory Custom field schema management
Settings /api/settings Company settings configuration

πŸ—„οΈ Database Schema

erDiagram
    Company ||--o{ User : has
    Company ||--o{ Product : owns
    Company ||--o{ Sale : records
    Company ||--o{ Expense : tracks
    Company ||--o{ Customer : manages
    Company ||--o{ Discussion : hosts
    Company ||--o{ CompanySettings : configures

    User ||--o{ Attendance : logs
    User ||--o{ Sale : creates
    User ||--o{ Notification : receives

    Sale ||--o{ Product : contains
    Sale ||--o{ Customer : "sold to"

    Discussion ||--o{ User : "commented by"
Loading

Key Models

Model Fields Purpose
Company name, industry, logo, plan Multi-tenant organization
User email, password, role, company Team member with RBAC
Product name, price, stock, category, customFields Inventory item
Sale products, total, customer, date, createdBy Transaction record
Expense category, amount, description, date Business expense
Attendance user, date, checkIn, checkOut, status Daily attendance
Customer name, email, phone, totalPurchases Client record
Discussion title, content, author, comments Team thread
Notification type, message, user, read System alert
AuditLog action, user, details, timestamp Activity audit trail

πŸ”’ Security Features

Feature Implementation Protection Against
Helmet HTTP security headers XSS, clickjacking, MIME sniffing
CORS Origin-restricted API access Cross-origin attacks
Rate Limiting 15 req/15min on auth endpoints Brute-force login attacks
MongoDB Sanitization Custom $ and . key stripping NoSQL injection
bcrypt 10-round password hashing Password theft
JWT Token-based stateless auth Session hijacking
Joi Validation Request body schema validation Malformed input
Compression gzip response compression Bandwidth optimization
Passport.js OAuth 2.0 (Google, Facebook) Secure social login

πŸ“ Project Structure

Biz-Smart-Tracker-System/
β”œβ”€β”€ Backend/
β”‚   β”œβ”€β”€ config/
β”‚   β”‚   β”œβ”€β”€ db.js                    # MongoDB connection
β”‚   β”‚   └── passport.js              # Google & Facebook OAuth config
β”‚   β”œβ”€β”€ controller/
β”‚   β”‚   β”œβ”€β”€ authController.js        # Login, signup, OTP, OAuth
β”‚   β”‚   β”œβ”€β”€ productController.js     # Product CRUD
β”‚   β”‚   β”œβ”€β”€ saleController.js        # Sales recording & history
β”‚   β”‚   β”œβ”€β”€ customerController.js    # Customer management
β”‚   β”‚   β”œβ”€β”€ expenseController.js     # Expense logging
β”‚   β”‚   β”œβ”€β”€ attendanceController.js  # Check-in/out tracking
β”‚   β”‚   β”œβ”€β”€ reportController.js      # Report generation
β”‚   β”‚   β”œβ”€β”€ discussionController.js  # Discussion board logic
β”‚   β”‚   β”œβ”€β”€ notificationController.js # Real-time notifications
β”‚   β”‚   β”œβ”€β”€ settingsController.js    # Company configuration
β”‚   β”‚   β”œβ”€β”€ inventoryFieldController.js # Custom field schemas
β”‚   β”‚   └── userController.js        # User & role management
β”‚   β”œβ”€β”€ middleware/
β”‚   β”‚   β”œβ”€β”€ authMiddleware.js        # JWT verification guard
β”‚   β”‚   β”œβ”€β”€ csrf.js                  # CSRF protection
β”‚   β”‚   └── validation.js            # Joi request validation
β”‚   β”œβ”€β”€ models/                      # 14 Mongoose schemas
β”‚   β”œβ”€β”€ routes/                      # 13 Express route modules
β”‚   β”œβ”€β”€ server.js                    # Express + Socket.IO entry point
β”‚   β”œβ”€β”€ env.example                  # Environment template
β”‚   └── package.json
β”‚
β”œβ”€β”€ Client/
β”‚   β”œβ”€β”€ components/                  # Reusable UI (Button, Toast, Select, etc.)
β”‚   β”‚   └── auth/                    # GoogleLogin, ProtectedRoute
β”‚   β”œβ”€β”€ context/                     # CurrencyContext provider
β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   β”œβ”€β”€ auth/                    # Login, SignUp, OTP, Password Reset
β”‚   β”‚   β”œβ”€β”€ dashboard/               # Dashboard analytics & reports
β”‚   β”‚   β”œβ”€β”€ inventory/               # Product, Schema, Selling pages
β”‚   β”‚   β”œβ”€β”€ customer/                # Customer management
β”‚   β”‚   β”œβ”€β”€ expenses/                # Expense logger
β”‚   β”‚   β”œβ”€β”€ discussion/              # Discussion board with components
β”‚   β”‚   β”œβ”€β”€ invoice/                 # Invoice generation & preview
β”‚   β”‚   β”œβ”€β”€ landing/                 # Public landing page
β”‚   β”‚   β”œβ”€β”€ settings/                # Company settings
β”‚   β”‚   └── user/                    # Profile, User management, Attendance
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ vercel.json                  # Vercel deployment config
β”‚   └── package.json
β”‚
└── README.md

🀝 Contributing

Contributions are welcome! To get started:

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

πŸ“„ License

This project is licensed under the MIT License β€” see the LICENSE file for details.

About

A web-based Employee and Inventory Management System for small businesses. BizTrack offers role-based dashboards, real-time inventory tracking, employee attendance, customer management, sales reporting, and a collaborative discussion board. react, express, mongodb, socket-io, erp-system, inventory-management, dashboard, rbac

Topics

Resources

License

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors