Skip to content

Commit 16b6ea3

Browse files
committed
First commit
0 parents  commit 16b6ea3

116 files changed

Lines changed: 87050 additions & 0 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.

.github/copilot-instructions.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<!-- Use this file to provide workspace-specific custom instructions to Copilot. For more details, visit https://code.visualstudio.com/docs/copilot/copilot-customization#_use-a-githubcopilotinstructionsmd-file -->
2+
3+
# Signal9 RMM Agent System - Development Guidelines
4+
5+
This is a .NET 9 based Remote Monitoring and Management (RMM) system with the following architecture:
6+
7+
## Project Structure
8+
- **Signal9.Agent** - Console application (RMM agent)
9+
- **Signal9.Hub** - ASP.NET Core SignalR hub service
10+
- **Signal9.WebPortal** - ASP.NET Core MVC web application
11+
- **Signal9.Functions** - Azure Functions project
12+
- **Signal9.Shared** - Shared library with models, DTOs, and interfaces
13+
14+
## Key Technologies
15+
- .NET 9
16+
- SignalR for real-time communication
17+
- Azure services (Container Apps, SQL Database, Cosmos DB, Service Bus, Key Vault)
18+
- Entity Framework Core for SQL data access
19+
- Managed Identity for authentication
20+
- Bicep for Infrastructure as Code
21+
22+
## Development Guidelines
23+
24+
### Code Style
25+
- Use C# 12 features and modern patterns
26+
- Follow async/await patterns consistently
27+
- Use dependency injection throughout
28+
- Implement proper logging with structured logging
29+
- Use configuration patterns with IOptions<T>
30+
31+
### Azure Integration
32+
- Always use Managed Identity over connection strings
33+
- Store secrets in Azure Key Vault
34+
- Use Azure SDK packages for service integration
35+
- Follow Azure Well-Architected Framework principles
36+
37+
### SignalR Implementation
38+
- Use strongly-typed hubs with interfaces
39+
- Implement proper connection lifecycle management
40+
- Handle reconnection scenarios with exponential backoff
41+
- Use groups for organizing connections (agents, admins)
42+
43+
### Data Access
44+
- Use Entity Framework Core for SQL Database
45+
- Use Azure Cosmos DB SDK for NoSQL data
46+
- Implement repository patterns where appropriate
47+
- Use proper error handling and retry policies
48+
49+
### Agent Development
50+
- Implement robust telemetry collection
51+
- Handle command execution with proper error handling
52+
- Use background services for long-running operations
53+
- Implement graceful shutdown and restart capabilities
54+
55+
### Testing
56+
- Write unit tests for business logic
57+
- Use integration tests for SignalR hubs
58+
- Mock Azure services for testing
59+
- Test agent connectivity scenarios
60+
61+
### Security
62+
- Never hardcode credentials
63+
- Use HTTPS for all communications
64+
- Implement proper input validation
65+
- Follow least privilege principles for permissions
66+
67+
### Deployment
68+
- Use Azure Developer CLI (azd) for deployment
69+
- Container apps should use minimal base images
70+
- Configure health checks for all services
71+
- Use staging slots for safe deployments

.gitignore

