Skip to content

Abbilaash/SmartMart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

26 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

SmartMart - Smart Shopping Solution

SmartMart Logo

Be Smart, Shop Smart

Flutter React Flask MongoDB Stripe


๐Ÿ“‹ Table of Contents


๐ŸŽฏ Overview

SmartMart is a comprehensive smart shopping solution that revolutionizes the retail experience through barcode scanning, automated cart management, and seamless payment processing. The platform consists of three integrated components: a Flutter mobile application for customers, a React-based admin dashboard for store management, and a Flask backend API for data processing and business logic.

Key Highlights

  • Barcode Scanning: Quick product identification and addition to cart
  • Real-time Cart Management: Synchronized cart across devices
  • Secure Payment Processing: Integrated Stripe payment gateway
  • Admin Dashboard: Comprehensive analytics and inventory management
  • Discount Management: Dynamic pricing and promotional offers
  • Order Tracking: Complete order lifecycle management

๐Ÿ—๏ธ Project Architecture

SmartMart/
โ”œโ”€โ”€ ๐Ÿ“ฑ smartmart_mobile/          # Flutter Mobile Application
โ”‚   โ”œโ”€โ”€ lib/
โ”‚   โ”‚   โ”œโ”€โ”€ models/              # Data models (Product, Cart, Order, etc.)
โ”‚   โ”‚   โ”œโ”€โ”€ screens/             # UI screens (Home, Cart, Profile, etc.)
โ”‚   โ”‚   โ”œโ”€โ”€ services/            # API services and business logic
โ”‚   โ”‚   โ”œโ”€โ”€ providers/           # State management (Cart, Auth)
โ”‚   โ”‚   โ”œโ”€โ”€ widgets/             # Reusable UI components
โ”‚   โ”‚   โ””โ”€โ”€ utils/               # Utilities and constants
โ”‚   โ”œโ”€โ”€ android/                 # Android-specific configurations
โ”‚   โ”œโ”€โ”€ ios/                     # iOS-specific configurations
โ”‚   โ””โ”€โ”€ web/                     # Web platform assets
โ”‚
โ”œโ”€โ”€ ๐Ÿ–ฅ๏ธ admin/                     # React Admin Dashboard
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/          # Reusable React components
โ”‚   โ”‚   โ”œโ”€โ”€ pages/               # Dashboard pages (Products, Orders, etc.)
โ”‚   โ”‚   โ””โ”€โ”€ utils/               # Utility functions
โ”‚   โ””โ”€โ”€ public/                  # Static assets
โ”‚
โ”œโ”€โ”€ โš™๏ธ backend/                   # Flask Backend API
โ”‚   โ”œโ”€โ”€ admin.py                 # Admin-specific API endpoints
โ”‚   โ”œโ”€โ”€ users.py                 # User and payment API endpoints
โ”‚   โ”œโ”€โ”€ db.py                    # Database connection utilities
โ”‚   โ”œโ”€โ”€ app.py                   # Flask application entry point
โ”‚   โ””โ”€โ”€ requirements.txt         # Python dependencies
โ”‚
โ””โ”€โ”€ ๐Ÿ“š Documentation/
    โ””โ”€โ”€ SMARTMART_TEST_SUITES.md # Comprehensive test documentation

โœจ Features

๐Ÿ“ฑ Mobile Application Features

Authentication & User Management

  • User registration and login
  • Secure session management
  • Password change functionality
  • User profile management

Shopping Experience

  • Barcode Scanning: Quick product identification using device camera
  • Smart Cart: Real-time cart synchronization across sessions
  • Product Search: Find products by name or barcode
  • Discount Integration: Automatic discount application
  • Order History: Complete purchase history tracking

Payment & Checkout

  • Stripe Integration: Secure card and UPI payments
  • Multiple Payment Methods: Card and UPI support
  • Order Confirmation: Real-time order status updates
  • Receipt Generation: Digital receipt management

