Skip to content

full-stack hyperlocal e-commerce platform with Spring Boot backend and JavaScript frontend, featuring vendor management, cart system, and pincode-based delivery

Notifications You must be signed in to change notification settings

codesbysuraj/Quickart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

QuickKart - Hyperlocal E-commerce Platform πŸ›’

A full-stack hyperlocal e-commerce application built with Spring Boot and vanilla JavaScript, enabling customers to browse products and vendors to manage their inventory.

Features

Customer Features

  • Secure user authentication with BCrypt password encryption
  • Browse products filtered by pincode for hyperlocal delivery
  • Shopping cart management
  • Place and track orders in real-time
  • Multiple delivery address management
  • Order notifications

Vendor Features

  • Vendor dashboard for inventory management
  • Add and manage products
  • Real-time stock tracking and updates
  • View and manage customer orders
  • Pincode-based product availability

Tech Stack

Backend

  • Framework: Spring Boot 3.3.5
  • Language: Java 21
  • Database: MySQL 8.0
  • Security: BCrypt Password Encryption
  • ORM: Hibernate/JPA
  • Build Tool: Maven

Frontend

  • Languages: HTML5, CSS3, JavaScript (ES6+)
  • Styling: Custom CSS with responsive design
  • Images: Cloudinary CDN
  • API: RESTful architecture

Project Structure

Quickart/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ main/
β”‚   β”‚   β”‚   β”œβ”€β”€ java/com/quickkart/
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ controller/        # REST API endpoints
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ entity/            # JPA entities
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ repository/        # Data access layer
β”‚   β”‚   β”‚   β”‚   └── config/            # Configuration classes
β”‚   β”‚   β”‚   └── resources/
β”‚   β”‚   β”‚       β”œβ”€β”€ application.properties
β”‚   β”‚   β”‚       β”œβ”€β”€ application-prod.properties
β”‚   β”‚   β”‚       └── static/
β”‚   β”‚   └── .gitignore
β”‚   β”œβ”€β”€ pom.xml
β”‚   └── system.properties
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ index.html                     # Landing page
β”‚   β”œβ”€β”€ home.html                      # About page
β”‚   β”œβ”€β”€ login.html                     # Authentication
β”‚   β”œβ”€β”€ customer.html                  # Customer portal
β”‚   β”œβ”€β”€ vendor.html                    # Vendor portal
β”‚   β”œβ”€β”€ order-history.html
β”‚   β”œβ”€β”€ user-settings.html
β”‚   β”œβ”€β”€ backend-integration.js         # API integration
β”‚   β”œβ”€β”€ style.css                      # Global styles
β”‚   └── netlify.toml                   # Netlify deployment config
β”œβ”€β”€ schema.sql                          # Database schema
└── README.md

Getting Started

Prerequisites

  • Java 21 or higher
  • Maven 3.6+
  • MySQL 8.0
  • Git

Backend Setup

  1. Clone the repository
git clone https://github.com/yourusername/quickart.git
cd Quickart/backend
  1. Configure Database Create a MySQL database and update src/main/resources/application.properties:
spring.datasource.url=jdbc:mysql://localhost:3306/quickkart_db
spring.datasource.username=your_username
spring.datasource.password=your_password
  1. Create Database & Import Schema
CREATE DATABASE quickkart_db;
USE quickkart_db;
SOURCE schema.sql;
  1. Build and Run
mvn clean install
mvn spring-boot:run

Backend will start at http://localhost:8080

Frontend Setup

  1. Update API URL In frontend/backend-integration.js:
const API_BASE_URL = 'http://localhost:8080/api';
  1. Open in Browser
  • Use Live Server extension in VS Code, or
  • Open index.html directly in browser

Deployment

Backend Deployment (Railway/Render/Heroku)

  1. Push code to GitHub
  2. Create account on deployment platform (e.g., Railway.app)
  3. Add MySQL database service
  4. Configure environment variables:
    SPRING_DATASOURCE_URL=jdbc:mysql://host:port/database
    SPRING_DATASOURCE_USERNAME=username
    SPRING_DATASOURCE_PASSWORD=password
    
  5. Deploy from GitHub repository

Frontend Deployment (Netlify/Vercel)

  1. Update API URL in frontend/backend-integration.js:
    const API_BASE_URL = 'https://your-backend-url.com/api';
  2. Deploy to Netlify:
    • Drag and drop frontend folder, or
    • Connect GitHub repository
  3. Configure CORS in backend for your frontend domain

API Endpoints

Authentication

  • POST /api/auth/register - Register new user
  • POST /api/auth/login - Login user

Products

  • GET /api/products - Get all products
  • GET /api/products/{id} - Get product by ID
  • GET /api/products/pincode/{pincode} - Get products by pincode
  • POST /api/products - Add new product (Vendor)
  • PUT /api/products/{id} - Update product
  • DELETE /api/products/{id} - Delete product

Cart

  • GET /api/cart/{userId} - Get user's cart
  • POST /api/cart - Add item to cart
  • PUT /api/cart/{id} - Update cart item
  • DELETE /api/cart/{id} - Remove from cart

Orders

  • GET /api/orders/user/{userId} - Get user orders
  • GET /api/orders/vendor/{vendorId} - Get vendor orders
  • POST /api/orders - Place order
  • PUT /api/orders/{id}/status - Update order status

Addresses

  • GET /api/addresses/user/{userId} - Get user addresses
  • POST /api/addresses - Add address
  • PUT /api/addresses/{id} - Update address
  • DELETE /api/addresses/{id} - Delete address

Security Features

  • BCrypt password hashing
  • CORS configuration
  • Input validation
  • SQL injection protection via JPA

Database Schema

Key entities:

  • Users: Customer and Vendor accounts
  • Products: Product catalog with vendor association
  • Cart: Shopping cart items
  • Orders: Order information
  • OrderItems: Items in each order
  • Addresses: Delivery addresses
  • Notifications: User notifications

Known Issues & Limitations

  • Image uploads are via URL (no file upload yet)
  • No payment gateway integration
  • No email notifications
  • Limited to single currency

Future Enhancements

  • Payment gateway integration (Razorpay/Stripe)
  • Email notifications
  • SMS notifications for order updates
  • Image upload functionality
  • Advanced search and filters
  • Product reviews and ratings
  • Wishlist feature
  • Vendor analytics dashboard
  • Multi-language support

User Roles

Customer

  • Browse products by location
  • Add to cart
  • Place orders
  • Track order history
  • Manage delivery addresses

Vendor

  • Add/Edit/Delete products
  • Manage inventory
  • View incoming orders
  • Update order status

Contributing

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

License

This project is open source and available under the MIT License.

Contact

For questions or support, please open an issue in the repository.


Built with ❀️ for local businesses and communities

About

full-stack hyperlocal e-commerce platform with Spring Boot backend and JavaScript frontend, featuring vendor management, cart system, and pincode-based delivery

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published