|
| 1 | +# ThingConnect Pulse - Codebase Structure |
| 2 | + |
| 3 | +## Root Directory Structure |
| 4 | +``` |
| 5 | +ThingConnect.Pulse/ |
| 6 | +├── ThingConnect.Pulse.Server/ # ASP.NET Core backend |
| 7 | +├── thingconnect.pulse.client/ # React frontend |
| 8 | +├── docs/ # Technical specifications |
| 9 | +├── ops/ # Development operations |
| 10 | +├── installer/ # Windows service installer |
| 11 | +├── brand/ # Branding and design assets |
| 12 | +├── marketing/ # Marketing materials |
| 13 | +├── website/ # Project website |
| 14 | +├── ref/ # Reference materials |
| 15 | +├── flow/ # Process flows |
| 16 | +├── ui/ # UI mockups/designs |
| 17 | +├── publish/ # Build outputs |
| 18 | +├── ThingConnect.Pulse.sln # Visual Studio solution |
| 19 | +├── Directory.Build.props # Solution-wide build properties |
| 20 | +├── README.md # Main project documentation |
| 21 | +├── CLAUDE.md # AI development context |
| 22 | +└── sample-config.yaml # Example configuration |
| 23 | +``` |
| 24 | + |
| 25 | +## Backend Structure (ThingConnect.Pulse.Server/) |
| 26 | +``` |
| 27 | +ThingConnect.Pulse.Server/ |
| 28 | +├── Controllers/ # API controllers |
| 29 | +│ ├── AuthController.cs |
| 30 | +│ ├── ConfigurationController.cs |
| 31 | +│ ├── HistoryController.cs |
| 32 | +│ ├── StatusController.cs |
| 33 | +│ └── UserManagementController.cs |
| 34 | +├── Data/ # Entity Framework context |
| 35 | +├── Services/ # Business logic services |
| 36 | +│ ├── Monitoring/ # Monitoring engine services |
| 37 | +│ ├── Rollup/ # Data aggregation services |
| 38 | +│ └── Prune/ # Data cleanup services |
| 39 | +├── Models/ # Data models and DTOs |
| 40 | +├── Infrastructure/ # Cross-cutting concerns |
| 41 | +├── Helpers/ # Utility classes |
| 42 | +├── Migrations/ # EF Core migrations |
| 43 | +├── Properties/ # Assembly info |
| 44 | +├── Program.cs # Application entry point |
| 45 | +├── appsettings.json # Production configuration |
| 46 | +├── appsettings.Development.json # Development configuration |
| 47 | +└── ThingConnect.Pulse.Server.csproj # Project file |
| 48 | +``` |
| 49 | + |
| 50 | +## Frontend Structure (thingconnect.pulse.client/) |
| 51 | +``` |
| 52 | +thingconnect.pulse.client/ |
| 53 | +├── src/ |
| 54 | +│ ├── api/ # API client functions |
| 55 | +│ ├── components/ # Reusable UI components |
| 56 | +│ ├── features/ # Feature-specific components |
| 57 | +│ ├── hooks/ # Custom React hooks |
| 58 | +│ ├── pages/ # Page components |
| 59 | +│ ├── providers/ # Context providers |
| 60 | +│ ├── router/ # Routing configuration |
| 61 | +│ ├── theme/ # Chakra UI theme |
| 62 | +│ ├── types/ # TypeScript definitions |
| 63 | +│ ├── utils/ # Utility functions |
| 64 | +│ ├── icons/ # Custom icon components |
| 65 | +│ ├── assets/ # Static assets |
| 66 | +│ ├── App.tsx # Root component |
| 67 | +│ └── main.tsx # Application entry point |
| 68 | +├── public/ # Static public assets |
| 69 | +├── dist/ # Build output |
| 70 | +├── node_modules/ # NPM dependencies |
| 71 | +├── package.json # NPM configuration |
| 72 | +├── package-lock.json # Dependency lock file |
| 73 | +├── tsconfig.json # TypeScript configuration |
| 74 | +├── vite.config.ts # Vite build configuration |
| 75 | +├── eslint.config.js # ESLint configuration |
| 76 | +└── thingconnect.pulse.client.esproj # MSBuild project file |
| 77 | +``` |
| 78 | + |
| 79 | +## Documentation Structure (docs/) |
| 80 | +``` |
| 81 | +docs/ |
| 82 | +├── openapi.yaml # API specification (frozen) |
| 83 | +├── openapi-frozen.yaml # Backup of frozen API spec |
| 84 | +├── config.schema.json # YAML configuration schema |
| 85 | +├── data-model.cs # EF Core entity definitions |
| 86 | +├── rollup-spec.md # Data aggregation algorithms |
| 87 | +├── assumptions.md # Project assumptions |
| 88 | +├── erd-diagram.md # Database design |
| 89 | +├── installer-spec.md # Windows installer requirements |
| 90 | +├── logging-spec.md # Logging configuration |
| 91 | +├── probes-spec.md # Network probe specifications |
| 92 | +├── security.md # Security considerations |
| 93 | +├── nfr.md # Non-functional requirements |
| 94 | +├── scope-v1.md # Version 1 scope definition |
| 95 | +├── roadmap.md # Product roadmap |
| 96 | +└── ops/ # Operations documentation |
| 97 | + ├── dev.md # Development commands |
| 98 | + ├── dev-backend.md # Backend setup |
| 99 | + └── dev-frontend.md # Frontend setup |
| 100 | +``` |
| 101 | + |
| 102 | +## Key Configuration Files |
| 103 | + |
| 104 | +### Solution Level |
| 105 | +- **Directory.Build.props**: Solution-wide MSBuild properties |
| 106 | +- **ThingConnect.Pulse.sln**: Visual Studio solution file |
| 107 | +- **.editorconfig**: Code formatting rules (if exists) |
| 108 | +- **.gitignore**: Git ignore patterns |
| 109 | + |
| 110 | +### Backend Configuration |
| 111 | +- **appsettings.json**: Production configuration |
| 112 | +- **appsettings.Development.json**: Development overrides |
| 113 | +- **ThingConnect.Pulse.Server.csproj**: Project dependencies and settings |
| 114 | + |
| 115 | +### Frontend Configuration |
| 116 | +- **package.json**: NPM dependencies and scripts |
| 117 | +- **tsconfig.json**: TypeScript compiler settings |
| 118 | +- **vite.config.ts**: Build tool configuration |
| 119 | +- **eslint.config.js**: Linting rules |
| 120 | +- **thingconnect.pulse.client.esproj**: MSBuild integration |
| 121 | + |
| 122 | +## Data Storage Locations |
| 123 | + |
| 124 | +### Development |
| 125 | +- **Database**: Local SQLite file in project directory |
| 126 | +- **Logs**: Console output and file logs in /logs directory |
| 127 | +- **Config**: test-config.yaml and sample-config.yaml in root |
| 128 | + |
| 129 | +### Production (Windows Service) |
| 130 | +- **Database**: `C:\ProgramData\ThingConnect.Pulse\pulse.db` |
| 131 | +- **Configuration**: `C:\ProgramData\ThingConnect.Pulse\config.yaml` |
| 132 | +- **Logs**: `C:\ProgramData\ThingConnect.Pulse\logs\` |
| 133 | +- **Installation**: `C:\Program Files\ThingConnect.Pulse\` |
| 134 | + |
| 135 | +## Important Entry Points |
| 136 | + |
| 137 | +### Application Startup |
| 138 | +- **Backend**: ThingConnect.Pulse.Server/Program.cs |
| 139 | +- **Frontend**: thingconnect.pulse.client/src/main.tsx |
| 140 | + |
| 141 | +### API Controllers |
| 142 | +- **Authentication**: Controllers/AuthController.cs |
| 143 | +- **Configuration**: Controllers/ConfigurationController.cs |
| 144 | +- **Monitoring Data**: Controllers/StatusController.cs and HistoryController.cs |
| 145 | +- **User Management**: Controllers/UserManagementController.cs |
| 146 | + |
| 147 | +### Services |
| 148 | +- **Configuration Management**: Services/ConfigurationService.cs |
| 149 | +- **Monitoring Engine**: Services/Monitoring/ |
| 150 | +- **Data Aggregation**: Services/Rollup/ |
| 151 | +- **Status Tracking**: Services/StatusService.cs |
| 152 | + |
| 153 | +### Frontend Routes |
| 154 | +- **Router Configuration**: src/router/ |
| 155 | +- **Main Pages**: src/pages/ |
| 156 | +- **Feature Components**: src/features/ |
| 157 | + |
| 158 | +## Build Outputs |
| 159 | +- **Backend**: bin/ and obj/ directories |
| 160 | +- **Frontend**: dist/ directory |
| 161 | +- **Installer**: publish/ directory |
| 162 | +- **Solution**: Published applications and installers |
0 commit comments