Skip to content

Commit 095f6bd

Browse files
author
MPCoreDeveloper
committed
new structure
1 parent 0999b22 commit 095f6bd

39 files changed

+1595
-228
lines changed

.editorconfig

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.{yml,yaml}]
15+
indent_size = 2
16+
17+
[*.{csproj,props,targets,slnx}]
18+
indent_size = 2
19+
20+
[*.cs]
21+
# Organize usings
22+
dotnet_sort_system_directives_first = true
23+
dotnet_separate_import_directive_groups = false
24+
25+
# Namespace
26+
csharp_style_namespace_declarations = file_scoped:suggestion
27+
28+
# var preferences
29+
csharp_style_var_for_built_in_types = true:suggestion
30+
csharp_style_var_when_type_is_apparent = true:suggestion
31+
csharp_style_var_elsewhere = true:suggestion
32+
33+
# Expression-bodied members
34+
csharp_style_expression_bodied_methods = when_on_single_line:suggestion
35+
csharp_style_expression_bodied_properties = true:suggestion
36+
csharp_style_expression_bodied_accessors = true:suggestion
37+
38+
# Pattern matching
39+
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
40+
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
41+
42+
# Null checking
43+
csharp_style_throw_expression = true:suggestion
44+
csharp_style_conditional_delegate_call = true:suggestion
45+
46+
# New line preferences
47+
csharp_new_line_before_open_brace = all
48+
csharp_new_line_before_else = true
49+
csharp_new_line_before_catch = true
50+
csharp_new_line_before_finally = true
51+
52+
# Naming conventions
53+
dotnet_naming_rule.async_methods_end_in_async.severity = suggestion
54+
dotnet_naming_rule.async_methods_end_in_async.symbols = any_async_methods
55+
dotnet_naming_rule.async_methods_end_in_async.style = end_in_async
56+
57+
dotnet_naming_symbols.any_async_methods.applicable_kinds = method
58+
dotnet_naming_symbols.any_async_methods.applicable_accessibilities = *
59+
dotnet_naming_symbols.any_async_methods.required_modifiers = async
60+
61+
dotnet_naming_style.end_in_async.required_suffix = Async
62+
dotnet_naming_style.end_in_async.capitalization = pascal_case

.gitattributes

Lines changed: 0 additions & 63 deletions
This file was deleted.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Bug Report
2+
description: Report a bug in SafeWebCore
3+
title: '[Bug]: '
4+
labels: ['bug']
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: Thanks for reporting a bug!
9+
- type: textarea
10+
id: description
11+
attributes:
12+
label: Description
13+
description: A clear description of the bug.
14+
validations:
15+
required: true
16+
- type: textarea
17+
id: reproduction
18+
attributes:
19+
label: Steps to Reproduce
20+
description: Steps to reproduce the behavior.
21+
validations:
22+
required: true
23+
- type: input
24+
id: dotnet-version
25+
attributes:
26+
label: .NET Version
27+
description: Output of dotnet --version
28+
validations:
29+
required: true
30+
- type: textarea
31+
id: expected
32+
attributes:
33+
label: Expected Behavior
34+
validations:
35+
required: true
36+
- type: textarea
37+
id: actual
38+
attributes:
39+
label: Actual Behavior
40+
validations:
41+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Discussions
4+
url: https://github.com/MPCoreDeveloper/SafeWebCore/discussions
5+
about: Ask questions and discuss ideas
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Feature Request
2+
description: Suggest a feature for SafeWebCore
3+
title: '[Feature]: '
4+
labels: ['enhancement']
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: Thanks for suggesting a feature!
9+
- type: textarea
10+
id: problem
11+
attributes:
12+
label: Problem Statement
13+
description: What problem does this feature solve?
14+
validations:
15+
required: true
16+
- type: textarea
17+
id: solution
18+
attributes:
19+
label: Proposed Solution
20+
description: How should this feature work?
21+
validations:
22+
required: true
23+
- type: textarea
24+
id: alternatives
25+
attributes:
26+
label: Alternatives Considered
27+
description: Any alternative solutions you have considered.
28+
validations:
29+
required: false
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
## Description
2+
3+
Brief description of the changes.
4+
5+
## Related Issue
6+
7+
Fixes #(issue number)
8+
9+
## Type of Change
10+
11+
- [ ] Bug fix
12+
- [ ] New feature
13+
- [ ] Breaking change
14+
- [ ] Documentation update
15+
16+
## Checklist
17+
18+
- [ ] Code follows project coding standards
19+
- [ ] Tests added/updated for changes
20+
- [ ] All tests pass (`dotnet test`)
21+
- [ ] XML documentation added for public APIs
22+
- [ ] CHANGELOG.md updated

