Nuar 1.0.81
dotnet add package Nuar --version 1.0.81
NuGet\Install-Package Nuar -Version 1.0.81
<PackageReference Include="Nuar" Version="1.0.81" />
paket add Nuar --version 1.0.81
#r "nuget: Nuar, 1.0.81"
// Install Nuar as a Cake Addin #addin nuget:?package=Nuar&version=1.0.81 // Install Nuar as a Cake Tool #tool nuget:?package=Nuar&version=1.0.81
<div align="center">
Nuar API Gateway Framework
</div>
Nuar is an advanced, modular, and extensible API Gateway framework specifically designed for modern microservices architecture. With a focus on scalability, observability, and performance, Nuar simplifies API management, routing, and communication between services while providing seamless integration with popular tools and technologies.
================================================================================
.-----------------. .----------------. .----------------. .----------------.
| .--------------. || .--------------. || .--------------. || .--------------. |
| | ____ _____ | || | _____ _____ | || | __ | || | _______ | |
| ||_ \|_ _| | || ||_ _||_ _|| || | / \ | || | |_ __ \ | |
| | | \ | | | || | | | | | | || | / /\ \ | || | | |__) | | |
| | | |\ \| | | || | | ' ' | | || | / ____ \ | || | | __ / | |
| | _| |_\ |_ | || | \ `--' / | || | _/ / \ \_ | || | _| | \ \_ | |
| ||_____|\____| | || | `.__.' | || ||____| |____|| || | |____| |___| | |
| | | || | | || | | || | | |
| '--------------' || '--------------' || '--------------' || '--------------' |
'----------------' '----------------' '----------------' '----------------'
_ _____ _
/\ (_)/ ____| | |
/ \ _ __ _| | __ __ _| |_ _____ ____ _ _ _
/ /\ \ | '_ \| | | |_ |/ _` | __/ _ \ \ /\ / / _` | | | |
/ ____ \| |_) | | |__| | (_| | || __/\ V V / (_| | |_| |
/_/ \_\ .__/|_|\_____|\__,_|\__\___| \_/\_/ \__,_|\__, |
| | __/ |
|_| |___/
/#### Nuar API Gateway ####\
@#~ *Innovative & Fast* ~#@
================================================================================
Key Features
- Modular Design: Use only the components you need by adding or removing features via Nuar extensions.
- Authentication & Authorization: Supports JWT, OAuth, and custom authentication mechanisms.
- CORS Management: Effortlessly manage CORS policies using the Nuar.Cors extension.
- Custom Error Handling: Fine-tune error responses with Nuar.CustomErrors.
- Distributed Tracing: Achieve observability with Nuar.Tracing, leveraging OpenTelemetry.
- API Documentation: Automatically generate API docs with Nuar.Swagger using OpenAPI.
- Message Brokers: Integrate RabbitMQ with Nuar.RabbitMQ for microservices communication.
- Scalability & Resilience: Built with Polly for handling retries, circuit-breaking, and resilience.
Project Structure
.
├── docs # Documentation and assets
│ └── logo # Nuar logo assets
├── README.md # This readme file
├── scripts # Build and packaging scripts
├── src # Core and extension libraries
│ ├── Nuar # Core Nuar framework
│ ├── Nuar.Cors # CORS policy management
│ ├── Nuar.CustomErrors # Custom error handling
│ ├── Nuar.Host # Host project for running the gateway
│ ├── Nuar.JWT # JWT authentication
│ ├── Nuar.RabbitMQ # RabbitMQ messaging support
│ ├── Nuar.Swagger # Swagger API documentation
│ └── Nuar.Tracing # Distributed tracing support
Getting Started
Prerequisites
Ensure you have the following tools installed:
- .NET SDK 8.0 or later
- RabbitMQ (for message brokering)
- Docker (optional, for deployment)
Installation
Clone the Repository
git clone https://github.com/ITSharpPro/Nuar.git cd nuar_framework
Restore Dependencies
dotnet restore
Build the Project
dotnet build
Run the API Gateway
Navigate to the host directory and run the API Gateway:
cd src/Nuar.Host/src/Nuar.Host dotnet run
Configuration
Nuar is fully configurable through YAML. Define routes, services, CORS, security policies, and more in nuar.yml
:
routes:
- path: /api/service1
service: service1
method: GET
auth:
required: true
Packaging & Deployment
Build & Package: Use the following script to package all components:
bash scripts/pack-all.sh
Run Tests: To execute all unit tests, run:
bash scripts/build-and-test.sh
Available Extensions
Nuar is designed to be modular. Below are some key extensions:
- Nuar.Cors: Manage Cross-Origin Resource Sharing (CORS) policies.
- Nuar.JWT: Add JWT-based authentication and authorization.
- Nuar.RabbitMQ: Integrate RabbitMQ for message-based communication.
- Nuar.Swagger: Generate API documentation with Swagger and OpenAPI.
- Nuar.Tracing: Utilize OpenTelemetry for distributed tracing and observability.
Contributing
Contributions are welcome! If you have a bug report, feature request, or want to contribute code, please follow these steps:
- Fork the repository.
- Create a new feature branch.
- Submit a pull request with your changes.
We also encourage opening discussions on issues to get feedback from the community before starting large feature developments.
License
The Nuar Framework is licensed under the Apache-2.0 License.
For more information, visit ITSharpPro or check the official documentation.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. |
-
net8.0
- MessagePack (>= 2.5.172)
- Microsoft.Extensions.Http.Polly (>= 8.0.8)
- NetJSON (>= 1.4.4)
- NJsonSchema (>= 11.0.2)
- NJsonSchema.Yaml (>= 11.0.2)
- System.Runtime.Loader (>= 4.3.0)
- YamlDotNet (>= 16.1.2)
-
net9.0
- MessagePack (>= 2.5.172)
- Microsoft.Extensions.Http.Polly (>= 8.0.8)
- NetJSON (>= 1.4.4)
- NJsonSchema (>= 11.0.2)
- NJsonSchema.Yaml (>= 11.0.2)
- System.Runtime.Loader (>= 4.3.0)
- YamlDotNet (>= 16.1.2)
NuGet packages (7)
Showing the top 5 NuGet packages that depend on Nuar:
Package | Downloads |
---|---|
Nuar.JWT
Nuar.JWT - JWT authentication extension for the Nuar API gateway framework |
|
Nuar.Cors
Nuar.Cors - CORS extension for the Nuar API gateway framework |
|
Nuar.CustomErrors
Nuar.CustomErrors - Custom error handling extension for the Nuar API gateway framework |
|
Nuar.Tracing
Nuar.Tracing - Distributed tracing support for the Nuar API gateway framework |
|
Nuar.RabbitMQ
Nuar.RabbitMQ - RabbitMQ extension for the Nuar API gateway framework |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.81 | 124 | 10/10/2024 |
1.0.74 | 138 | 10/6/2024 |
1.0.71 | 128 | 10/5/2024 |
1.0.69 | 133 | 10/5/2024 |
1.0.67 | 135 | 10/5/2024 |
1.0.65 | 132 | 10/5/2024 |
1.0.63 | 146 | 9/29/2024 |
1.0.62 | 127 | 9/29/2024 |
1.0.61 | 126 | 9/29/2024 |
1.0.60 | 134 | 9/29/2024 |
1.0.59 | 135 | 9/29/2024 |
1.0.58 | 142 | 9/29/2024 |
1.0.55 | 127 | 9/29/2024 |
1.0.41 | 140 | 9/29/2024 |
1.0.39 | 120 | 9/29/2024 |
1.0.37 | 97 | 9/29/2024 |
1.0.35 | 102 | 9/29/2024 |
1.0.33 | 89 | 9/29/2024 |
1.0.29 | 108 | 9/29/2024 |
1.0.27 | 91 | 9/29/2024 |
1.0.23 | 92 | 9/27/2024 |
1.0.19 | 95 | 9/27/2024 |
1.0.8 | 119 | 9/26/2024 |
1.0.5 | 157 | 9/26/2024 |
1.0.2 | 84 | 9/26/2024 |
Initial release of the Nuar framework for building scalable API gateways in a microservices architecture.