Skip to content

Commit f7003fe

Browse files
committed
Moved from Grains namespace too Aggregates namespace
1 parent 1c39e91 commit f7003fe

File tree

237 files changed

+40229
-76031
lines changed

Some content is hidden

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

237 files changed

+40229
-76031
lines changed

.dockerignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
**/.dockerignore
2+
**/.env
3+
**/.git
4+
**/.gitignore
5+
**/.project
6+
**/.settings
7+
**/.toolstarget
8+
**/.vs
9+
**/.vscode
10+
**/.idea
11+
**/*.*proj.user
12+
**/*.dbmdl
13+
**/*.jfm
14+
**/azds.yaml
15+
**/bin
16+
**/charts
17+
**/docker-compose*
18+
**/Dockerfile*
19+
**/node_modules
20+
**/npm-debug.log
21+
**/obj
22+
**/secrets.dev.yaml
23+
**/values.dev.yaml
24+
LICENSE
25+
README.md

.github/workflows/dotnet.yml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,25 @@ name: .NET
55

66
on:
77
push:
8-
branches: [ "main" ]
8+
branches: ["main", "develop"]
99
pull_request:
10-
branches: [ "main" ]
10+
branches: ["main", "develop"]
1111

1212
jobs:
1313
build:
14-
1514
runs-on: ubuntu-latest
1615

1716
steps:
18-
- uses: actions/checkout@v4
19-
- name: Setup .NET
20-
uses: actions/setup-dotnet@v4
21-
with:
22-
dotnet-version: 8.0.x
23-
- name: Restore dependencies
24-
run: dotnet restore
25-
- name: Build
26-
run: dotnet build --no-restore
27-
- name: Test
28-
run: dotnet test --no-build --verbosity normal
17+
- uses: actions/checkout@v4
18+
- name: Setup .NET
19+
uses: actions/setup-dotnet@v4
20+
with:
21+
dotnet-version: 9.0.x
22+
- name: Restore workloads
23+
run: dotnet workload restore
24+
- name: Restore dependencies
25+
run: dotnet restore
26+
- name: Build
27+
run: dotnet build --no-restore
28+
- name: Test
29+
run: dotnet test --no-build --verbosity normal

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,10 @@ $RECYCLE.BIN/
482482