.gitignore

Lines changed: 55 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,62 @@
1-
# Build Folders
1+
## .NET / Visual Studio
2+
*.suo
3+
*.user
4+
*.userosscache
5+
*.sln.docstates
6+
*.userprefs
7+
8+
# Build results
9+
[Dd]ebug/
10+
[Rr]elease/
11+
x64/
12+
x86/
213
[Bb]in/
314
[Oo]bj/
15+
[Ll]og/
16+
[Ll]ogs/
17+
bld/
18+
msbuild.log
19+
msbuild.err
20+
msbuild.wrn
421

5-
# VS Code project files
6-
.vscode/
7-
# VS project files
22+
# Visual Studio
823
.vs/
9-
# User-specific files
10-
*.user
24+
*.csproj.user
1125
*.rsuser
12-
*.suo
13-
*.userosscache
14-
*.sln.docstates
26+
*.cache
1527

16-
# ASP.NET Scaffolding
17-
ScaffoldingReadMe.txt
18-
19-
# Auto-generated by NuGet
20-
packages/
28+
# NuGet
29+
**/[Pp]ackages/*
30+
!**/[Pp]ackages/build/
2131
*.nupkg
22-
# Include packages needed for the build
23-
!packages/*.dll
24-
# Uncomment if necessary however generally it will be regenerated if needed
25-
#!packages/repositories.config
26-
.nuget/
27-
/Posseth.SafeWebCore.sln
32+
*.snupkg
33+
nuget.exe
34+
project.lock.json
35+
project.fragment.lock.json
36+
artifacts/
37+
38+
# Test results
39+
[Tt]est[Rr]esult*/
40+
[Bb]uild[Ll]og.*
41+
*.trx
42+
*.coverage
43+
*.coveragexml
44+
coverage*.xml
45+
coverage*.json
46+
TestResults/
47+
coveragereport/
48+
49+
# OS files
50+
Thumbs.db
51+
ehthumbs.db
52+
Desktop.ini
53+
.DS_Store
54+
*.swp
55+
*~
56+
57+
# JetBrains Rider
58+
.idea/
59+
*.sln.iml
60+
61+
# Publish output
62+
publish/

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
### Added
11+
12+
- Initial project structure
13+
- CSP middleware foundation
14+
- xUnit test project

CONTRIBUTING.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Contributing to SafeWebCore
2+
3+
Thank you for your interest in contributing!
4+
5+
## How to Contribute
6+
7+
1. Fork the repository
8+
2. Create a feature branch (`git checkout -b feature/my-feature`)
9+
3. Commit your changes (`git commit -m 'Add my feature'`)
10+
4. Push to the branch (`git push origin feature/my-feature`)
11+
5. Open a Pull Request
12+
13+
## Development Setup
14+
15+
### Prerequisites
16+
17+
- .NET 10 SDK
18+
- Visual Studio 2026 or later / VS Code with C# Dev Kit
19+
20+
### Build
21+
22+
```bash
23+
dotnet build
24+
```
25+
26+
### Test
27+
28+
```bash
29+
dotnet test
30+
```
31+
32+
## Coding Standards
33+
34+
- Target .NET 10 / C# 14
35+
- Use modern C# features (primary constructors, collection expressions, Lock class)
36+
- Follow the conventions in `.editorconfig`
37+
- Async methods must end with `Async` suffix
38+
- All public APIs must have XML documentation
39+
40+
## Reporting Issues
41+
42+
Use [GitHub Issues](https://github.com/MPCoreDeveloper/SafeWebCore/issues) with the provided templates.
43+
44+
## Code of Conduct
45+
46+
Be respectful and constructive. We follow the [Contributor Covenant](https://www.contributor-covenant.org/).

Directory.Build.props

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Project>
2+
<PropertyGroup>
3+
<LangVersion>preview</LangVersion>
4+
<Nullable>enable</Nullable>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
7+
<AnalysisLevel>latest-recommended</AnalysisLevel>
8+
</PropertyGroup>
9+
</Project>

0 commit comments

Comments
 (0)