You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor project structure: rename common/ to shared/ and update imports
- Renamed the `common/` directory to `shared/` to better reflect its purpose.
- Updated all relevant import paths across the codebase to use the new `shared/` directory.
- Removed obsolete constants and utility files from the `common/` directory to streamline the project structure.
Copy file name to clipboardExpand all lines: PROJECT_STRUCTURE.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ src/
12
12
├── database.providers.ts # Database providers
13
13
├── main.ts # Entry point
14
14
├── ...resources/ # All resource modules directly under `src/`
15
-
├── common/ # Common constants, interfaces, and utilities\
15
+
├── shared/ # Shared constants, interfaces, and utilities\
16
16
scripts/ # Scripts managed by `package.json`
17
17
drizzle/ # Drizzle migrations and scripts
18
18
drizzle.config.ts # Drizzle configuration
@@ -64,12 +64,12 @@ resource/
64
64
- Does **not** export db tables, these are found as schemas inside feature folders
65
65
- Does **not** export Drizzle config and migrations, these are found in `drizzle.config.ts` and `drizzle/` (from the root of the project) respectively
66
66
67
-
#### `common/`
67
+
#### `shared/`
68
68
69
-
Global utilities, middleware, and common concerns.
69
+
Global utilities, middleware, and shared concerns.
70
70
71
71
```plaintext
72
-
common/
72
+
shared/
73
73
├── constants/ # All global constants, grouped by domain
74
74
│ ├── auth.constants.ts
75
75
│ ├── validation.constants.ts
@@ -85,10 +85,10 @@ common/
85
85
```
86
86
87
87
> [!NOTE]
88
-
> The `common/` folder is a catch-all for things that are not specific to a single feature. It's organized by purpose, not by type/domain. That's why it can have both `errors/` (domain) and `utils/` (type) folders.
88
+
> The `shared/` folder is a catch-all for things that are not specific to a single feature. It's organized by purpose, not by type/domain. That's why it can have both `errors/` (domain) and `utils/` (type) folders.
89
89
90
90
> [!WARNING]
91
-
> Avoid dumping everything into `common/` by default. If a util, constant, or interface is only used in one feature - keep it inside that feature's folder. Promote it to `common/` only when it's reused.
91
+
> Avoid dumping everything into `shared/` by default. If a util, constant, or interface is only used in one feature - keep it inside that feature's folder. Promote it to `shared/` only when it's reused.
92
92
93
93
> [!TIP]
94
94
> Only one `constants/` folder exists across the project - do not spread constants into individual features unless strictly private to that feature.
0 commit comments