483483
# Vim temporary swap files
484484
*.swp
485-
#src/common/obj
485+
src/EventServer/Internal/
486486
bin
487487
obj
488488
devbox.lock
489489
docker/postgres/data/*
490+
/.envrc
491+
.aider*

.vscode/tasks.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "build",
8+
"command": "dotnet",
9+
"type": "shell",
10+
"args": [
11+
"build",
12+
// Ask dotnet build to generate full paths for file names.
13+
"/property:GenerateFullPaths=true",
14+
// Do not generate summary otherwise it leads to duplicate errors in Problems panel
15+
"/consoleloggerparameters:NoSummary"
16+
],
17+
"group": "build",
18+
"presentation": {
19+
"reveal": "silent"
20+
},
21+
"problemMatcher": "$msCompile"
22+
}
23+
]
24+
}

CLAUDE.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# FX-Orleans Development Guide
2+
## Enhanced System Architecture
3+
4+
### Home Page / Problem Statement Interface
5+
6+
Clean, professional form for users to describe their challenges
7+
AI-powered analysis of the problem statement
8+
Optional fields for industry, urgency, and specific expertise needs
9+
10+
11+
### AI Matching Engine
12+
13+
Natural language processing to extract key requirements
14+
Matching algorithm to identify partners with relevant skills and experience
15+
Availability filter to only show partners who can meet soon
16+
17+
18+
### Partner Selection Interface
19+
20+
Display of matched partners with relevance scores
21+
Brief profiles highlighting expertise relevant to the stated problem
22+
Availability calendar for each partner
23+
### Booking System
24+
25+
Seamless transition to scheduling once a partner is selected
26+
Calendar integration
27+
Confirmation and reminder system
28+
The booking system should add a meeting request to the partners calander,
29+
inviting the user and adding a google meeting link.
30+
31+
### Payment Authorization
32+
33+
Using stripe authorize a payment for 800.00 for a 60 minute session.
34+
The payment should be collected prior to the user joining the meeting.
35+
36+
### Confirmation Email
37+
38+
The confirmation page will display the details of the scheduled meeting.
39+
Additionally confirmation e-mails will be sent out from the google meeting request.
40+
41+
42+
### Implementation Approach
43+
For the AI matching component, you could:
44+
45+
Use a Large Language Model (LLM) like OpenAI's GPT or similar:
46+
47+
Process problem statements
48+
Extract key skills, industries, and technologies mentioned
49+
Match against structured partner profiles
50+
51+
52+
Partner Profile Database:
53+
54+
Detailed skills inventory for each partner
55+
Previous experience categorized by industry and role
56+
Areas of specialty and expertise levels
57+
58+
59+
Availability System:
60+
61+
Calendar API integration (Google Calendar)
62+
Real-time availability checks
63+
64+
## Build & Run Commands
65+
- Build: `dotnet build`
66+
- Run EventServer: `dotnet watch --project src/EventServer/EventServer.csproj`
67+
- Run FxExpert Blazor: `dotnet watch --project src/FxExpert.Blazor/FxExpert.Blazor/FxExpert.Blazor.csproj`
68+
- Run both services: `just run`
69+
70+
## Test Commands
71+
- Run all tests: `dotnet test`
72+
- Run specific test: `dotnet test --filter "FullyQualifiedName=EventServer.Tests.UserTests.CreateUserTest"`
73+
- Tests use xUnit, Alba for HTTP testing, and Shouldly for assertions
74+
75+
## Code Style Guidelines
76+
- Use type hints everywhere for clarity
77+
- Code should be simple, readable, and self-explanatory
78+
- Use meaningful names that reveal intent
79+
- Function names should describe actions performed
80+
- Prefer exceptions over error codes for error handling
81+
- Use immutable types whenever possible
82+
- In controllers, use Wolverine attributes and return command events
83+
- In the UI use Blazor and MudComponents.
84+
- Prefer MudCompenents over standard html.
85+
86+
## Architecture Overview
87+
- System uses CQRS and Event Sourcing patterns
88+
- Commands represent intent to change state
89+
- Events represent state changes that have occurred
90+
- Main aggregates: Partners, Users, VideoConferences, Payments, Calendar
91+
- UI uses Blazor with MudBlazor component library

CONVENTIONS.md

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# fx-expert Development Conventions
2+
3+
## General
4+
5+
- **Type Hints**: Use type hints wherever possible to improve code clarity and maintainability.
6+
- Code should be easy to read and understand.
7+
- Keep the code as simple as possible. Avoid unnecessary complexity.
8+
- Use meaningful names for variables, functions, etc. Names should reveal intent.
9+
- Function names should describe the action being performed.
10+
- Prefer fewer arguments in functions and methods. Ideally, aim for no more than two or three.
11+
- Only use comments when necessary, as they can become outdated. Instead, strive to make the code self-explanatory.
12+
- When commands are used, they should add useful information that is not readily apparent from the code itself.
13+
- Properly handle errors and exceptions to ensure the software's robustness.
14+
- Use exceptions rather than error codes for handling errors.
15+
- Consider security implications of the code. Implement security best practices to protect against vulnerabilities and attacks.
16+
- Use immutable types whenever possible.
17+
- When working with Pulumi, use Kubernetes and AWS.
18+
- When creating Kubernetes clusters, use AWS.
19+
20+
## Package Information
21+
22+
- [Marten Documentation](https://martendb.io/introduction.html)
23+
- [Wolverine](https://wolverinefx.net/guide/basics.html)
24+
- [Blazer](https://learn.microsoft.com/en-us/aspnet/core/?view=aspnetcore-9.0&WT.mc_id=dotnet-35129-website)
25+
- [MudBlazor](https://mudblazor.com/docs/overview)
26+
- [Google .Net Client Libraries](https://developers.google.com/api-client-library/dotnet)
27+
- [Stripe APIs](https://docs.stripe.com/api?lang=dotnet)
28+
- [Newtonsoft](https://www.newtonsoft.com/json/help/html/Introduction.htm)
29+
30+
## Architecture
31+
32+
This document presents the high-level architecture for the project, supporting a Partner-based system with additional features for **Users** and **Videoconferences**. The system manages **Partner profiles**, **User accounts**, and **Videoconference scheduling**, while leveraging **MartenDB** for event-sourcing and persistence and enabling deep integration with **CQRS**. A robust testing suite implemented in xUnit ensures system reliability.
33+
34+
## Architectural Components
35+
36+
### 1. EventServer
37+
38+
- **Technology**: ASP.NET Core 9.0
39+
- **Responsibility**:
40+
- Routes all incoming HTTP requests to their corresponding commands, queries, and business rules.
41+
- Events propagate to other components as necessary.
42+
- Offers RESTful Web APIs for interacting with Users, Partners, and Videoconferences.
43+
44+
#### Key Responsibilities
45+
46+
- Request validation via Middleware.
47+
- Publishing **Commands** (for state changes).
48+
- Executing **Queries** (for reading/viewing data).
49+
- Exposing endpoints for external applications:
50+
- `/api/partners` (Partners management).
51+
- `/api/users` (Users management).
52+
- `/api/videoconferences` (Videoconference scheduling).
53+
- `/api/payments` (payment processing)
54+
- `/api/calendar` (calendar management)
55+
56+
#### Critical Modules
57+
58+
- **Controllers**: For Partners, Users, and Videoconferences.
59+
- **Request Handlers**: Handle commands (`ICommand`) and queries (`IQuery`).
60+
- **Dependency Injection (DI)**: Binds service and repository dependencies.
61+
62+
#### Key Aggregates
63+
64+
- **Partner**:
65+
66+
- Entity representing a partner in the system.
67+
- Attributes: `Bio`, `Skills`, `WorkHistory`, etc.
68+
- Supports commands such as `CreatePartner`, `UpdatePartner`, and `AddSkill`.
69+
70+
- **User**:
71+
72+
- Represents a participant in the system.
73+
- Attributes: `Email`, `Role` (e.g., Admin/Viewer), `Settings` (e.g., notification preferences).
74+
- Commands: `RegisterUser`, `AuthenticateUser`, and `UpdateUserSettings`.
75+
76+
- **Videoconference**:
77+
78+
- Handles **scheduling** between partners and/or users.
79+
- Attributes: `MeetingId`, `Participants`, `Time` (Start/End), `Details`.
80+
- Commands: `CreateVideoconference`, `CancelVideoconference`, `UpdateVideoconference`.
81+
82+
- Payments:
83+
84+
- Handles the authorization of payments via Stripe.
85+
- Handles the collection of payments via Stripe.
86+
- Handles cancelling a previously authorized payment (in case of cancellation of a videoconference).
87+
88+
- Calendar:
89+
- Handles creating calendar events.
90+
- Handles getting calendar events.
91+
92+
### Key Concepts
93+
94+
- **Commands**: Represent the intent to **change system state**.
95+
- **Events**: Triggered as a result of commands, representing something that has happened in the system.
96+
97+
### 2. Shared Types
98+
99+
- **Technology**: C# (Domain-Driven Design and Event Sourcing principles applied)
100+
- **Responsibility**:
101+
- Houses the **Commands**, **Events**, and domain **Aggregates** (e.g., `Partner`, `User`, `Videoconference`) along with their business logic.
102+
103+
### 3. fx-expert
104+
105+
This is the UI and supporting services. The UI is implemented using Blazer,
106+
a framework for building web applications in .NET.
107+
The UI uses the **MudBlazor** component library for building user interfaces.
108+
109+
#### Oauth
110+
111+
Because the UI is using blazor WASM fx-expert utilizes the BFF (Backend for frontend)
112+
pattern for authentication. Basically the blazer frontend utilizes an exposed endpoint to
113+
get the access token from the BFF. The BFF then uses that token to validate the user.

Justfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
build:
2+
dotnet build
3+
4+
run-eventserver:
5+
wezterm cli spawn --cwd . dotnet watch --project src/EventServer/EventServer.csproj
6+
7+
run-fxexpert:
8+
wezterm cli spawn --cwd . dotnet watch --project src/FxExpert.Blazor/FxExpert.Blazor/FxExpert.Blazor.csproj
9+
10+
run: run-eventserver run-fxexpert

Properties/launchSettings.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"$schema": "https://json.schemastore.org/launchsettings.json",
3+
"profiles": {
4+
"EventServer": {
5+
"commandName": "Project",
6+
"dotnetRunMessages": true,
7+
"launchBrowser": true,
8+
"applicationUrl": "swagger",
9+
"environmentVariables": {
10+
"ASPNETCORE_ENVIRONMENT": "Development"
11+
}
12+
},
13+
"FxExpert.Blazor": {
14+
"commandName": "Project",
15+
"dotnetRunMessages": true,
16+
"launchBrowser": true,
17+
"applicationUrl": "http://localhost:8500",
18+
"environmentVariables": {
19+
"ASPNETCORE_ENVIRONMENT": "Development"
20+
}
21+
}
22+
}
23+
}

0 commit comments

Comments
 (0)