Skip to content

Commit e441588

Browse files
authored
Merge pull request #1 from osisdie/ci/new
Add GitHub community essentials for repo visibility
2 parents 1bf3d6e + 15d38aa commit e441588

File tree

7 files changed

+222
-17
lines changed

7 files changed

+222
-17
lines changed

.env.example

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# ASP.NET Core
2+
ASPNETCORE_ENVIRONMENT=Development
3+
4+
# SDK API Configuration
5+
SDK__ApiKey=
6+
SDK__ServiceName=
7+
8+
# Redis (optional)
9+
# REDIS__ConnectionString=
10+
11+
# MySQL (optional)
12+
# MYSQL__ConnectionString=
13+
14+
# AWS (optional)
15+
# AWS__AccessKey=
16+
# AWS__SecretKey=
17+
# AWS__Region=us-west-2
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Bug Report
3+
about: Report a bug to help us improve
4+
title: "[Bug] "
5+
labels: bug
6+
assignees: ""
7+
---
8+
9+
## Description
10+
A clear and concise description of the bug.
11+
12+
## Steps to Reproduce
13+
1.
14+
2.
15+
3.
16+
17+
## Expected Behavior
18+
What you expected to happen.
19+
20+
## Actual Behavior
21+
What actually happened.
22+
23+
## Environment
24+
- OS: [e.g., Windows 11, Ubuntu 22.04]
25+
- .NET SDK Version: [e.g., 8.0.100]
26+
- Module: [e.g., Caching, Auth, Http]
27+
28+
## Additional Context
29+
Add any other context, logs, or screenshots here.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: Feature Request
3+
about: Suggest a new feature or improvement
4+
title: "[Feature] "
5+
labels: enhancement
6+
assignees: ""
7+
---
8+
9+
## Summary
10+
A clear and concise description of the feature you'd like.
11+
12+
## Module
13+
Which module does this relate to?
14+
- [ ] Abstractions
15+
- [ ] Auth
16+
- [ ] Caching
17+
- [ ] Common
18+
- [ ] Configuration
19+
- [ ] DataAccess
20+
- [ ] Extensions
21+
- [ ] Hosting
22+
- [ ] Http
23+
- [ ] Location
24+
- [ ] Logging
25+
- [ ] Measurement
26+
- [ ] MessageQueue
27+
- [ ] Notification
28+
- [ ] ServiceNode
29+
- [ ] Storage
30+
- [ ] New module
31+
32+
## Use Case
33+
Describe the problem this feature would solve or the use case it enables.
34+
35+
## Proposed Solution
36+
How you think this could be implemented (optional).
37+
38+
## Alternatives Considered
39+
Any alternative approaches you've considered.

.github/workflows/dotnet.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: .NET Build
2+
3+
on:
4+
push:
5+
branches: [main, dev]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Setup .NET
17+
uses: actions/setup-dotnet@v4
18+
with:
19+
dotnet-version: 8.0.x
20+
21+
- name: Restore dependencies
22+
run: dotnet restore
23+
24+
- name: Build
25+
run: dotnet build --no-restore --configuration Release
26+
27+
- name: Test
28+
run: dotnet test --no-build --configuration Release --verbosity normal
29+
continue-on-error: true

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,3 +277,10 @@ __pycache__/
277277
# Custom
278278
**/aws-logger-errors.txt
279279
NuGet.Config
280+
281+
# Environment and local settings
282+
.env
283+
.env.*
284+
!.env.example
285+
settings.local.json
286+
**/settings.local.json

CONTRIBUTING.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Contributing to Nwpie.Foundation.NetCore.SDK
2+
3+
Thank you for your interest in contributing! Here's how to get started.
4+
5+
## Development Setup
6+
7+
```bash
8+
git clone https://github.com/osisdie/Nwpie.Foundation.NetCore.SDK.git
9+
cd Nwpie.Foundation.NetCore.SDK
10+
dotnet restore
11+
dotnet build
12+
dotnet test
13+
```
14+
15+
**Prerequisites**: .NET 8 SDK
16+
17+
## How to Contribute
18+
19+
1. **Fork** the repository
20+
2. **Create a branch**: `git checkout -b feature/my-feature`
21+
3. **Make your changes** and add tests where applicable
22+
4. **Run tests**: `dotnet test`
23+
5. **Submit a pull request** with a clear description of your changes
24+
25+
## Project Structure
26+
27+
```
28+
src/ # SDK modules (each module is self-contained)
29+
tests/ # Unit and integration tests
30+
samples/ # Sample applications (MiniSite, Serverless)
31+
docker/ # Docker configurations
32+
build/ # Build scripts and configurations
33+
```
34+
35+
## Coding Guidelines
36+
37+
- **Library projects** target `netstandard2.1` for broad compatibility
38+
- **Application projects** (endpoints, lambdas) target `net8.0`
39+
- Follow existing naming conventions and code style
40+
- Add unit tests for new functionality
41+
- Keep modules self-contained and loosely coupled
42+
43+
## Reporting Issues
44+
45+
- Use the [Bug Report](.github/ISSUE_TEMPLATE/bug_report.md) template for bugs
46+
- Use the [Feature Request](.github/ISSUE_TEMPLATE/feature_request.md) template for new ideas
47+
48+
## License
49+
50+
By contributing, you agree that your contributions will be licensed under the [BSD-3-Clause License](LICENSE).

