# rikhi9812/mybatisandsecurity architecture

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

- Interactive diagram: https://gitdiagram.com/rikhi9812/mybatisandsecurity
- Repository: https://github.com/rikhi9812/mybatisandsecurity

## Overview

The project appears to be a Spring-based shop with user authentication, product/category management, cart and checkout pages, and administrative screens, inferred from its directory and template names. The tree also shows MyBatis mapper interfaces/XML and repositories, plus security and user-detail classes. No README or source excerpts were provided, so the runtime sequence, persistence target, and calls between components cannot be verified; the graph therefore shows the identifiable product areas without speculative flow arrows.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_shop_pages["Shop pages"]
  node_home_controller["Home controller"]
  node_cart_controller["Cart controller"]
end

subgraph group_catalog["Catalog"]
  node_product_pages["Product pages"]
  node_product_controller["Product controller"]
  node_product_service["Product service"]
  node_product_mapper["Product mapper<br/>[ProductMapper.java]"]
  node_product_mapping["Product mapping<br/>[PMapper.xml]"]
  node_category_service["Category service"]
  node_category_mapper["Category mapper"]
  node_category_mapping["Category mapping<br/>[CMapper.xml]"]
end

subgraph group_identity["Identity and access"]
  node_login_controller["Login controller"]
  node_security_config["Security configuration"]
  node_user_detail_service["User detail service"]
  node_user_repository["User repository"]
end

subgraph group_administration["Administration"]
  node_admin_controller["Admin controller"]
  node_role_controller["Role controller"]
  node_role_repository["Role repository"]
  node_admin_pages["Admin pages"]
end

node_shopper(("Shopper"))

click node_shop_pages "https://github.com/rikhi9812/mybatisandsecurity/tree/master/myPracticesecuritybatis/src/main/resources/templates"
click node_home_controller "https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/java/com/example/demo/controller/HomeController.java"
click node_cart_controller "https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/java/com/example/demo/controller/CartController.java"
click node_product_pages "https://github.com/rikhi9812/mybatisandsecurity/tree/master/myPracticesecuritybatis/src/main/resources/templates"
click node_product_controller "https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/java/com/example/demo/controller/HomeController.java"
click node_product_service "https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/java/com/example/demo/service/ProductService.java"
click node_product_mapper "https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/java/com/example/demo/repository/ProductMapper.java"
click node_product_mapping "https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/resources/com/example/demo/repository/mapper/PMapper.xml"
click node_category_service "https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/java/com/example/demo/service/CategoryService.java"
click node_category_mapper "https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/java/com/example/demo/repository/CategoryMapper.java"
click node_category_mapping "https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/resources/com/example/demo/repository/mapper/CMapper.xml"
click node_login_controller "https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/java/com/example/demo/controller/LoginController.java"
click node_security_config "https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/java/com/example/demo/config/SecurityConfig.java"
click node_user_detail_service "https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/java/com/example/demo/service/UserDetailServiceImpl.java"
click node_user_repository "https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/java/com/example/demo/repository/UserRepository.java"
click node_admin_controller "https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/java/com/example/demo/controller/AdminController.java"
click node_role_controller "https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/java/com/example/demo/controller/AdminRoleController.java"
click node_role_repository "https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/java/com/example/demo/repository/RoleRepository.java"
click node_admin_pages "https://github.com/rikhi9812/mybatisandsecurity/tree/master/myPracticesecuritybatis/src/main/resources/templates"

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_shop_pages,node_home_controller,node_cart_controller toneBlue
class node_product_pages,node_product_controller,node_product_service,node_product_mapper,node_product_mapping,node_category_service,node_category_mapper,node_category_mapping toneAmber
class node_login_controller,node_security_config,node_user_detail_service,node_user_repository toneMint
class node_admin_controller,node_role_controller,node_role_repository,node_admin_pages toneRose
class node_shopper toneIndigo
```

## Components

### Storefront

- [Shop pages](https://github.com/rikhi9812/mybatisandsecurity/tree/master/myPracticesecuritybatis/src/main/resources/templates): `myPracticesecuritybatis/src/main/resources/templates`
- [Home controller](https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/java/com/example/demo/controller/HomeController.java): `myPracticesecuritybatis/src/main/java/com/example/demo/controller/HomeController.java`
- [Cart controller](https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/java/com/example/demo/controller/CartController.java): `myPracticesecuritybatis/src/main/java/com/example/demo/controller/CartController.java`

### Catalog

- [Product pages](https://github.com/rikhi9812/mybatisandsecurity/tree/master/myPracticesecuritybatis/src/main/resources/templates): `myPracticesecuritybatis/src/main/resources/templates`
- [Product controller](https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/java/com/example/demo/controller/HomeController.java): `myPracticesecuritybatis/src/main/java/com/example/demo/controller/HomeController.java`
- [Product service](https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/java/com/example/demo/service/ProductService.java): `myPracticesecuritybatis/src/main/java/com/example/demo/service/ProductService.java`
- [Product mapper](https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/java/com/example/demo/repository/ProductMapper.java): `myPracticesecuritybatis/src/main/java/com/example/demo/repository/ProductMapper.java`
- [Product mapping](https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/resources/com/example/demo/repository/mapper/PMapper.xml): `myPracticesecuritybatis/src/main/resources/com/example/demo/repository/mapper/PMapper.xml`
- [Category service](https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/java/com/example/demo/service/CategoryService.java): `myPracticesecuritybatis/src/main/java/com/example/demo/service/CategoryService.java`
- [Category mapper](https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/java/com/example/demo/repository/CategoryMapper.java): `myPracticesecuritybatis/src/main/java/com/example/demo/repository/CategoryMapper.java`
- [Category mapping](https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/resources/com/example/demo/repository/mapper/CMapper.xml): `myPracticesecuritybatis/src/main/resources/com/example/demo/repository/mapper/CMapper.xml`

### Identity and access

- [Login controller](https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/java/com/example/demo/controller/LoginController.java): `myPracticesecuritybatis/src/main/java/com/example/demo/controller/LoginController.java`
- [Security configuration](https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/java/com/example/demo/config/SecurityConfig.java): `myPracticesecuritybatis/src/main/java/com/example/demo/config/SecurityConfig.java`
- [User detail service](https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/java/com/example/demo/service/UserDetailServiceImpl.java): `myPracticesecuritybatis/src/main/java/com/example/demo/service/UserDetailServiceImpl.java`
- [User repository](https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/java/com/example/demo/repository/UserRepository.java): `myPracticesecuritybatis/src/main/java/com/example/demo/repository/UserRepository.java`

### Administration

- [Admin controller](https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/java/com/example/demo/controller/AdminController.java): `myPracticesecuritybatis/src/main/java/com/example/demo/controller/AdminController.java`
- [Role controller](https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/java/com/example/demo/controller/AdminRoleController.java): `myPracticesecuritybatis/src/main/java/com/example/demo/controller/AdminRoleController.java`
- [Role repository](https://github.com/rikhi9812/mybatisandsecurity/blob/master/myPracticesecuritybatis/src/main/java/com/example/demo/repository/RoleRepository.java): `myPracticesecuritybatis/src/main/java/com/example/demo/repository/RoleRepository.java`
- [Admin pages](https://github.com/rikhi9812/mybatisandsecurity/tree/master/myPracticesecuritybatis/src/main/resources/templates): `myPracticesecuritybatis/src/main/resources/templates`

### Other components

- **Shopper**
