All projects

projects.app / grocery-store

academic

Grocery Store – Asynchronous Task Processing System

View architecture

A grocery store application demonstrating asynchronous task execution, scheduled jobs, caching and backend API development.

Overview

A full-stack grocery store application built with Flask, featuring product and order management alongside asynchronous background processing. Celery and Redis handle tasks outside the regular HTTP request lifecycle, while scheduled jobs automate recurring operations.

Key features

  • Product Management — Manage grocery products and inventory through REST APIs.
  • Order Management — Handle customer orders and related operations.
  • Asynchronous Processing — Execute time-consuming operations in background workers using Celery.
  • Scheduled Jobs — Automate recurring tasks without requiring manual execution.
  • Redis Integration — Use Redis as a message broker and caching backend.
  • Authentication — Secure APIs using JWT and Flask-Security.
  • Caching — Improve response performance using Flask-Caching.

Architecture

Backend class diagram

Technical decisions

  • Used Celery to move time-consuming operations outside the HTTP request-response lifecycle, allowing API requests to return without waiting for background tasks to finish.
  • Integrated Redis as a message broker to queue tasks and communicate between the Flask application and Celery workers.
  • Implemented scheduled task execution to automate recurring backend operations.
  • Separated task producers from background workers to improve application modularity and scalability.
  • Used Flask-Caching with Redis to reduce repeated data retrieval and improve API performance.
  • Used SQLAlchemy for database abstraction and ORM-based persistence.
  • Implemented JWT authentication to protect backend endpoints.
  • Used Gunicorn as the production WSGI application server.