# ramjeet89/springboot-redis architecture

> Architecture diagram of the GitHub repository ramjeet89/springboot-redis, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ramjeet89/springboot-redis
- Repository: https://github.com/ramjeet89/springboot-redis

## Overview

This is a small Spring Boot product API backed by Redis. Clients use the product endpoints to create, list, fetch, and delete products; the controller delegates those operations to a Redis hash DAO, which stores Product objects. The controller also declares caching behavior for individual lookups and evictions. RedisConfig supplies a Redis connection and template. The excerpts show the DAO’s Redis operations and the configured local Redis endpoint, but not runtime framework wiring or the cache provider, so those links are omitted.

Main entry points: [`src/main/java/com/springboot/redis/controller/ProductController.java`](https://github.com/ramjeet89/springboot-redis/blob/master/src/main/java/com/springboot/redis/controller/ProductController.java) (Product controller), [`src/main/java/com/springboot/redis/repository/ProductDao.java`](https://github.com/ramjeet89/springboot-redis/blob/master/src/main/java/com/springboot/redis/repository/ProductDao.java) (Product DAO), [`src/main/java/com/springboot/redis/entity/Product.java`](https://github.com/ramjeet89/springboot-redis/blob/master/src/main/java/com/springboot/redis/entity/Product.java) (Product model), [`src/main/java/com/springboot/redis/config/RedisConfig.java`](https://github.com/ramjeet89/springboot-redis/blob/master/src/main/java/com/springboot/redis/config/RedisConfig.java) (Redis configuration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Product API"]
  node_controller["Product controller"]
  node_product["Product model<br/>[Product.java]"]
end

subgraph group_data["Redis data"]
  node_dao["Product DAO<br/>[ProductDao.java]"]
  node_redisconfig["Redis configuration<br/>[RedisConfig.java]"]
  node_redis[("Redis server")]
end

node_client(("API client"))

node_client -->|"calls endpoints"| node_controller
node_controller -->|"delegates CRUD"| node_dao
node_controller -->|"accepts and returns"| node_product
node_dao -->|"stores objects"| node_product
node_dao -->|"reads and writes hashes"| node_redis
node_redisconfig -->|"configures connection"| node_redis

click node_controller "https://github.com/ramjeet89/springboot-redis/blob/master/src/main/java/com/springboot/redis/controller/ProductController.java"
click node_product "https://github.com/ramjeet89/springboot-redis/blob/master/src/main/java/com/springboot/redis/entity/Product.java"
click node_dao "https://github.com/ramjeet89/springboot-redis/blob/master/src/main/java/com/springboot/redis/repository/ProductDao.java"
click node_redisconfig "https://github.com/ramjeet89/springboot-redis/blob/master/src/main/java/com/springboot/redis/config/RedisConfig.java"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_controller,node_product,node_client toneBlue
class node_dao,node_redisconfig,node_redis toneAmber
```

## Components

### Product API

- [Product controller](https://github.com/ramjeet89/springboot-redis/blob/master/src/main/java/com/springboot/redis/controller/ProductController.java): `src/main/java/com/springboot/redis/controller/ProductController.java`
- [Product model](https://github.com/ramjeet89/springboot-redis/blob/master/src/main/java/com/springboot/redis/entity/Product.java): `src/main/java/com/springboot/redis/entity/Product.java`

### Redis data

- [Product DAO](https://github.com/ramjeet89/springboot-redis/blob/master/src/main/java/com/springboot/redis/repository/ProductDao.java): `src/main/java/com/springboot/redis/repository/ProductDao.java`
- [Redis configuration](https://github.com/ramjeet89/springboot-redis/blob/master/src/main/java/com/springboot/redis/config/RedisConfig.java): `src/main/java/com/springboot/redis/config/RedisConfig.java`
- **Redis server**

### Other components

- **API client**

## Connections

- API client → Product controller: calls endpoints (evidence: `src/main/java/com/springboot/redis/controller/ProductController.java`)
- Product controller → Product DAO: delegates CRUD (evidence: `src/main/java/com/springboot/redis/controller/ProductController.java`)
- Product controller → Product model: accepts and returns (evidence: `src/main/java/com/springboot/redis/controller/ProductController.java`)
- Product DAO → Product model: stores objects (evidence: `src/main/java/com/springboot/redis/repository/ProductDao.java`)
- Product DAO → Redis server: reads and writes hashes (evidence: `src/main/java/com/springboot/redis/repository/ProductDao.java`)
- Redis configuration → Redis server: configures connection (evidence: `src/main/java/com/springboot/redis/config/RedisConfig.java`)