๐Ÿ–ฅ๏ธ Admin Dashboard Features

Dashboard & Analytics

  • Real-time Metrics: Sales, orders, inventory, and customer analytics
  • Visual Charts: Weekly sales trends and revenue analysis
  • Performance Indicators: Success rates and transaction monitoring

Product Management

  • CRUD Operations: Add, edit, delete, and view products
  • Barcode Management: Product identification system
  • Inventory Tracking: Stock level monitoring
  • Bulk Operations: Mass product updates

Order Management

  • Order Processing: View and manage customer orders
  • Status Updates: Track order lifecycle
  • Customer Information: Order details and customer data
  • Filtering & Search: Advanced order filtering capabilities

Discount Management

  • Dynamic Pricing: Create and manage discount campaigns
  • Date-based Offers: Time-limited promotional pricing
  • Product-specific Discounts: Targeted discount application
  • Status Management: Enable/disable discount offers

Payment Analytics

  • Transaction Monitoring: Real-time payment tracking
  • Revenue Analysis: Monthly and weekly revenue trends
  • Payment Method Analytics: Card vs UPI usage statistics
  • Success Rate Tracking: Payment success/failure monitoring

๐Ÿ› ๏ธ Technology Stack

Frontend Technologies

  • Flutter: Cross-platform mobile application development
  • React: Modern web application framework
  • TypeScript: Type-safe JavaScript development
  • Tailwind CSS: Utility-first CSS framework
  • Recharts: Data visualization library

Backend Technologies

  • Flask: Lightweight Python web framework
  • MongoDB: NoSQL database for flexible data storage
  • PyMongo: MongoDB driver for Python
  • Werkzeug: Password hashing and security utilities

Payment & External Services

  • Stripe: Payment processing and gateway integration
  • URL Launcher: External payment page integration
  • WebView: In-app payment processing

Development Tools

  • Vite: Fast build tool for React development
  • ESLint: Code linting and quality assurance
  • Flutter Launcher Icons: App icon generation
  • Flutter Native Splash: Splash screen management

๐Ÿ“‹ Prerequisites

System Requirements

  • Node.js: Version 18.0 or higher
  • Python: Version 3.8 or higher
  • Flutter: Version 3.8.1 or higher
  • MongoDB: Version 5.0 or higher
  • Git: Version control system

Development Environment

  • IDE: VS Code, Android Studio, or Xcode
  • Package Managers: npm/yarn, pip, pub
  • Version Control: Git

External Services

  • Stripe Account: For payment processing
  • MongoDB Atlas: Cloud database (optional)
  • ngrok: For local development tunneling (optional)

๐Ÿš€ Installation & Setup

1. Clone the Repository

git clone https://github.com/yourusername/SmartMart.git
cd SmartMart

2. Backend Setup

# Navigate to backend directory
cd backend

# Create virtual environment
python -m venv venv

# Activate virtual environment
# Windows
venv\Scripts\activate
# macOS/Linux
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Set up environment variables
cp .env.example .env
# Edit .env with your configuration

3. Admin Dashboard Setup

# Navigate to admin directory
cd ../admin

# Install dependencies
npm install

# Set up environment variables
cp .env.example .env
# Edit .env with your configuration

4. Mobile Application Setup

# Navigate to mobile app directory
cd ../smartmart_mobile

# Install Flutter dependencies
flutter pub get

# Generate app icons and splash screens
flutter pub run flutter_launcher_icons:main
flutter pub run flutter_native_splash:create

๐Ÿƒโ€โ™‚๏ธ Running the Application

Start Backend Server

cd backend
python app.py

Backend runs on: http://localhost:5000

Start Admin Dashboard

cd admin
npm run dev

Admin Dashboard runs on: http://localhost:5173

Run Mobile Application

cd smartmart_mobile

# For Android
flutter run

# For iOS
flutter run -d ios

