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
Copy file name to clipboardExpand all lines: docs/configure.md
+23-6Lines changed: 23 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,13 +6,24 @@ sidebar_position: 3
6
6
7
7
Learn how to use Noesis DSL to set architectural patterns in your code, allowing Noesis to focus on key building blocks in your codebase.
8
8
9
+
:::info Understanding the P3 Model is Key
10
+
Understanding the [P3 model](https://github.com/NoesisVision/P3-model/blob/main/Elements.md) is crucial for effective Noesis configuration. The P3 model defines three key elements that form the foundation of how Noesis analyzes and visualizes your system architecture:
11
+
-**[Domain Modules](https://github.com/NoesisVision/P3-model/blob/main/Elements.md#domain-module)** - logical groupings of related functionality
12
+
-**[Domain Objects](https://github.com/NoesisVision/P3-model/blob/main/Elements.md#domain-object)** - key building blocks of your domain model
13
+
-**[Domain Behaviors](https://github.com/NoesisVision/P3-model/blob/main/Elements.md#domain-behavior)** - operations or entry points in your system
14
+
:::
15
+
9
16
## Noesis DSL Description
10
17
11
18
Noesis DSL is a fluent API for configuring source code analysis. It consists of three main parts:
12
19
13
20
1.**System** - defines the name of the analyzed system
14
21
2.**Repositories** - configures code sources (local or remote Git repositories)
15
-
3.**Conventions** - defines conventions for domain modules, domain objects, and domain behaviors
22
+
3.**Conventions** - defines conventions for [domain modules](https://github.com/NoesisVision/P3-model/blob/main/Elements.md#domain-module), [domain objects](https://github.com/NoesisVision/P3-model/blob/main/Elements.md#domain-object), and [domain behaviors](https://github.com/NoesisVision/P3-model/blob/main/Elements.md#domain-behavior)
23
+
24
+
:::info Important Note about Repositories
25
+
The **Repositories** node in Noesis DSL refers to **version control repositories** (code repositories, Git repositories), not the Repository design pattern. This section configures where Noesis should look for your source code to analyze.
26
+
:::
16
27
17
28
## Basic Configuration Examples
18
29
@@ -69,7 +80,7 @@ public static FullAnalysisConfig Create() => FullAnalysisConfigBuilder
69
80
70
81
## Entry Points Configuration
71
82
72
-
Entry Points are a critical component of Noesis DSL configuration. The `NoesisTags.Domain.EntryPoint` tag is specially treated in the implementation and represents the main entry points into your system's business logic. These are typically methods that handle incoming requests, commands, or messages.
83
+
Entry Points are a critical component of Noesis DSL configuration. The `NoesisTags.Domain.EntryPoint` tag is specially treated in the implementation and represents the main [domain behaviors](https://github.com/NoesisVision/P3-model/blob/main/Elements.md#domain-behavior) that serve as entry points into your system's business logic. These are typically methods that handle incoming requests, commands, or messages.
73
84
74
85
### Common Entry Points Patterns
75
86
@@ -408,7 +419,7 @@ Configures a local Git repository for analysis:
408
419
The AnalyzersBuilder configures how Noesis identifies and categorizes different elements in your codebase. It has three main configuration areas: domain modules, domain objects, and domain behaviors.
409
420
410
421
#### ForDomainModules
411
-
Configures how domain modules are identified and created:
422
+
Configures how [domain modules](https://github.com/NoesisVision/P3-model/blob/main/Elements.md#domain-module) are identified and created:
412
423
413
424
```csharp
414
425
.ForDomainModules(convention=>convention
@@ -418,7 +429,7 @@ Configures how domain modules are identified and created:
418
429
.SkipNamespaceParts("Company", "Infrastructure")) // Remove common prefixes
419
430
```
420
431
421
-
**Purpose:** Domain modules represent logical groupings of related functionality in your system. They're typically created from namespace hierarchy but can be filtered and customized.
432
+
**Purpose:**[Domain modules](https://github.com/NoesisVision/P3-model/blob/main/Elements.md#domain-module) represent logical groupings of related functionality in your system. They're typically created from namespace hierarchy but can be filtered and customized.
422
433
423
434
**Configuration Methods:**
424
435
-**UseNamespaceHierarchy**: Creates modules based on namespace structure
@@ -445,6 +456,12 @@ Configures how domain objects (entities, services, repositories, etc.) are ident
445
456
446
457
**Purpose:** Domain objects represent the key building blocks of your domain model. They can be tagged for categorization and filtering in the generated documentation.
447
458
459
+
:::info Important Note about Domain Objects
460
+
**Domain Objects** in Noesis DSL can be **any objects from your code** - they are not limited to Domain Driven Design concepts. You can identify and tag various types of objects such as services, entities, repositories, commands, events, queries, controllers, or any other architectural components that are important in your system.
461
+
462
+
For more information about the generic P3 model and its elements, see the [P3 Model Elements documentation](https://github.com/NoesisVision/P3-model/blob/main/Elements.md).
-**OfKind**: Filters by type kind (Class, Interface, Enum, etc.)
@@ -453,7 +470,7 @@ Configures how domain objects (entities, services, repositories, etc.) are ident
453
470
-**SetName**: Customizes the object name in documentation
454
471
455
472
#### ForDomainBehaviors
456
-
Configures how domain behaviors (entry points, operations, etc.) are identified:
473
+
Configures how [domain behaviors](https://github.com/NoesisVision/P3-model/blob/main/Elements.md#domain-behavior) (entry points, operations, etc.) are identified:
@@ -464,7 +481,7 @@ Configures how domain behaviors (entry points, operations, etc.) are identified:
464
481
.WithName("Handle")) // Method name pattern
465
482
```
466
483
467
-
**Purpose:** Domain behaviors represent operations or entry points in your system. They're typically identified by analyzing methods rather than entire types.
484
+
**Purpose:**[Domain behaviors](https://github.com/NoesisVision/P3-model/blob/main/Elements.md#domain-behavior) represent operations or entry points in your system. They're typically identified by analyzing methods rather than entire types.
Copy file name to clipboardExpand all lines: docs/quick-start.md
+32-14Lines changed: 32 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,14 @@ sidebar_position: 1
7
7
This practical tutorial will walk you through configuring Noesis step by step. After completing it, you'll be able to **see** - "See how your system REALLY works" 🙂
8
8
9
9
What you should expect:
10
-
-**Your system visualization** in the form of domain modules
10
+
-**Your system visualization** in the form of [P3 model elements](https://github.com/NoesisVision/P3-model/blob/main/Elements.md)
11
11
-**Entry points** contained in these modules - often corresponding to REST endpoints or business logic entry points
12
12
-**Service visualization** showing which services are used by each entry point and how they're interconnected
13
13
14
+
:::info Understanding the P3 Model
15
+
Understanding the [P3 model](https://github.com/NoesisVision/P3-model/blob/main/Elements.md) is crucial for effective Noesis configuration. The P3 model defines three key elements: **domain modules**, **domain objects**, and **domain behaviors** that form the foundation of how Noesis analyzes and visualizes your system architecture.
16
+
:::
17
+
14
18
## Prerequisites
15
19
16
20
Before you begin, make sure you have:
@@ -86,7 +90,7 @@ Open your browser and navigate to `http://localhost:8088`. You should see the No
86
90
87
91
Now we'll configure Noesis to analyze your repository and make the full use of directory structure presented in [Step 1](#step-1-prepare-directory-structure).
88
92
89
-
Let's start by creating a basic configuration that will detect domain modules according to namespace hierarchy.
93
+
Let's start by creating a basic configuration that will detect [domain modules](https://github.com/NoesisVision/P3-model/blob/main/Elements.md#domain-module) according to namespace hierarchy.
90
94
In order to achieve that, you are going to configure two new volumes in the container:
91
95
-`externalSources` - it is a root directory of all the code repositories you want to scan
92
96
-`externalConfig` - is a path to a new .NET project where you will specify your scanning rules and architecture conventions, using Noesis DSL
@@ -124,7 +128,7 @@ cd noesis-config
124
128
Now add .NET NuGet packages to the project and test that it compiles
@@ -135,7 +139,7 @@ Open the project in your IDE and create the `ArchitectureConventions.cs` file.
135
139
**Remember to change `../my-system-repo` to the actual path to your project.**
136
140
137
141
```csharp
138
-
usingNoesis.Parser.Configuration;
142
+
usingNoesisVision.Parser.Configuration;
139
143
140
144
namespaceNoesisConfig
141
145
{
@@ -154,6 +158,10 @@ namespace NoesisConfig
154
158
}
155
159
```
156
160
161
+
:::info Important Note about Repositories
162
+
The **Repositories** node in Noesis DSL refers to **version control repositories** (code repositories, Git repositories), not the Repository design pattern. This section configures where Noesis should look for your source code to analyze.
163
+
:::
164
+
157
165
Play with the DSL if you want. You should be able additional versions of methods e.g. allowing to specify repository branch (which might be useful if your primary branch is not `main`). You may add multiple configuration files - they will be recognized by Noesis as separate systems to scan.
158
166
159
167
Check if the project correctly compiles - otherwise Noesis won't be able to work with it.
@@ -205,18 +213,23 @@ docker run \
205
213
[10:05:15 INF] Inferencing finished in 0.06s.
206
214
[10:05:15 INF] Full analysis for system DDD Starter Dotnet finished in 62.92s.
207
215
```
216
+
:::warning
217
+
You may see some compilation errors in the logs - DO NOT PANIC - probably these are compilation WARNINGS which are only displayed as errors by Roslyn. Please wait patientily for the final message about success or failure of project loading.
218
+
:::
208
219
3. Go back to the main page and click "Basic mode" to view the scan results. Choose your result.
209
220
4. Click **Modules** view - you should see modules created from your project's namespaces in the tree on the left, after you expand it. Here's how it may look:
210
221
211
222

212
223
213
224
214
225
226
+
227
+
215
228
🎉 **Second Success!** Noesis recognized your system structure and created domain modules.
216
229
217
230
## Step 5: Entry Points Configuration
218
231
219
-
Now we'll add entry points configuration - entry points to your system's business logic. These often correspond to REST API endpoints or command handling methods.
232
+
Now we'll add entry points configuration - [domain behaviors](https://github.com/NoesisVision/P3-model/blob/main/Elements.md#domain-behavior) that represent entry points to your system's business logic. These often correspond to REST API endpoints or command handling methods.
220
233
221
234
:::info
222
235
From now on, it might be worth knowing that **the architecture conventions examples presented in the code-snippets below were created according to the architecture of an opensource project [Grandnode2](https://github.com/grandnode/grandnode2)**. This information might help you compare what is the exact application code corresponding to the presented usages of Noesis DSL. In addition you can find a full configuration for this projects in our examples repository on [Github](https://github.com/NoesisVision/noesis-config)
@@ -227,15 +240,15 @@ From now on, it might be worth knowing that **the architecture conventions examp
227
240
Update `ArchitectureConventions.cs`, adding entry points configuration. The configuration depends on your project patterns, but if you use typical `CommandHandlers` with method `Handle` it may look like that:
228
241
229
242
```csharp
230
-
using Noesis.Parser.CodeParsing.Configuration;
231
-
using Noesis.Parser.Configuration;
232
-
using Noesis.Tags;
243
+
using NoesisVision.Parser.CodeParsing.Configuration;
244
+
using NoesisVision.Parser.Configuration;
245
+
using NoesisVision.Tags;
233
246
234
247
namespace NoesisConfig
235
248
{
236
249
public static class Grandnode2Config
237
250
{
238
-
[FullAnalysisConfigAttribute]
251
+
[FullAnalysisConfigAttribute]
239
252
public static FullAnalysisConfig Create() => FullAnalysisConfigBuilder
240
253
.System("My System") // System name in documentation
241
254
.Repositories(repositories => repositories
@@ -288,16 +301,16 @@ Here's how it may look:
288
301
289
302
## Step 6: Services Configuration
290
303
291
-
Finally, we'll add services configuration - business components used by entry points.
304
+
Finally, we'll add services configuration - [domain objects](https://github.com/NoesisVision/P3-model/blob/main/Elements.md#domain-object) that represent business components used by entry points.
**Domain Objects** in Noesis DSL can be **any objects from your code** - they are not limited to Domain Driven Design concepts. You can identify and tag various types of objects such as services, entities, repositories, commands, events, queries, controllers, or any other architectural components that are important in your system.
348
+
349
+
For more information about the generic P3 model and its elements, see the [P3 Model Elements documentation](https://github.com/NoesisVision/P3-model/blob/main/Elements.md).
0 commit comments