Back to Portfolio
Project Details

FARMART

Fresh Grocery Delivery App

Overview

A full-featured web-based grocery ordering platform designed to bridge the gap between consumers and retail inventory. It enables customers to browse catalogs, manage a shopping cart, and securely check out, while providing dedicated dashboards for administrators, support agents, and delivery personnel to manage operations, orders, and customer queries efficiently.

View GitHub

The Problem It Solves

Physical retail inventory is often disconnected from online consumers, making grocery shopping tedious and order management chaotic. FARMART bridges this gap by providing a seamless shopping cart for customers while empowering admins, support agents, and delivery personnel with dedicated operational dashboards.

Dashboard Preview

Grocery Dashboard Screenshot

Built With a Practical Stack

Frontend

JSP & JSTL HTML5 Vanilla JS CSS3

Backend

Java 11/17 Servlet API

Database & Cloud

PostgreSQL JDBC Supabase

Key Features & Core Functionalities

Robust Shopping Cart

Session-based cart allowing dynamic item management, checkout calculations, taxes, and conditional delivery fees.

Multi-Role Portals

Distinct authorization flows for Customers, Admins (inventory), Support Agents, and Delivery Personnel.

End-to-End Orders

Comprehensive transaction handling with an advanced OrderDAO, allowing history views and ongoing tracking.

Support Ticketing

A built-in module for submitting issues, allowing support agents to interactively review, escalate, and resolve customer tickets.

Dynamic Catalog Browsing

An efficient API-like JSP catalog engine for smooth searching and filtering of grocery products by category.

Multi-Stage Docker

A streamlined DevOps pipeline ensuring high availability and robust containerized Tomcat deployments.

Architecture & Patterns

Model-View-Controller (MVC)

The system strictly adheres to the MVC structural pattern. The Model package contains plain Java Entities, the Servlet package acts as controllers for parsing requests, and the webapp directory houses all JSP views.

Data Access Object (DAO) Pattern

Database interaction is entirely abstracted via DAOs (e.g., OrderDAO). This encapsulates connection logic and SQL logic, distinctly separating database operations from the application's business core.

Stateful Session Management

Relies on Java's native HttpSession mechanism to securely persist user states, contexts, and dynamic shopping carts without resorting to heavy, repetitive database read operations.

Engineering Complexities

  • Transactional Integrity: Checked out orders must simultaneously create a main order and multiple item details. Handled via JDBC Batch Processing and RETURN_GENERATED_KEYS to prevent partial inserts.
  • Session Cart Resolution: Calculating pricing (subtotal, tax, delivery) dynamically in the session layer via CartControllerServlet for optimal performance.
  • Cloud Database Setup: Integrated a remote Supabase PostgreSQL database using a singleton JDBC Connection Factory, demanding strict resource handling.

The Outcome

A highly structured, fast, and reliable monolithic application built on enterprise Java patterns capable of handling robust e-commerce logic.