# For Web
flutter run -d web

Development Mode (All Services)

# Terminal 1 - Backend
cd backend && python app.py

# Terminal 2 - Admin Dashboard
cd admin && npm run dev

# Terminal 3 - Mobile App
cd smartmart_mobile && flutter run

๐Ÿ“š API Documentation

Authentication Endpoints

  • POST /users/signup - User registration
  • POST /users/login - User authentication
  • POST /users/change_password - Password change

Product Management

  • GET /admin/product/get_products - Fetch all products
  • POST /admin/product/add_product - Add new product
  • PUT /admin/product/update_product - Update product
  • DELETE /admin/product/delete_product - Delete product

Cart Management

  • POST /users/carts/get_products - Get cart items
  • POST /users/carts/add_product - Add to cart
  • POST /users/carts/delete_product - Remove from cart

Order Management

  • POST /users/orders/place_order - Place new order
  • POST /users/orders/get_orders - Get user orders
  • POST /users/orders/get_order_details - Get order details

Payment Processing

  • POST /users/create-payment-session - Create Stripe session
  • POST /users/payment-status - Check payment status

Admin Analytics

  • GET /admin/dashboard/weekly_sales - Weekly sales data
  • GET /admin/dashboard/user_count - User statistics
  • GET /admin/payments/summary - Payment analytics

๐Ÿ‘ฅ Target Users

Primary Users

Retail Customers

  • Tech-savvy shoppers seeking convenience
  • Mobile-first users preferring app-based shopping
  • Price-conscious consumers looking for discounts
  • Busy professionals needing quick checkout

Store Administrators

  • Retail managers overseeing daily operations
  • Inventory specialists managing product catalogs
  • Business analysts tracking sales performance
  • Customer service representatives handling orders

Secondary Users

Business Owners

  • Small to medium retailers seeking digital transformation
  • Franchise operators managing multiple locations
  • E-commerce businesses expanding to physical stores

Developers

  • Mobile app developers learning Flutter
  • Backend developers working with Flask and MongoDB
  • Full-stack developers building integrated solutions

๐Ÿ”ฎ Future Expansion

Phase 1: Enhanced Features

  • Multi-store Support: Manage multiple retail locations
  • Advanced Analytics: AI-powered sales predictions
  • Inventory Alerts: Low stock notifications
  • Customer Loyalty Program: Points and rewards system

Phase 2: Platform Expansion

  • Web Application: Browser-based shopping experience
  • API Marketplace: Third-party integrations
  • Mobile POS: Point-of-sale terminal integration
  • QR Code Payments: Alternative payment methods

Phase 3: Enterprise Features

  • Multi-tenant Architecture: SaaS platform support
  • Advanced Reporting: Custom report generation
  • Integration APIs: ERP and CRM system connections
  • White-label Solutions: Customizable branding

Phase 4: AI & Automation

  • Smart Recommendations: ML-based product suggestions
  • Automated Reordering: AI inventory management
  • Predictive Analytics: Demand forecasting
  • Voice Commands: Hands-free shopping experience

๐Ÿค Contributing

We welcome contributions from the community! Please follow these guidelines:

Getting Started

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

Code Standards

  • Follow existing code style and conventions
  • Write comprehensive tests for new features
  • Update documentation for API changes
  • Ensure all tests pass before submitting

Reporting Issues

  • Use the issue tracker for bug reports
  • Provide detailed reproduction steps
  • Include system information and logs
  • Use appropriate labels for categorization

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ‘จโ€๐Ÿ’ป Developed By

Development Team

A T Abbilaash: 23n201@psgtech.ac.in

Nivashini N: 23n234@psgtech.ac.in

Swadhitha S P: 23n258@psgtech.ac.in

Niranjana Nayagi B: 23n233@psgtech.ac.in


Made with โค๏ธ by the SmartMart Development Team

ยฉ 2025 SmartMart. All rights reserved.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors