Skip to content

Commit 67b4d42

Browse files
Merge pull request #325 from mxenabled/wes/folderStructureADR/CT-2205
docs: added an ADR for folder structure
2 parents a3220f2 + 8197ca6 commit 67b4d42

1 file changed

Lines changed: 60 additions & 0 deletions

File tree

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Title
2+
3+
Folder structure
4+
5+
## Date proposed
6+
7+
05-14-2026
8+
9+
## Context
10+
11+
With our current repository structure we have the following cons:
12+
13+
1. You must understand the language and framework to be able to find things
14+
1. You must dig through multiple folders to be able to get a grasp of what a single domain does
15+
1. It isn't obvious what works together without looking through code
16+
17+
## Decision
18+
19+
We will follow screaming architecture. Our folder structure will look something like the following:
20+
21+
```
22+
src/
23+
├── Institutions/
24+
│ ├── Institution/
25+
│ │ ├── api.test.ts
26+
│ │ ├── api.ts
27+
│ │ ├── api.test.ts
28+
│ │ └── Institution.tsx
29+
│ ├── api.test.ts
30+
│ ├── api.ts
31+
│ ├── Institutions.test.ts
32+
│ └── Institutions.tsx
33+
├── Member/
34+
│ ├── api.test.ts
35+
│ ├── api.ts
36+
│ ├── Member.test.ts
37+
│ └── Member.tsx
38+
└── shared/
39+
│ ├── Member/
40+
│ │ ├── api.test.ts
41+
│ │ ├── api.ts
42+
│ │ ├── consts.ts
43+
│ │ ├── utils.test.ts
44+
│ │ └── utils.ts
45+
│ └── Validation/
46+
│ ├── date.test.ts
47+
│ ├── date.ts
48+
│ ├── required.ts
49+
│ └── required.ts
50+
├── vite.config.ts
51+
└── App.tsx
52+
```
53+
54+
All folders underneath src and shared are domains. Things stay in their domain underneath src until they are actually shared, then they can move to the shared folder. Files that are used together stay in close proximity.
55+
56+
## Consequences
57+
58+
1. It will be easier to find things
59+
1. It will be easier to understand how related things work together
60+
1. Our folders will have a clear structure to be followed

0 commit comments

Comments
 (0)