Lines changed: 302 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,302 @@
1+
# Created by https://www.toptal.com/developers/gitignore/api/aspnetcore,dotnetcore,azurefunctions,azurite
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=aspnetcore,dotnetcore,azurefunctions,azurite
3+
4+
### ASPNETCore ###
5+
## Ignore Visual Studio temporary files, build results, and
6+
## files generated by popular Visual Studio add-ons.
7+
8+
# User-specific files
9+
*.suo
10+
*.user
11+
*.userosscache
12+
*.sln.docstates
13+
14+
# User-specific files (MonoDevelop/Xamarin Studio)
15+
*.userprefs
16+
17+
# Build results
18+
[Dd]ebug/
19+
[Dd]ebugPublic/
20+
[Rr]elease/
21+
[Rr]eleases/
22+
x64/
23+
x86/
24+
bld/
25+
[Bb]in/
26+
[Oo]bj/
27+
[Ll]og/
28+
29+
# Visual Studio 2015 cache/options directory
30+
.vs/
31+
# Uncomment if you have tasks that create the project's static files in wwwroot
32+
#wwwroot/
33+
34+
# MSTest test Results
35+
[Tt]est[Rr]esult*/
36+
[Bb]uild[Ll]og.*
37+
38+
# NUNIT
39+
*.VisualState.xml
40+
TestResult.xml
41+
42+
# Build Results of an ATL Project
43+
[Dd]ebugPS/
44+
[Rr]eleasePS/
45+
dlldata.c
46+
47+
# DNX
48+
project.lock.json
49+
project.fragment.lock.json
50+
artifacts/
51+
52+
*_i.c
53+
*_p.c
54+
*_i.h
55+
*.ilk
56+
*.meta
57+
*.obj
58+
*.pch
59+
*.pdb
60+
*.pgc
61+
*.pgd
62+
*.rsp
63+
*.sbr
64+
*.tlb
65+
*.tli
66+
*.tlh
67+
*.tmp
68+
*.tmp_proj
69+
*.log
70+
*.vspscc
71+
*.vssscc
72+
.builds
73+
*.pidb
74+
*.svclog
75+
*.scc
76+
77+
# Chutzpah Test files
78+
_Chutzpah*
79+
80+
# Visual C++ cache files
81+
ipch/
82+
*.aps
83+
*.ncb
84+
*.opendb
85+
*.opensdf
86+
*.sdf
87+
*.cachefile
88+
*.VC.db
89+
*.VC.VC.opendb
90+
91+
# Visual Studio profiler
92+
*.psess
93+
*.vsp
94+
*.vspx
95+
*.sap
96+
97+
# TFS 2012 Local Workspace
98+
$tf/
99+
100+
# Guidance Automation Toolkit
101+
*.gpState
102+
103+
# ReSharper is a .NET coding add-in
104+
_ReSharper*/
105+
*.[Rr]e[Ss]harper
106+
*.DotSettings.user
107+
108+
# JustCode is a .NET coding add-in
109+
.JustCode
110+
111+
# TeamCity is a build add-in
112+
_TeamCity*
113+
114+
# DotCover is a Code Coverage Tool
115+
*.dotCover
116+
117+
# Visual Studio code coverage results
118+
*.coverage
119+
*.coveragexml
120+
121+
# NCrunch
122+
_NCrunch_*
123+
.*crunch*.local.xml
124+
nCrunchTemp_*
125+
126+
# MightyMoose
127+
*.mm.*
128+
AutoTest.Net/
129+
130+
# Web workbench (sass)
131+
.sass-cache/
132+
133+
# Installshield output folder
134+
[Ee]xpress/
135+
136+
# DocProject is a documentation generator add-in
137+
DocProject/buildhelp/
138+
DocProject/Help/*.HxT
139+
DocProject/Help/*.HxC
140+
DocProject/Help/*.hhc
141+
DocProject/Help/*.hhk
142+
DocProject/Help/*.hhp
143+
DocProject/Help/Html2
144+
DocProject/Help/html
145+
146+
# Click-Once directory
147+
publish/
148+
149+
# Publish Web Output
150+
*.[Pp]ublish.xml
151+
*.azurePubxml
152+
# TODO: Comment the next line if you want to checkin your web deploy settings
153+
# but database connection strings (with potential passwords) will be unencrypted
154+
*.pubxml
155+
*.publishproj
156+
157+
# Microsoft Azure Web App publish settings. Comment the next line if you want to
158+
# checkin your Azure Web App publish settings, but sensitive information contained
159+
# in these scripts will be unencrypted
160+
PublishScripts/
161+
162+
# NuGet Packages
163+
*.nupkg
164+
# The packages folder can be ignored because of Package Restore
165+
**/packages/*
166+
# except build/, which is used as an MSBuild target.
167+
!**/packages/build/
168+
# Uncomment if necessary however generally it will be regenerated when needed
169+
#!**/packages/repositories.config
170+
# NuGet v3's project.json files produces more ignoreable files
171+
*.nuget.props
172+
*.nuget.targets
173+
174+
# Microsoft Azure Build Output
175+
csx/
176+
*.build.csdef
177+
178+
# Microsoft Azure Emulator
179+
ecf/
180+
rcf/
181+
182+
# Windows Store app package directories and files
183+
AppPackages/
184+
BundleArtifacts/
185+
Package.StoreAssociation.xml
186+
_pkginfo.txt
187+
188+
# Visual Studio cache files
189+
# files ending in .cache can be ignored
190+
*.[Cc]ache
191+
# but keep track of directories ending in .cache
192+
!*.[Cc]ache/
193+
194+
# Others
195+
ClientBin/
196+
~$*
197+
*~
198+
*.dbmdl
199+
*.dbproj.schemaview
200+
*.jfm
201+
*.pfx
202+
*.publishsettings
203+
node_modules/
204+
orleans.codegen.cs
205+
206+
# Since there are multiple workflows, uncomment next line to ignore bower_components
207+
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
208+
#bower_components/
209+
210+
# RIA/Silverlight projects
211+
Generated_Code/
212+
213+
# Backup & report files from converting an old project file
214+
# to a newer Visual Studio version. Backup files are not needed,
215+
# because we have git ;-)
216+
_UpgradeReport_Files/
217+
Backup*/
218+
UpgradeLog*.XML
219+
UpgradeLog*.htm
220+
221+
# SQL Server files
222+
*.mdf
223+
*.ldf
224+
225+
# Business Intelligence projects
226+
*.rdl.data
227+
*.bim.layout
228+
*.bim_*.settings
229+
230+
# Microsoft Fakes
231+
FakesAssemblies/
232+
233+
# GhostDoc plugin setting file
234+
*.GhostDoc.xml
235+
236+
# Node.js Tools for Visual Studio
237+
.ntvs_analysis.dat
238+
239+
# Visual Studio 6 build log
240+
*.plg
241+
242+
# Visual Studio 6 workspace options file
243+
*.opt
244+
245+
# Visual Studio LightSwitch build output
246+
**/*.HTMLClient/GeneratedArtifacts
247+
**/*.DesktopClient/GeneratedArtifacts
248+
**/*.DesktopClient/ModelManifest.xml
249+
**/*.Server/GeneratedArtifacts
250+
**/*.Server/ModelManifest.xml
251+
_Pvt_Extensions
252+
253+
# Paket dependency manager
254+
.paket/paket.exe
255+
paket-files/
256+
257+
# FAKE - F# Make
258+
.fake/
259+
260+
# JetBrains Rider
261+
.idea/
262+
*.sln.iml
263+
264+
# CodeRush
265+
.cr/
266+
267+
# Python Tools for Visual Studio (PTVS)
268+
__pycache__/
269+
*.pyc
270+
271+
# Cake - Uncomment if you are using it
272+
# tools/
273+
274+
### AzureFunctions ###
275+
# Azure Functions localsettings file
276+
local.settings.json
277+
278+
### Azurite ###
279+
# Azurite queue
280+
__queuestorage__
281+
__azurite_db_queue__.json
282+
__azurite_db_queue_extent__.json
283+
284+
# Azurite blob
285+
__blobstorage__
286+
__azurite_db_blob__.json
287+
__azurite_db_blob_extent__.json
288+
289+
# Azurite table
290+
__azurite_db_table__.json
291+
__azurite_db_table_extent__.json
292+
293+
### DotnetCore ###
294+
# .NET Core build folders
295+
bin/
296+
obj/
297+
298+
# Common node modules locations
299+
/node_modules
300+
/wwwroot/node_modules
301+
302+
# End of https://www.toptal.com/developers/gitignore/api/aspnetcore,dotnetcore,azurefunctions,azurite

0 commit comments

Comments
 (0)