README.md

Lines changed: 51 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1-
# Nwpie.Foundation.NetCore.SDK
1+
# Nwpie.Foundation.NetCore.SDK
22

33
[![.NET](https://img.shields.io/badge/.NET-8.0-blue.svg)](https://dotnet.microsoft.com/download/dotnet/8.0)
44
[![License](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg)](LICENSE)
5+
[![Build](https://github.com/osisdie/Nwpie.Foundation.NetCore.SDK/actions/workflows/dotnet.yml/badge.svg)](https://github.com/osisdie/Nwpie.Foundation.NetCore.SDK/actions/workflows/dotnet.yml)
6+
[![GitHub stars](https://img.shields.io/github/stars/osisdie/Nwpie.Foundation.NetCore.SDK)](https://github.com/osisdie/Nwpie.Foundation.NetCore.SDK/stargazers)
7+
[![GitHub issues](https://img.shields.io/github/issues/osisdie/Nwpie.Foundation.NetCore.SDK)](https://github.com/osisdie/Nwpie.Foundation.NetCore.SDK/issues)
8+
[![Last commit](https://img.shields.io/github/last-commit/osisdie/Nwpie.Foundation.NetCore.SDK)](https://github.com/osisdie/Nwpie.Foundation.NetCore.SDK/commits/main)
59

610
**Nwpie.Foundation.NetCore.SDK** is a comprehensive, modular SDK built for .NET Core (.NET 8) developers. It simplifies and enhances application development by providing an all-in-one solution with well-defined abstractions, robust utilities, and modularized components. This SDK is tailored for modern .NET Core projects and is fully supported with unit tests.
711

812
## Table of Contents
913
- [Features](#features)
1014
- [Modules Overview](#modules-overview)
15+
- [Quick Start](#quick-start)
1116
- [Getting Started](#getting-started)
1217
- [Clone the Repository](#clone-the-repository)
1318
- [Explore Modules](#explore-modules)
@@ -49,6 +54,49 @@ The SDK provides the following modules, located under the `src/` directory:
4954

5055
---
5156

57+
## Quick Start
58+
59+
### Caching
60+
61+
Register local or Redis caching in your DI container:
62+
63+
```csharp
64+
// In-memory cache
65+
services.AddLocalCache<ILocalCache>();
66+
services.AddAsDefaultICache<ILocalCache>();
67+
68+
// Redis cache (requires Caching.Redis module)
69+
services.AddRedisCache<IRedisCache>();
70+
```
71+
72+
### Serialization
73+
74+
Register the default JSON serializer:
75+
76+
```csharp
77+
services.AddDefaultSerializer<ISerializer>();
78+
```
79+
80+
### Service Startup
81+
82+
A typical service `Startup.cs` wires up serialization, caching, and module-specific services:
83+
84+
```csharp
85+
public void ConfigureServices(IServiceCollection services)
86+
{
87+
services.AddDefaultSerializer<ISerializer>();
88+
services.AddLocalCache<ILocalCache>();
89+
services.AddAsDefaultICache<ILocalCache>();
90+
91+
// Add module-specific services
92+
services.AddConfigServer<IConfigServer>();
93+
}
94+
```
95+
96+
See the [samples/](samples/) directory for complete working examples (MiniSite, Serverless).
97+
98+
---
99+
52100
## Getting Started
53101

54102
### Clone the Repository
@@ -85,11 +133,7 @@ This will execute all unit tests and verify the SDK's functionality.
85133
---
86134

87135
## Contributing
88-
We welcome contributions from the open-source community! To get involved:
89-
90-
1. Fork the repository.
91-
2. Create a feature branch.
92-
3. Submit a pull request with detailed information about your changes.
136+
We welcome contributions from the open-source community! See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
93137

94138
---
95139

@@ -99,14 +143,4 @@ This project is licensed under the BSD-3-Clause License. See the [LICENSE](LICEN
99143
---
100144

101145
## Support
102-
If you encounter any issues or have suggestions, feel free to open an issue on GitHub. We'd love to hear your feedback!
103-
104-
---
105-
106-
Feel free to adapt this template as needed for your project's specifics!
107-
108-
---
109-
110-
Happy coding! 🚀
111-
112-
---
146+
If you encounter any issues or have suggestions, feel free to open an [issue](https://github.com/osisdie/Nwpie.Foundation.NetCore.SDK/issues) on GitHub.

0 commit comments

Comments
 (0)