Skip to content

Commit 7c8d3a4

Browse files
anconguiAndres Contreras
andauthored
Add Apache 2.0 headers to every .cs file; refresh README index (#20)
A repo-wide cleanup pass for professionalism / licensing hygiene: ## Apache 2.0 license header Prepended the standard Firefly Software Foundation Apache 2.0 header to every C# source file in src/, samples/, and tests/ — 344 files in total, all of which previously lacked a header. The text is the same notice used in the Java sources, normalised to C# `//` line comments: // Copyright 2024-2026 Firefly Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or // implied. See the License for the specific language governing // permissions and limitations under the License. The header sits above the first using directive, separated by a blank line. Insertion was idempotent (skipped any file already containing "Firefly Software Foundation"); re-running on top is a no-op. Build: 0 errors / 0 warnings; 346/346 tests still pass. ## Documentation index Removed `docs/AUDIT.md` (Java↔.NET parity audit) per the user's direction — the same information now lives implicitly in the README quickstarts, the per-project READMEs, and the new index pages added in this PR. All references to AUDIT.md are stripped from README.md. Added three new top-level README index pages: * `docs/README.md` — indexes ARCHITECTURE / MODULES / SERVICE-SCAFFOLDING / CONFIGURATION / MIGRATION-GUIDE with audience tags and a recommended reading order. Replaces the navigation role AUDIT.md served. * `src/README.md` — lists every src/* project organised by tier (Foundational / Platform / Adapters / Starters), with a one-line description of each and a link to its own README. Calls out the conventions every project follows: Apache header, file-scoped namespaces, `<IsPackable>true</IsPackable>` default, options + DI extension naming, and the no-silent-stubs rule. * `tests/README.md` — describes the single-test-project layout, how to run filtered subsets, the three test categories (framework internals / adapter shape / extras), and the conventions for new tests (WireMock for HTTP adapters, NSubstitute for SDK-fronted ones, xUnit-native asserts). ## README touch-up Updated the top-level `README.md` to reflect the new structure: * "Repository layout" tree shows the three new index READMEs and drops the AUDIT.md line. * "Documentation" section points at `docs/README.md` as the recommended starting point and removes the AUDIT.md row. * Per-project + index READMEs are explicitly cross-linked so a reader landing in any of `src/`, `samples/`, `tests/`, or `docs/` finds the right next page within one click. ## Verification * `dotnet build FireflyFramework.sln` — 0 errors / 0 warnings. * `dotnet test FireflyFramework.sln --no-build` — 346 / 346 passing. * `find src tests samples -name '*.cs' -exec grep -L 'Firefly Software Foundation' {} \;` — empty (every file has the header). * `head -2 src/FireflyFramework.Cqrs/Commands/ICommand.cs` shows the header sits above the first `using` directive, not inside it. Co-authored-by: Andres Contreras <andres.contreras@soon.es>
1 parent e36dee4 commit 7c8d3a4

349 files changed

Lines changed: 5058 additions & 440 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎README.md‎

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -389,21 +389,23 @@ The full schema — verified against the actual `*Options` classes — is in
389389

390390
```
391391
fireflyframework-dotnet/
392-
├── docs/ Long-form documentation
392+
├── docs/ Long-form documentation (start with docs/README.md)
393+
│ ├── README.md Index — recommended reading order
393394
│ ├── ARCHITECTURE.md Tier diagram, dependency graph, process model
394395
│ ├── SERVICE-SCAFFOLDING.md Canonical 5-project service layout
395396
│ ├── MIGRATION-GUIDE.md Java to .NET cookbook
396397
│ ├── CONFIGURATION.md Every Firefly:* options section
397-
│ ├── MODULES.md Per-project description with Java mapping
398-
│ └── AUDIT.md Java vs .NET feature parity audit
399-
├── src/ Framework projects (foundational → starters)
398+
│ └── MODULES.md Per-project description with Java mapping
399+
├── src/ Framework projects, indexed by tier in src/README.md
400400
├── samples/ Reference services in canonical 5-project layout
401+
│ ├── README.md
401402
│ ├── FireflyFramework.Samples.OrdersService.Interfaces/
402403
│ ├── FireflyFramework.Samples.OrdersService.Models/
403404
│ ├── FireflyFramework.Samples.OrdersService.Core/
404405
│ ├── FireflyFramework.Samples.OrdersService.Web/
405406
│ └── FireflyFramework.Samples.OrdersService.Sdk/
406-
├── tests/FireflyFramework.Tests/ Cross-tier test suite
407+
├── tests/ Cross-tier test suite (see tests/README.md)
408+
│ └── FireflyFramework.Tests/
407409
├── Directory.Build.props Parent build properties (net10.0, version, metadata)
408410
├── Directory.Build.targets Cross-project test wiring
409411
├── Directory.Packages.props Central Package Management — every NuGet pinned
@@ -421,14 +423,17 @@ public surface, options class, and usage examples.
421423

422424
## Documentation
423425

426+
[`docs/README.md`](docs/README.md) is the recommended starting point — it indexes the doc set and suggests a reading order.
427+
424428
| Document | Purpose |
425429
|---|---|
426430
| [`docs/ARCHITECTURE.md`](docs/ARCHITECTURE.md) | Tier-by-tier reference, dependency-direction graph, process model, versioning policy |
427431
| [`docs/SERVICE-SCAFFOLDING.md`](docs/SERVICE-SCAFFOLDING.md) | The canonical 5-project layout, naming conventions, dependency graph, bootstrap recipe |
428432
| [`docs/MIGRATION-GUIDE.md`](docs/MIGRATION-GUIDE.md) | Java → .NET cookbook covering Reactor, Spring DI, web layer, persistence, CQRS, EDA, resilience, observability |
429433
| [`docs/CONFIGURATION.md`](docs/CONFIGURATION.md) | Every `Firefly:*` configuration section with example values |
430434
| [`docs/MODULES.md`](docs/MODULES.md) | One-line description of every project plus its Java original |
431-
| [`docs/AUDIT.md`](docs/AUDIT.md) | Java vs .NET feature parity audit |
435+
436+
Per-project READMEs live alongside each project under [`src/`](src) and [`samples/`](samples). [`src/README.md`](src/README.md) indexes them by tier; [`tests/README.md`](tests/README.md) describes the test suite layout.
432437

433438
---
434439

‎docs/AUDIT.md‎

Lines changed: 0 additions & 434 deletions
This file was deleted.

‎docs/README.md‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Firefly Framework Documentation
2+
3+
Long-form documentation for the .NET port of the Firefly Framework.
4+
Each file targets a specific audience or task; this index is the
5+
recommended starting point.
6+
7+
| Document | Audience | What it covers |
8+
|---|---|---|
9+
| [`ARCHITECTURE.md`](ARCHITECTURE.md) | Anyone integrating with the framework | The four-tier layering (Foundational → Platform → Adapters → Starters), inter-project dependency direction, the process model the runtime assumes, and the framework's versioning policy. |
10+
| [`MODULES.md`](MODULES.md) | Anyone picking which package(s) to install | One-line description of every `src/*` project paired with its Java original, organised by tier. The "what's in this package" reference. |
11+
| [`SERVICE-SCAFFOLDING.md`](SERVICE-SCAFFOLDING.md) | Service authors building on the framework | The canonical five-project layout (`.Interfaces` / `.Models` / `.Core` / `.Web` / `.Sdk`), naming conventions, dependency graph, and a step-by-step bootstrap recipe modelled on the Orders sample. |
12+
| [`CONFIGURATION.md`](CONFIGURATION.md) | Service authors + operators | Every `Firefly:*` configuration section with the real `*Options` type signatures, default values, and worked examples. |
13+
| [`MIGRATION-GUIDE.md`](MIGRATION-GUIDE.md) | Teams porting an existing Java service | Mapping table from Reactor / Spring DI / Spring Web / Spring Data R2DBC / Spring Cloud / Resilience4j / Micrometer / Logback to their .NET 10 counterparts, with side-by-side code samples. |
14+
15+
## Reading order
16+
17+
If you're new to the framework, read in this order:
18+
19+
1. **[`ARCHITECTURE.md`](ARCHITECTURE.md)** — orient on the layering model and the dependency direction. Five minutes.
20+
2. **[`SERVICE-SCAFFOLDING.md`](SERVICE-SCAFFOLDING.md)** — see what a real service looks like end-to-end before reading individual module docs. Ten minutes.
21+
3. **[`MODULES.md`](MODULES.md)** — skim the catalogue; bookmark the modules you'll use.
22+
4. **[`CONFIGURATION.md`](CONFIGURATION.md)** — keep open while wiring up your `appsettings.json`.
23+
24+
If you're porting an existing Java service, start with [`MIGRATION-GUIDE.md`](MIGRATION-GUIDE.md) instead.
25+
26+
## Per-project documentation
27+
28+
Each project under [`src/`](../src) ships its own `README.md`
29+
describing its public surface, options class, and short usage examples.
30+
The same is true of every project under [`samples/`](../samples).
31+
[`src/README.md`](../src/README.md) indexes them by tier.
32+
33+
## Top-level project README
34+
35+
The repository root [`README.md`](../README.md) covers the
36+
five-minute pitch, the architecture diagram, the canonical
37+
service-shape, two quickstart paths (run the sample / build your
38+
first service from scratch), and the release-publish workflow.

‎samples/FireflyFramework.Samples.OrdersService.Core/Mappers/OrderMapper.cs‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2024-2026 Firefly Software Foundation
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
using FireflyFramework.Samples.OrdersService.Interfaces.Dtos.V1;
216
using FireflyFramework.Samples.OrdersService.Models.Entities.V1;
317

‎samples/FireflyFramework.Samples.OrdersService.Core/Services/Orders/V1/GetOrderHandler.cs‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2024-2026 Firefly Software Foundation
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
using FireflyFramework.Cqrs.Queries;
216
using FireflyFramework.Samples.OrdersService.Core.Mappers;
317
using FireflyFramework.Samples.OrdersService.Interfaces.Dtos.V1;

‎samples/FireflyFramework.Samples.OrdersService.Core/Services/Orders/V1/GetOrderQuery.cs‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2024-2026 Firefly Software Foundation
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
using FireflyFramework.Cqrs.Queries;
216
using FireflyFramework.Samples.OrdersService.Interfaces.Dtos.V1;
317

‎samples/FireflyFramework.Samples.OrdersService.Core/Services/Orders/V1/PlaceOrderCommand.cs‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2024-2026 Firefly Software Foundation
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
using FireflyFramework.Cqrs.Commands;
216
using FireflyFramework.Cqrs.Validation;
317

‎samples/FireflyFramework.Samples.OrdersService.Core/Services/Orders/V1/PlaceOrderHandler.cs‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2024-2026 Firefly Software Foundation
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
using FireflyFramework.Cqrs.Commands;
216
using FireflyFramework.Samples.OrdersService.Interfaces.Enums.V1;
317
using FireflyFramework.Samples.OrdersService.Models.Entities.V1;

‎samples/FireflyFramework.Samples.OrdersService.Interfaces/Dtos/V1/OrderDto.cs‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2024-2026 Firefly Software Foundation
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
using FireflyFramework.Samples.OrdersService.Interfaces.Enums.V1;
216

317
namespace FireflyFramework.Samples.OrdersService.Interfaces.Dtos.V1;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
// Copyright 2024-2026 Firefly Software Foundation
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
115
namespace FireflyFramework.Samples.OrdersService.Interfaces.Dtos.V1;
216

317
public sealed record PlaceOrderRequest(string Sku, int Quantity, decimal UnitPrice);

0 commit comments

Comments
 (0)