Skip to content

Commit 2db2ecd

Browse files
committed
Add database design section and schema diagram to README
1 parent f33b8e3 commit 2db2ecd

File tree

2 files changed

+24
-5
lines changed

2 files changed

+24
-5
lines changed

README.md

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
# ![RealWorld Example App using Kotlin and Spring](logo.png)
22

33
> ### Kotlin + Spring Codebase
4-
> A comprehensive codebase featuring real world examples (CRUD, authentication, advanced patterns, etc.) that adheres to the [RealWorld](https://github.com/gothinkster/realworld-example-apps) specification and API.
4+
> A comprehensive codebase featuring real world examples (CRUD, authentication, advanced patterns, etc.) that adheres to
5+
> the [RealWorld](https://github.com/gothinkster/realworld-example-apps) specification and API.
56
6-
This project was developed to demonstrate a full-stack application built with Kotlin + Spring. It includes robust features such as CRUD operations, user authentication, routing, pagination, and more. The implementation strictly follows the Kotlin + Spring community style guides and best practices.
7+
This project was developed to demonstrate a full-stack application built with Kotlin + Spring. It includes robust
8+
features such as CRUD operations, user authentication, routing, pagination, and more. The implementation strictly
9+
follows the Kotlin + Spring community style guides and best practices.
710

8-
For further information on how this project interacts with various frontends and backends, please refer to the [RealWorld](https://github.com/gothinkster/realworld) repository.
11+
For further information on how this project interacts with various frontends and backends, please refer to
12+
the [RealWorld](https://github.com/gothinkster/realworld) repository.
913

1014
---
1115

1216
## Table of Contents
1317

1418
- [Prerequisites](#prerequisites)
1519
- [Project Structure](#project-structure)
20+
- [Database Design](#database-design)
1621
- [Features](#features)
1722
- [Configuration and Environment Variables](#configuration-and-environment-variables)
1823
- [Running the Application](#running-the-application)
@@ -30,15 +35,29 @@ For further information on how this project interacts with various frontends and
3035

3136
The project is structured using a modular architecture, where each module plays a specific role:
3237

33-
- **/api**: Contains the main application server code, including the entry point. This module implements the presentation and application layers.
38+
- **/api**: Contains the main application server code, including the entry point. This module implements the
39+
presentation and application layers.
3440
- **/core**: Houses the domain layer, defining the core business logic and domain rules.
35-
- **/core-impl**: Provides concrete implementations for the domain logic specified in the `/core` module. This includes functionality such as CRUD operations and integration with specific frameworks.
41+
- **/core-impl**: Provides concrete implementations for the domain logic specified in the `/core` module. This includes
42+
functionality such as CRUD operations and integration with specific frameworks.
3643
- **/e2e**: Maintains end-to-end test scripts and related resources.
3744

3845
![](/docs/module-structures.png)
3946

4047
---
4148

49+
## **Database Design**
50+
51+
52+
![Schema Diagram](/docs/schema.png)
53+
54+
Since there were no strict requirements regarding the field lengths, arbitrary sizes were chosen. To facilitate the use
55+
of UUIDs for domain IDs, the column was defined as `binary(16)`. Additionally, as MySQL InnoDB manages a clustered index
56+
by default, a dedicated primary key using `int` (4 bytes) was selected to prevent unnecessary expansion of the clustered
57+
index. No extra indexes have been defined at this stage in order to avoid premature optimization.
58+
59+
---
60+
4261
## Features
4362

4463
- **CRUD Operations**: Enables create, read, update, and delete functionalities.

docs/schema.png

233 KB
Loading

0 commit comments

Comments
 (0)