├── docs ├── nexuria.jpeg ├── architecture.md ├── deployment-guide.md ├── component-interactions.md └── README.md ├── .github └── ISSUE_TEMPLATE │ ├── custom.md │ ├── feature_request.md │ └── bug_report.md ├── infrastructure ├── monitoring │ ├── prometheus │ │ ├── config │ │ │ ├── service-discovery.yaml │ │ │ └── prometheus-config.yaml │ │ └── nexuria-prometheus-config.yaml │ └── grafana │ │ ├── config │ │ └── grafana-config.yaml │ │ └── nexuria-grafana-dashboard.json └── cloud │ ├── on-prem │ ├── nexuria-on-prem-deploy.yaml │ └── tools │ │ └── deployer │ │ └── ansible-playbook │ │ └── ansible-playbook.yml │ ├── aws │ └── nexuria-aws-deploy.yaml │ ├── azure │ └── nexuria-azure-deploy.yaml │ └── gcp │ └── nexuria-gcp-deploy.yaml ├── src ├── components │ ├── gap │ │ ├── Adoption.cs │ │ ├── GAPDbContext.cs │ │ ├── GlobalAdoptionPlatform.csproj │ │ ├── Program.cs │ │ └── GlobalAdoptionPlatform.cs │ ├── rce │ │ ├── rce.config.json │ │ └── RCE.cs │ ├── eam │ │ ├── eam.config.json │ │ └── EAM.cs │ ├── if │ │ ├── if.config.json │ │ └── IF.cs │ ├── ire │ │ ├── ire.config.json │ │ └── IRE.cs │ ├── pch │ │ ├── pch.config.json │ │ └── PCH.cs │ ├── qrbc │ │ ├── QRBCService.cs │ │ ├── Program.cs │ │ ├── QRBC.csproj │ │ └── QRBC.cs │ └── neuronetwork │ │ ├── NeuroNetworkService.cs │ │ ├── Program.cs │ │ ├── NeuroNetwork.csproj │ │ └── NeuroNetwork.cs └── nexuria-core │ ├── Program.cs │ ├── NexuriaCore.csproj │ └── NexuriaCore.cs ├── .gitignore ├── config ├── environment.config.json ├── logging.config.json └── nexuria.config.json ├── tests └── unit-tests │ ├── QRBCUnitTests.cs │ ├── NexuriaCoreUnitTests.csproj │ ├── integration-tests │ ├── NexuriaCoreIntegrationTests.csproj │ └── NexuriaCoreIntegrationTests.cs │ └── NexuriaCoreUnitTests.cs ├── tools ├── ci-cd │ └── nexuria-ci-cd-pipeline.yaml └── code-analysis │ └── nexuria-code-analysis.config ├── LICENSE └── README.md /docs/nexuria.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KOSASIH/NexuriaCore/HEAD/docs/nexuria.jpeg -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/custom.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Custom issue template 3 | about: Describe this issue template's purpose here. 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | -------------------------------------------------------------------------------- /infrastructure/monitoring/prometheus/config/service-discovery.yaml: -------------------------------------------------------------------------------- 1 | # Service discovery file 2 | 3 | - targets: 4 | - nexuria-api-gateway:8080 5 | - nexuria-qrbcs:8081 6 | - nexuria-neuronetworks:8082 7 | - nexuria-gaps:8083 8 | labels: 9 | job: nexuria 10 | -------------------------------------------------------------------------------- /src/components/gap/Adoption.cs: -------------------------------------------------------------------------------- 1 | namespace Nexuria.GAP.Models 2 | { 3 | public class Adoption 4 | { 5 | public int Id { get; set; } 6 | public string Name { get; set; } 7 | public string Description { get; set; } 8 | public DateTime Date { get; set; } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries 2 | bin/ 3 | obj/ 4 | 5 | # NuGet packages 6 | *.nupkg 7 | 8 | # Visual Studio files 9 | *.vs/ 10 | *.csproj.user 11 | 12 | # Test results 13 | TestResults/ 14 | 15 | # Azure deployment files 16 | NexuriaARMTemplate.json 17 | NexuriaARMParameters.json 18 | 19 | # Other files 20 | app.config 21 | packages.config 22 | -------------------------------------------------------------------------------- /infrastructure/monitoring/grafana/config/grafana-config.yaml: -------------------------------------------------------------------------------- 1 | # Grafana configuration file 2 | 3 | # Define the data sources 4 | datasources: 5 | - name: Nexuria Prometheus 6 | type: prometheus 7 | url: http://localhost:9090 8 | access: proxy 9 | 10 | # Define the dashboards 11 | dashboards: 12 | - name: Nexuria Dashboard 13 | file: nexuria-grafana-dashboard.json 14 | 15 | # Define the server 16 | server: 17 | http_port: 3000 18 | enable_gzip: true 19 | -------------------------------------------------------------------------------- /src/components/gap/GAPDbContext.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.EntityFrameworkCore; 2 | using Nexuria.GAP.Models; 3 | 4 | namespace Nexuria.GAP 5 | { 6 | public class GAPDbContext : DbContext 7 | { 8 | public GAPDbContext(DbContextOptions options) : base(options) 9 | { 10 | } 11 | 12 | public DbSet Adoptions { get; set; } 13 | 14 | protected override void OnModelCreating(ModelBuilder modelBuilder) 15 | { 16 | modelBuilder.Entity().HasKey(a => a.Id); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/components/rce/rce.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "regulatoryFrameworks": [ 3 | { 4 | "name": "AML/KYC", 5 | "rules": [ 6 | "Verify customer identity", 7 | "Monitor transactions for suspicious activity" 8 | ] 9 | }, 10 | { 11 | "name": "GDPR", 12 | "rules": [ 13 | "Protect user data", 14 | "Obtain consent for data processing" 15 | ] 16 | } 17 | ], 18 | "jurisdictions": [ 19 | { 20 | "name": "USA", 21 | "regulatoryFrameworks": ["AML/KYC"] 22 | }, 23 | { 24 | "name": "EU", 25 | "regulatoryFrameworks": ["GDPR"] 26 | } 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /src/components/eam/eam.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "learningPaths": [ 3 | { 4 | "name": "Blockchain basics", 5 | "modules": [ 6 | "Introduction to blockchain", 7 | "Blockchain architecture" 8 | ] 9 | }, 10 | { 11 | "name": "Pi Coin usage", 12 | "modules": [ 13 | "Getting started with Pi Coin", 14 | "Advanced Pi Coin features" 15 | ] 16 | } 17 | ], 18 | "userRoles": [ 19 | { 20 | "name": "User", 21 | "learningPaths": ["Blockchain basics", "Pi Coin usage"] 22 | }, 23 | { 24 | "name": "Business", 25 | "learningPaths": ["Pi Coin usage", "Advanced Pi Coin features"] 26 | } 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /src/components/if/if.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "blockchainNetworks": [ 3 | { 4 | "name": "Ethereum", 5 | "adapter": "EthereumAdapter" 6 | }, 7 | { 8 | "name": "Bitcoin", 9 | "adapter": "BitcoinAdapter" 10 | } 11 | ], 12 | "traditionalFinancialSystems": [ 13 | { 14 | "name": "Visa", 15 | "adapter": "VisaAdapter" 16 | }, 17 | { 18 | "name": "Mastercard", 19 | "adapter": "MastercardAdapter" 20 | } 21 | ], 22 | "iotDevices": [ 23 | { 24 | "name": "Smart thermostat", 25 | "adapter": "SmartThermostatAdapter" 26 | }, 27 | { 28 | "name": "Smart lighting system", 29 | "adapter": "SmartLightingSystemAdapter" 30 | } 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /src/components/ire/ire.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "rewardTypes": [ 3 | { 4 | "name": "Pi Coin rewards", 5 | "description": "Rewards in Pi Coin" 6 | }, 7 | { 8 | "name": "Discounts", 9 | "description": "Discounts on Pi Coin transactions" 10 | } 11 | ], 12 | "incentivePrograms": [ 13 | { 14 | "name": "Referral program", 15 | "rewardType": "Pi Coin rewards", 16 | "rules": [ 17 | "Refer a friend to Pi Coin", 18 | "Get 10 Pi Coin as a reward" 19 | ] 20 | }, 21 | { 22 | "name": "Loyalty program", 23 | "rewardType": "Discounts", 24 | "rules": [ 25 | "Make 10 transactions on Pi Coin", 26 | "Get 10% discount on next transaction" 27 | ] 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /src/components/pch/pch.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "partners": [ 3 | { 4 | "name": "Government of USA", 5 | "type": "government", 6 | "collaborations": [ 7 | "Joint research initiative", 8 | "Regulatory sandbox" 9 | ] 10 | }, 11 | { 12 | "name": "Bank of America", 13 | "type": "financial institution", 14 | "collaborations": [ 15 | "Pilot program for blockchain-based payments" 16 | ] 17 | } 18 | ], 19 | "collaborationTypes": [ 20 | { 21 | "name": "Joint research initiative", 22 | "description": "Collaborative research project" 23 | }, 24 | { 25 | "name": "Regulatory sandbox", 26 | "description": "Experimental environment for regulatory testing" 27 | } 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /src/components/pch/PCH.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace PCH 5 | { 6 | public class PartnershipHub 7 | { 8 | private readonly List _partners; 9 | private readonly List _collaborationTypes; 10 | 11 | public PartnershipHub(PCHConfig config) 12 | { 13 | _partners = config.Partners; 14 | _collaborationTypes = config.CollaborationTypes; 15 | } 16 | 17 | public void CreateCollaboration(Partner partner, CollaborationType collaborationType) 18 | { 19 | // Create a new collaboration instance 20 | var collaboration = new Collaboration(partner, collaborationType); 21 | // Add the collaboration to the partner's list of collaborations 22 | partner.Collaborations.Add(collaboration); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/components/ire/IRE.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace IRE 5 | { 6 | public class IncentivizationEngine 7 | { 8 | private readonly List _rewardTypes; 9 | private readonly List _incentivePrograms; 10 | 11 | public IncentivizationEngine(IREConfig config) 12 | { 13 | _rewardTypes = config.RewardTypes; 14 | _incentivePrograms = config.IncentivePrograms; 15 | } 16 | 17 | public void ProcessIncentive(User user, IncentiveProgram program) 18 | { 19 | // Check if the user meets the rules of the incentive program 20 | if (program.Rules.All(rule => rule.IsMet(user))) 21 | { 22 | // Award the user with the corresponding reward 23 | var reward = program.RewardType.GetReward(); 24 | user.Rewards.Add(reward); 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/components/rce/RCE.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace RCE 5 | { 6 | public class RegulatoryComplianceEngine 7 | { 8 | private readonly List _regulatoryFrameworks; 9 | private readonly List _jurisdictions; 10 | 11 | public RegulatoryComplianceEngine(RCEConfig config) 12 | { 13 | _regulatoryFrameworks = config.RegulatoryFrameworks; 14 | _jurisdictions = config.Jurisdictions; 15 | } 16 | 17 | public void MonitorTransactions(Transaction transaction) 18 | { 19 | foreach (var framework in _regulatoryFrameworks) 20 | { 21 | foreach (var rule in framework.Rules) 22 | { 23 | if (!rule.IsCompliant(transaction)) 24 | { 25 | throw new RegulatoryNonComplianceException(rule.Name); 26 | } 27 | } 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/components/eam/EAM.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace EAM 5 | { 6 | public class EducationEcosystem 7 | { 8 | private readonly List _learningPaths; 9 | private readonly List _userRoles; 10 | 11 | public EducationEcosystem(EAMConfig config) 12 | { 13 | _learningPaths = config.LearningPaths; 14 | _userRoles = config.UserRoles; 15 | } 16 | 17 | public void EnrollUser(User user, UserRole role) 18 | { 19 | // Enroll the user in the learning paths associated with their role 20 | foreach (var learningPath in role.LearningPaths) 21 | { 22 | user.LearningPaths.Add(learningPath); 23 | } 24 | } 25 | 26 | public void CompleteModule(User user, Module module) 27 | { 28 | // Mark the module as completed for the user 29 | user.CompletedModules.Add(module); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /config/environment.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft-07/schema#", 3 | "title": "Nexuria Environment Configuration", 4 | "description": "Environment-specific configuration file for NexuriaCore", 5 | "type": "object", 6 | "properties": { 7 | "environment": { 8 | "type": "string", 9 | "enum": ["development", "staging", "production"], 10 | "default": "development", 11 | "description": "Environment name" 12 | }, 13 | "logging": { 14 | "type": "object", 15 | "properties": { 16 | "level": { 17 | "type": "string", 18 | "enum": ["debug", "info", "warn", "error", "fatal"], 19 | "default": "info", 20 | "description": "Logging level" 21 | }, 22 | "format": { 23 | "type": "string", 24 | "enum": ["json", "text"], 25 | "default": "json", 26 | "description": "Logging format" 27 | } 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /src/components/qrbc/QRBCService.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Microsoft.Extensions.Configuration; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Threading.Tasks; 7 | 8 | namespace Nexuria.QRBC 9 | { 10 | public class QRBCService 11 | { 12 | private readonly ILogger _logger; 13 | private readonly IConfiguration _configuration; 14 | private readonly IServiceProvider _serviceProvider; 15 | 16 | public QRBCService(ILogger logger, IConfiguration configuration, IServiceProvider serviceProvider) 17 | { 18 | _logger = logger; 19 | _configuration = configuration; 20 | _serviceProvider = serviceProvider; 21 | } 22 | 23 | public async Task HandleRequestAsync(string request) 24 | { 25 | _logger.LogInformation("Handling QRBC request..."); 26 | // Handle the QRBC request 27 | _logger.LogInformation("QRBC request handled."); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/components/neuronetwork/NeuroNetworkService.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Microsoft.Extensions.Configuration; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Threading.Tasks; 7 | using MathNet.Numerics.LinearAlgebra; 8 | 9 | namespace Nexuria.NeuroNetwork 10 | { 11 | public class NeuroNetworkService 12 | { 13 | private readonly ILogger _logger; 14 | private readonly IConfiguration _configuration; 15 | private readonly IServiceProvider _serviceProvider; 16 | private readonly NeuroNetwork _neuroNetwork; 17 | 18 | public NeuroNetworkService(ILogger logger, IConfiguration configuration, IServiceProvider serviceProvider) 19 | { 20 | _logger = logger; 21 | _configuration = configuration; 22 | _serviceProvider = serviceProvider; 23 | _neuroNetwork = serviceProvider.GetService(); 24 | } 25 | 26 | public async Task HandleRequestAsync(Matrix inputs) 27 | { 28 | _logger.LogInformation("Handling NeuroNetwork request..."); 29 | await _neuroNetwork.PredictAsync(inputs); 30 | _logger.LogInformation("NeuroNetwork request handled."); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /infrastructure/monitoring/prometheus/config/prometheus-config.yaml: -------------------------------------------------------------------------------- 1 | # Prometheus rules file 2 | 3 | groups: 4 | - name: nexuria-rules 5 | rules: 6 | - alert: InstanceDown 7 | expr: up == 0 8 | for: 5m 9 | labels: 10 | severity: critical 11 | annotations: 12 | summary: "Instance {{ $labels.instance }} is down" 13 | description: "Instance {{ $labels.instance }} has been down for 5 minutes" 14 | 15 | - alert: HighCPUUsage 16 | expr: 100 - (100 - avg by (instance) (irate(node_cpu_seconds_total{job='nexuria-api-gateway'}[1m]))) > 80 17 | for: 5m 18 | labels: 19 | severity: warning 20 | annotations: 21 | summary: "High CPU usage on instance {{ $labels.instance }}" 22 | description: "CPU usage on instance {{ $labels.instance }} is above 80% for 5 minutes" 23 | 24 | - alert: HighMemoryUsage 25 | expr: 100 - (100 - avg by (instance) (node_memory_MemTotal_bytes{job='nexuria-api-gateway'} - node_memory_MemFree_bytes{job='nexuria-api-gateway'}) / node_memory_MemTotal_bytes{job='nexuria-api-gateway'} * 100) > 80 26 | for: 5m 27 | labels: 28 | severity: warning 29 | annotations: 30 | summary: "High memory usage on instance {{ $labels.instance }}" 31 | description: "Memory usage on instance {{ $labels.instance }} is above 80% for 5 minutes" 32 | -------------------------------------------------------------------------------- /src/components/if/IF.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace IF 5 | { 6 | public class InteroperabilityFramework 7 | { 8 | private readonly List _blockchainNetworks; 9 | private readonly List _traditionalFinancialSystems; 10 | private readonly List _iotDevices; 11 | 12 | public InteroperabilityFramework(IFConfig config) 13 | { 14 | _blockchainNetworks = config.BlockchainNetworks; 15 | _traditionalFinancialSystems = config.TraditionalFinancialSystems; 16 | _iotDevices = config.IoTDevices; 17 | } 18 | 19 | public void IntegrateWithBlockchainNetwork(BlockchainNetwork network) 20 | { 21 | // Integrate Pi Coin with the blockchain network using the corresponding adapter 22 | var adapter = network.Adapter; 23 | adapter.Integrate(); 24 | } 25 | 26 | public void IntegrateWithTraditionalFinancialSystem( TraditionalFinancialSystem system) 27 | { 28 | // Integrate Pi Coin with the traditional financial system using the corresponding adapter 29 | var adapter = system.Adapter; 30 | adapter.Integrate(); 31 | } 32 | 33 | public void IntegrateWithIoTDevice(IoTDevice device) 34 | { 35 | // Integrate Pi Coin with the IoT device using the corresponding adapter 36 | var adapter = device.Adapter; 37 | adapter.Integrate(); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/components/qrbc/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Microsoft.Extensions.Configuration; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using System; 5 | using System.Threading.Tasks; 6 | 7 | namespace Nexuria.QRBC 8 | { 9 | class Program 10 | { 11 | static async Task Main(string[] args) 12 | { 13 | var serviceProvider = BuildServiceProvider(); 14 | var qrbc = serviceProvider.GetService(); 15 | 16 | await qrbc.InitializeAsync(); 17 | await qrbc.StartAsync(); 18 | 19 | Console.WriteLine("Press any key to exit..."); 20 | Console.ReadKey(); 21 | 22 | await qrbc.StopAsync(); 23 | } 24 | 25 | static IServiceProvider BuildServiceProvider() 26 | { 27 | var configuration = new ConfigurationBuilder() 28 | .AddJsonFile("appsettings.json") 29 | .Build(); 30 | 31 | var serviceProvider = new ServiceCollection() 32 | .AddLogging(logging => 33 | { 34 | logging.AddConsole(); 35 | logging.AddDebug(); 36 | }) 37 | .AddSingleton() 38 | .AddSingleton() 39 | .AddSingleton(configuration) 40 | .BuildServiceProvider(); 41 | 42 | return serviceProvider; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/nexuria-core/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Microsoft.Extensions.Configuration; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using System; 5 | using System.Threading.Tasks; 6 | 7 | namespace Nexuria 8 | { 9 | class Program 10 | { 11 | static async Task Main(string[] args) 12 | { 13 | var serviceProvider = BuildServiceProvider(); 14 | var nexuriaCore = serviceProvider.GetService(); 15 | 16 | nexuriaCore.Initialize(); 17 | nexuriaCore.Start(); 18 | 19 | Console.WriteLine("Press any key to exit..."); 20 | Console.ReadKey(); 21 | 22 | nexuriaCore.Stop(); 23 | } 24 | 25 | static IServiceProvider BuildServiceProvider() 26 | { 27 | var configuration = new ConfigurationBuilder() 28 | .AddJsonFile("appsettings.json") 29 | .Build(); 30 | 31 | var serviceProvider = new ServiceCollection() 32 | .AddLogging(logging => 33 | { 34 | logging.AddConsole(); 35 | logging.AddDebug(); 36 | }) 37 | .AddSingleton() 38 | .AddSingleton() 39 | .AddSingleton(configuration) 40 | .BuildServiceProvider(); 41 | 42 | return serviceProvider; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/nexuria-core/NexuriaCore.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | net6.0 4 | Nexuria 5 | NexuriaCore 6 | NexuriaCore 7 | 1.0.0 8 | Nexuria 9 | Nexuria Core Library 10 | https://opensource.org/licenses/MIT 11 | https://github.com/nexuria/nexuria-core 12 | https://github.com/nexuria/nexuria-core 13 | git 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /config/logging.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft-07/schema#", 3 | "title": "Nexuria Logging Configuration", 4 | "description": "Logging configuration file for NexuriaCore", 5 | "type": "object", 6 | "properties": { 7 | "loggers": { 8 | "type": "array", 9 | "items": { 10 | "type": "object", 11 | "properties": { 12 | "name": { 13 | "type": "string", 14 | "description": "Logger name" 15 | }, 16 | "level": { 17 | "type": "string", 18 | "enum": ["debug", "info", "warn", "error", "fatal"], 19 | "description": "Logger level" 20 | }, 21 | "appenders": { 22 | "type": "array", 23 | "items": { 24 | "type": "object", 25 | "properties": { 26 | "type": { 27 | "type": "string", 28 | "enum": ["console", "file"], 29 | "description": "Appender type" 30 | }, 31 | "layout": { 32 | "type": "object", 33 | " properties": { 34 | "type": { 35 | "type": "string", 36 | "enum": ["json", "text"], 37 | "description": "Layout type" 38 | } 39 | } 40 | } 41 | } 42 | } 43 | } 44 | } 45 | } 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/components/qrbc/QRBC.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | net6.0 4 | Nexuria.QRBC 5 | Nexuria.QRBC 6 | Nexuria.QRBC 7 | 1.0.0 8 | Nexuria 9 | Nexuria QRBC Component 10 | https://opensource.org/licenses/MIT 11 | https://github.com/nexuria/nexuria-qrbc 12 | https://github.com/nexuria/nexuria-qrbc 13 | git 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/components/neuronetwork/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Microsoft.Extensions.Configuration; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using System; 5 | using System.Threading.Tasks; 6 | using MathNet.Numerics.LinearAlgebra; 7 | 8 | namespace Nexuria.NeuroNetwork 9 | { 10 | class Program 11 | { 12 | static async Task Main(string[] args) 13 | { 14 | var serviceProvider = BuildServiceProvider(); 15 | var neuroNetwork = serviceProvider.GetService(); 16 | 17 | await neuroNetwork.InitializeAsync(); 18 | await neuroNetwork.TrainAsync(Matrix.Build.Dense(10, 10), Matrix.Build.Dense(10, 1)); 19 | 20 | Console.WriteLine("Press any key to exit..."); 21 | Console.ReadKey(); 22 | 23 | await neuroNetwork.PredictAsync(Matrix.Build.Dense(10, 1)); 24 | } 25 | 26 | static IServiceProvider BuildServiceProvider() 27 | { 28 | var configuration = new ConfigurationBuilder() 29 | .AddJsonFile("appsettings.json") 30 | .Build(); 31 | 32 | var serviceProvider = new ServiceCollection() 33 | .AddLogging(logging => 34 | { 35 | logging.AddConsole(); 36 | logging.AddDebug(); 37 | }) 38 | .AddSingleton() 39 | .AddSingleton() 40 | .AddSingleton(configuration) 41 | .BuildServiceProvider(); 42 | 43 | return serviceProvider; 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/components/qrbc/QRBC.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Microsoft.Extensions.Configuration; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Threading.Tasks; 7 | 8 | namespace Nexuria.QRBC 9 | { 10 | public class QRBC 11 | { 12 | private readonly ILogger _logger; 13 | private readonly IConfiguration _configuration; 14 | private readonly IServiceProvider _serviceProvider; 15 | 16 | public QRBC(ILogger logger, IConfiguration configuration, IServiceProvider serviceProvider) 17 | { 18 | _logger = logger; 19 | _configuration = configuration; 20 | _serviceProvider = serviceProvider; 21 | } 22 | 23 | public async Task InitializeAsync() 24 | { 25 | _logger.LogInformation("Initializing QRBC..."); 26 | _configuration.Bind("QRBC", _serviceProvider.GetService()); 27 | _logger.LogInformation("QRBC initialized."); 28 | } 29 | 30 | public async Task StartAsync() 31 | { 32 | _logger.LogInformation("Starting QRBC..."); 33 | // Start the QRBC service 34 | _logger.LogInformation("QRBC started."); 35 | } 36 | 37 | public async Task StopAsync() 38 | { 39 | _logger.LogInformation("Stopping QRBC..."); 40 | // Stop the QRBC service 41 | _logger.LogInformation("QRBC stopped."); 42 | } 43 | } 44 | 45 | public class QRBCOptions 46 | { 47 | public string Url { get; set; } 48 | public int Port { get; set; } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/components/gap/GlobalAdoptionPlatform.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | net6.0 4 | Nexuria.GAP 5 | Nexuria.GAP 6 | Nexuria.GAP 7 | 1.0.0 8 | Nexuria 9 | Nexuria Global Adoption Platform 10 | https://opensource.org/licenses/MIT 11 | https://github.com/nexuria/nexuria-gap 12 | https://github.com/nexuria/nexuria-gap 13 | git 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/components/gap/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Microsoft.Extensions.Configuration; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using System; 5 | using System.Threading.Tasks; 6 | using Nexuria.GAP; 7 | 8 | namespace Nexuria.GAP 9 | { 10 | class Program 11 | { 12 | static async Task Main(string[] args) 13 | { 14 | var serviceProvider = BuildServiceProvider(); 15 | var gap = serviceProvider.GetService(); 16 | 17 | await gap.InitializeAsync(); 18 | await gap.StartAsync(); 19 | 20 | Console.WriteLine("Press any key to exit..."); 21 | Console.ReadKey(); 22 | 23 | await gap.StopAsync(); 24 | } 25 | 26 | static IServiceProvider BuildServiceProvider() 27 | { 28 | var configuration = new ConfigurationBuilder() 29 | .AddJsonFile("appsettings.json") 30 | .Build(); 31 | 32 | var serviceProvider = new ServiceCollection() 33 | .AddLogging(logging => 34 | { 35 | logging.AddConsole(); 36 | logging.AddDebug(); 37 | }) 38 | .AddSingleton() 39 | .AddSingleton() 40 | .AddSingleton(configuration) 41 | .AddDbContext(options => 42 | { 43 | options.UseSqlServer(configuration.GetConnectionString("GAPDatabase")); 44 | }) 45 | .BuildServiceProvider(); 46 | 47 | return serviceProvider; 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /infrastructure/monitoring/prometheus/nexuria-prometheus-config.yaml: -------------------------------------------------------------------------------- 1 | # Prometheus configuration file 2 | 3 | # Global configuration 4 | global: 5 | scrape_interval: 10s 6 | evaluation_interval: 10s 7 | external_labels: 8 | environment: nexuria 9 | 10 | # Alerting configuration 11 | alerting: 12 | alertmanagers: 13 | - static_configs: 14 | - targets: ["localhost:9093"] 15 | 16 | # Rule files 17 | rule_files: 18 | - "nexuria-rules/*.yml" 19 | 20 | # Scrape configuration 21 | scrape_configs: 22 | - job_name: "nexuria-api-gateway" 23 | scrape_interval: 10s 24 | metrics_path: /metrics 25 | static_configs: 26 | - targets: ["nexuria-api-gateway:8080"] 27 | 28 | - job_name: "nexuria-qrbcs" 29 | scrape_interval: 10s 30 | metrics_path: /metrics 31 | static_configs: 32 | - targets: ["nexuria-qrbcs:8081"] 33 | 34 | - job_name: "nexuria-neuronetworks" 35 | scrape_interval: 10s 36 | metrics_path: /metrics 37 | static_configs: 38 | - targets: ["nexuria-neuronetworks:8082"] 39 | 40 | - job_name: "nexuria-gaps" 41 | scrape_interval: 10s 42 | metrics_path: /metrics 43 | static_configs: 44 | - targets: ["nexuria-gaps:8083"] 45 | 46 | - job_name: "node" 47 | scrape_interval: 10s 48 | metrics_path: /metrics 49 | static_configs: 50 | - targets: ["localhost:9100"] 51 | 52 | # Service discovery configuration 53 | service_discovery: 54 | file_sd_configs: 55 | - files: 56 | - nexuria-sd/*.yml 57 | refresh_interval: 10s 58 | 59 | # Remote write configuration 60 | remote_write: 61 | - url: http://localhost:9090/api/v1/write 62 | queue_config: 63 | max_samples_per_send: 1000 64 | batch_send_deadline: 10s 65 | -------------------------------------------------------------------------------- /src/components/neuronetwork/NeuroNetwork.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | net6.0 4 | Nexuria.NeuroNetwork 5 | Nexuria.NeuroNetwork 6 | Nexuria.NeuroNetwork 7 | 1.0.0 8 | Nexuria 9 | Nexuria NeuroNetwork Component 10 | https://opensource.org/licenses/MIT 11 | https://github.com/nexuria/nexuria-neuronetwork 12 | https://github.com/nexuria/nexuria-neuronetwork 13 | git 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /tests/unit-tests/QRBCUnitTests.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | using Moq; 3 | using Microsoft.Extensions .Logging; 4 | using Microsoft.Extensions.Configuration; 5 | using Microsoft.Extensions.DependencyInjection; 6 | using System; 7 | using System.Collections.Generic; 8 | using System.Threading.Tasks; 9 | using Nexuria.Core.QRBC; 10 | 11 | namespace Nexuria.Core.UnitTests 12 | { 13 | public class QRBCUnitTests 14 | { 15 | private readonly Mock> _loggerMock; 16 | private readonly Mock _configurationMock; 17 | private readonly Mock _serviceProviderMock; 18 | 19 | public QRBCUnitTests() 20 | { 21 | _loggerMock = new Mock>(); 22 | _configurationMock = new Mock(); 23 | _serviceProviderMock = new Mock(); 24 | } 25 | 26 | [Fact] 27 | public async Task GenerateQRCodeAsync_QRCodeGenerated() 28 | { 29 | // Arrange 30 | var qRBC = new QRBC(_loggerMock.Object, _configurationMock.Object, _serviceProviderMock.Object); 31 | 32 | // Act 33 | var qrCode = await qRBC.GenerateQRCodeAsync("https://example.com"); 34 | 35 | // Assert 36 | Assert.NotNull(qrCode); 37 | } 38 | 39 | [Fact] 40 | public async Task ValidateQRCodeAsync_QRCodeValidated() 41 | { 42 | // Arrange 43 | var qRBC = new QRBC(_loggerMock.Object, _configurationMock.Object, _serviceProviderMock.Object); 44 | 45 | // Act 46 | var isValid = await qRBC.ValidateQRCodeAsync("https://example.com"); 47 | 48 | // Assert 49 | Assert.True(isValid); 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/nexuria-core/NexuriaCore.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Microsoft.Extensions.Configuration; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using System; 5 | using System.Collections.Generic; 6 | 7 | namespace Nexuria 8 | { 9 | public class NexuriaCore 10 | { 11 | private readonly ILogger _logger; 12 | private readonly IConfiguration _configuration; 13 | private readonly IServiceProvider _serviceProvider; 14 | 15 | public NexuriaCore(ILogger logger, IConfiguration configuration, IServiceProvider serviceProvider) 16 | { 17 | _logger = logger; 18 | _configuration = configuration; 19 | _serviceProvider = serviceProvider; 20 | } 21 | 22 | public void Initialize() 23 | { 24 | _logger.LogInformation("Initializing Nexuria Core..."); 25 | _configuration.Bind("Nexuria", _serviceProvider.GetService()); 26 | _logger.LogInformation("Nexuria Core initialized."); 27 | } 28 | 29 | public void Start() 30 | { 31 | _logger.LogInformation("Starting Nexuria Core..."); 32 | // Start the Nexuria services 33 | _logger.LogInformation("Nexuria Core started."); 34 | } 35 | 36 | public void Stop() 37 | { 38 | _logger.LogInformation("Stopping Nexuria Core..."); 39 | // Stop the Nexuria services 40 | _logger.LogInformation("Nexuria Core stopped."); 41 | } 42 | } 43 | 44 | public class NexuriaOptions 45 | { 46 | public string ApiGatewayUrl { get; set; } 47 | public string QrbcsUrl { get; set; } 48 | public string NeuroNetworksUrl { get; set; } 49 | public string GapsUrl { get; set; } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /docs/architecture.md: -------------------------------------------------------------------------------- 1 | # Nexuria Architecture 2 | 3 | ## Overview 4 | 5 | Nexuria is a highly scalable and modular architecture designed to support a wide range of applications and services. The architecture is built around a microservices-based approach, with each component designed to be highly available, fault-tolerant, and easily maintainable. 6 | 7 | ## Components 8 | 9 | ### API Gateway 10 | 11 | * Handles incoming requests from clients 12 | * Routes requests to appropriate microservices 13 | * Provides authentication and authorization 14 | * Supports load balancing and caching 15 | 16 | ### Microservices 17 | 18 | * **QRBC (Quantum-Resistant Blockchain)**: Provides a secure and decentralized ledger for storing and managing data 19 | * **NeuroNetwork**: Provides real-time optimization of the Pi Network 20 | * **GAP (Global Adoption Platform)**: Provides a seamless onboarding experience for users, businesses, and governments 21 | 22 | ### Data Storage 23 | 24 | * **Database**: Stores and manages data for the application 25 | * **Cache**: Provides fast and efficient data retrieval 26 | 27 | ### Security 28 | 29 | * **Authentication**: Handles user authentication and authorization 30 | * **Encryption**: Encrypts data in transit and at rest 31 | 32 | ## Interactions 33 | 34 | * **API Gateway** -> **Microservices**: Routes requests to appropriate microservices 35 | * **Microservices** -> **Data Storage**: Stores and retrieves data 36 | * **Microservices** -> **Security**: Authenticates and authorizes requests 37 | 38 | ## Benefits 39 | 40 | * Highly scalable and modular architecture 41 | * Highly available and fault-tolerant components 42 | * Easy maintenance and updates 43 | * Secure and decentralized data storage 44 | * Real-time optimization of the Pi Network 45 | * Seamless onboarding experience for users, businesses, and governments 46 | -------------------------------------------------------------------------------- /docs/deployment-guide.md: -------------------------------------------------------------------------------- 1 | # Deployment Guide 2 | 3 | ## Overview 4 | 5 | This document provides a step-by-step guide to deploying the Nexuria architecture. 6 | 7 | ## Prerequisites 8 | 9 | * **Infrastructure**: A cloud provider (e.g. AWS, GCP, Azure) or on-premises infrastructure 10 | * **Docker**: Docker installed on the infrastructure 11 | * **Kubernetes**: Kubernetes installed on the infrastructure 12 | 13 | ## Deployment Steps 14 | 15 | ### Step 1: Create a Docker Image 16 | 17 | * Create a Dockerfile for each microservice 18 | * Build the Docker image for each microservice 19 | * Push the Docker image to a container registry (e.g. Docker Hub) 20 | 21 | ### Step 2: Create a Kubernetes Cluster 22 | 23 | * Create a Kubernetes cluster on the infrastructure 24 | * Configure the Kubernetes cluster to use the container registry 25 | 26 | ### Step 3: Deploy the API Gateway 27 | 28 | * Create a Kubernetes deployment for the API Gateway 29 | * Configure the API Gateway to route requests to the microservices 30 | 31 | ### Step 4: Deploy the Microservices 32 | 33 | * Create a Kubernetes deployment for each microservice 34 | * Configure each microservice to communicate with the API Gateway and Data Storage 35 | 36 | ### Step 5: Deploy the Data Storage 37 | 38 | * Create a Kubernetes deployment for the Data Storage 39 | * Configure the Data Storage to store and retrieve data for the microservices 40 | 41 | ### Step 6: Deploy the Security Components 42 | 43 | * Create a Kubernetes deployment for the Security components 44 | * Configure the Security components to authenticate and authorize requests 45 | 46 | ### Step 7: Configure Monitoring and Logging 47 | 48 | * Configure monitoring and logging for the entire architecture 49 | 50 | ### Step 8: Test and Validate 51 | 52 | * Test and validate the entire architecture to ensure it is working as expected 53 | -------------------------------------------------------------------------------- /tests/unit-tests/NexuriaCoreUnitTests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | net6.0 4 | Nexuria.Core.UnitTests 5 | Nexuria.Core.UnitTests 6 | Nexuria.Core.UnitTests 7 | 1.0.0 8 | Nexuria 9 | Nexuria Core Unit Tests 10 | https://opensource.org/licenses/MIT 11 | https://github.com/nexuria/nexuria-core-unit-tests 12 | https://github.com/nexuria/nexuria-core-unit-tests 13 | git 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /docs/component-interactions.md: -------------------------------------------------------------------------------- 1 | # Component Interactions 2 | 3 | ## Overview 4 | 5 | This document describes the interactions between the various components of the Nexuria architecture. 6 | 7 | ## API Gateway 8 | 9 | * **Incoming Requests**: Handles incoming requests from clients 10 | * **Routing**: Routes requests to appropriate microservices 11 | * **Authentication**: Authenticates and authorizes requests 12 | * **Load Balancing**: Distributes incoming traffic across multiple instances of microservices 13 | * **Caching**: Caches frequently accessed data to improve performance 14 | 15 | ## Microservices 16 | 17 | * **QRBC (Quantum-Resistant Blockchain)**: Provides a secure and decentralized ledger for storing and managing data 18 | + **Data Storage**: Stores and retrieves data from the database 19 | + **Security**: Authenticates and authorizes requests 20 | * **NeuroNetwork**: Provides real-time optimization of the Pi Network 21 | + **Data Storage**: Stores and retrieves data from the database 22 | + **Security**: Authenticates and authorizes requests 23 | * **GAP (Global Adoption Platform)**: Provides a seamless onboarding experience for users, businesses, and governments 24 | + **Data Storage**: Stores and retrieves data from the database 25 | + **Security**: Authenticates and authorizes requests 26 | 27 | ## Data Storage 28 | 29 | * **Database**: Stores and manages data for the application 30 | * **Cache**: Provides fast and efficient data retrieval 31 | 32 | ## Security 33 | 34 | * **Authentication**: Handles user authentication and authorization 35 | * **Encryption**: Encrypts data in transit and at rest 36 | 37 | ## Interactions 38 | 39 | * **API Gateway** -> **Microservices**: Routes requests to appropriate microservices 40 | * **Microservices** -> **Data Storage**: Stores and retrieves data 41 | * **Microservices** -> **Security**: Authenticates and authorizes requests 42 | * **Data Storage** -> **Cache**: Caches frequently accessed data 43 | * **Security** -> **Encryption**: Encrypts data in transit and at rest 44 | -------------------------------------------------------------------------------- /tests/unit-tests/integration-tests/NexuriaCoreIntegrationTests.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | net6.0 4 | Nexuria.Core.IntegrationTests 5 | Nexuria.Core.IntegrationTests 6 | Nexuria.Core.IntegrationTests 7 | 1.0.0 8 | Nexuria 9 | Nexuria Core Integration Tests 10 | https://opensource.org/licenses/MIT 11 | https://github.com/nexuria/nexuria-core-integration-tests 12 | https://github.com/nexuria/nexuria-core-integration-tests 13 | git 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/components/neuronetwork/NeuroNetwork.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Microsoft.Extensions.Configuration; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Threading.Tasks; 7 | using MathNet.Numerics.LinearAlgebra; 8 | 9 | namespace Nexuria.NeuroNetwork 10 | { 11 | public class NeuroNetwork 12 | { 13 | private readonly ILogger _logger; 14 | private readonly IConfiguration _configuration; 15 | private readonly IServiceProvider _serviceProvider; 16 | private readonly Matrix _weights; 17 | private readonly Matrix _biases; 18 | 19 | public NeuroNetwork(ILogger logger, IConfiguration configuration, IServiceProvider serviceProvider) 20 | { 21 | _logger = logger; 22 | _configuration = configuration; 23 | _serviceProvider = serviceProvider; 24 | _weights = Matrix.Build.Dense(10, 10); 25 | _biases = Matrix.Build.Dense(10, 1); 26 | } 27 | 28 | public async Task InitializeAsync() 29 | { 30 | _logger.LogInformation("Initializing NeuroNetwork..."); 31 | _configuration.Bind("NeuroNetwork", _serviceProvider.GetService()); 32 | _logger.LogInformation("NeuroNetwork initialized."); 33 | } 34 | 35 | public async Task TrainAsync(Matrix inputs, Matrix outputs) 36 | { 37 | _logger.LogInformation("Training NeuroNetwork..."); 38 | // Train the NeuroNetwork using backpropagation 39 | _logger.LogInformation("NeuroNetwork trained."); 40 | } 41 | 42 | public async Task PredictAsync(Matrix inputs) 43 | { 44 | _logger.LogInformation("Predicting with NeuroNetwork..."); 45 | // Make predictions using the trained NeuroNetwork 46 | _logger.LogInformation("Prediction made."); 47 | } 48 | } 49 | 50 | public class NeuroNetworkOptions 51 | { 52 | public int HiddenLayers { get; set; } 53 | public int HiddenLayerSize { get; set; } 54 | public double LearningRate { get; set; } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /tests/unit-tests/NexuriaCoreUnitTests.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | using Moq; 3 | using Microsoft.Extensions.Logging; 4 | using Microsoft.Extensions.Configuration; 5 | using Microsoft.Extensions.DependencyInjection; 6 | using System; 7 | using System.Collections.Generic; 8 | using System.Threading.Tasks; 9 | using Nexuria.Core; 10 | 11 | namespace Nexuria.Core.UnitTests 12 | { 13 | public class NexuriaCoreUnitTests 14 | { 15 | private readonly Mock> _loggerMock; 16 | private readonly Mock _configurationMock; 17 | private readonly Mock _serviceProviderMock; 18 | 19 | public NexuriaCoreUnitTests() 20 | { 21 | _loggerMock = new Mock>(); 22 | _configurationMock = new Mock(); 23 | _serviceProviderMock = new Mock(); 24 | } 25 | 26 | [Fact] 27 | public async Task InitializeAsync_LoggerInitialized_ConfigurationBound() 28 | { 29 | // Arrange 30 | var nexuriaCore = new NexuriaCore(_loggerMock.Object, _configurationMock.Object, _serviceProviderMock.Object); 31 | 32 | // Act 33 | await nexuriaCore.InitializeAsync(); 34 | 35 | // Assert 36 | _loggerMock.Verify(l => l.LogInformation(It.IsAny()), Times.Once); 37 | _configurationMock.Verify(c => c.Bind(It.IsAny(), It.IsAny()), Times.Once); 38 | } 39 | 40 | [Fact] 41 | public async Task StartAsync_ServiceStarted() 42 | { 43 | // Arrange 44 | var nexuriaCore = new NexuriaCore(_loggerMock.Object, _configurationMock.Object, _serviceProviderMock.Object); 45 | 46 | // Act 47 | await nexuriaCore.StartAsync(); 48 | 49 | // Assert 50 | _loggerMock.Verify(l => l.LogInformation(It.IsAny()), Times.Once); 51 | } 52 | 53 | [Fact] 54 | public async Task StopAsync_ServiceStopped() 55 | { 56 | // Arrange 57 | var nexuriaCore = new NexuriaCore(_loggerMock.Object, _configurationMock.Object, _serviceProviderMock.Object); 58 | 59 | // Act 60 | await nexuriaCore.StopAsync(); 61 | 62 | // Assert 63 | _loggerMock.Verify(l => l.LogInformation(It.IsAny()), Times.Once); 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/components/gap/GlobalAdoptionPlatform.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Extensions.Logging; 2 | using Microsoft.Extensions.Configuration; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Threading.Tasks; 7 | using Microsoft.EntityFrameworkCore; 8 | using Nexuria.GAP.Models; 9 | 10 | namespace Nexuria.GAP 11 | { 12 | public class GlobalAdoptionPlatform 13 | { 14 | private readonly ILogger _logger; 15 | private readonly IConfiguration _configuration; 16 | private readonly IServiceProvider _serviceProvider; 17 | private readonly GAPDbContext _dbContext; 18 | 19 | public GlobalAdoptionPlatform(ILogger logger, IConfiguration configuration, IServiceProvider serviceProvider) 20 | { 21 | _logger = logger; 22 | _configuration = configuration; 23 | _serviceProvider = serviceProvider; 24 | _dbContext = serviceProvider.GetService(); 25 | } 26 | 27 | public async Task InitializeAsync() 28 | { 29 | _logger.LogInformation("Initializing Global Adoption Platform..."); 30 | _configuration.Bind("GAP", _serviceProvider.GetService()); 31 | _logger.LogInformation("Global Adoption Platform initialized."); 32 | } 33 | 34 | public async Task StartAsync() 35 | { 36 | _logger.LogInformation("Starting Global Adoption Platform..."); 37 | // Start the Global Adoption Platform services 38 | _logger.LogInformation("Global Adoption Platform started."); 39 | } 40 | 41 | public async Task StopAsync() 42 | { 43 | _logger.LogInformation("Stopping Global Adoption Platform..."); 44 | // Stop the Global Adoption Platform services 45 | _logger.LogInformation("Global Adoption Platform stopped."); 46 | } 47 | 48 | public async Task AddAdoptionAsync(Adoption adoption) 49 | { 50 | _logger.LogInformation("Adding adoption to database..."); 51 | _dbContext.Adoptions.Add(adoption); 52 | await _dbContext.SaveChangesAsync(); 53 | _logger.LogInformation("Adoption added to database."); 54 | } 55 | 56 | public async Task GetAdoptionsAsync() 57 | { 58 | _logger.LogInformation("Retrieving adoptions from database..."); 59 | var adoptions = await _dbContext.Adoptions.ToListAsync(); 60 | _logger.LogInformation("Adoptions retrieved from database."); 61 | return adoptions; 62 | } 63 | } 64 | 65 | public class GAPOptions 66 | { 67 | public string DatabaseConnectionString { get; set; } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /config/nexuria.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json-schema.org/draft-07/schema#", 3 | "title": "Nexuria Configuration", 4 | "description": "Configuration file for NexuriaCore", 5 | "type": "object", 6 | "properties": { 7 | "api": { 8 | "type": "object", 9 | "properties": { 10 | "port": { 11 | "type": "integer", 12 | "default": 8080, 13 | "description": "API port number" 14 | }, 15 | "host": { 16 | "type": "string", 17 | "default": "localhost", 18 | "description": "API host" 19 | }, 20 | "cors": { 21 | "type": "object", 22 | "properties": { 23 | "enabled": { 24 | "type": "boolean", 25 | "default": true, 26 | "description": "Enable CORS" 27 | }, 28 | "allowedOrigins": { 29 | "type": "array", 30 | "items": { 31 | "type": "string" 32 | }, 33 | "default": ["*"], 34 | "description": "Allowed CORS origins" 35 | } 36 | } 37 | } 38 | } 39 | }, 40 | "database": { 41 | "type": "object", 42 | "properties": { 43 | "type": { 44 | "type": "string", 45 | "enum": ["mysql", "postgres", "mongodb"], 46 | "default": "mysql", 47 | "description": "Database type" 48 | }, 49 | "host": { 50 | "type": "string", 51 | "default": "localhost", 52 | "description": "Database host" 53 | }, 54 | "port": { 55 | "type": "integer", 56 | "default": 3306, 57 | "description": "Database port" 58 | }, 59 | "username": { 60 | "type": "string", 61 | "default": "root", 62 | "description": "Database username" 63 | }, 64 | "password": { 65 | "type": "string", 66 | "default": "", 67 | "description": "Database password" 68 | }, 69 | "database": { 70 | "type": "string", 71 | "default": "nexuria", 72 | "description": "Database name" 73 | } 74 | } 75 | }, 76 | "security": { 77 | "type": "object", 78 | "properties": { 79 | "jwt": { 80 | "type": "object", 81 | "properties": { 82 | "secret": { 83 | "type": "string", 84 | "default": "secret", 85 | "description": "JWT secret" 86 | }, 87 | "expiresIn": { 88 | "type": "integer", 89 | "default": 3600, 90 | "description": "JWT expiration time in seconds" 91 | } 92 | } 93 | } 94 | } 95 | } 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /tests/unit-tests/integration-tests/NexuriaCoreIntegrationTests.cs: -------------------------------------------------------------------------------- 1 | using Xunit; 2 | using Moq; 3 | using Microsoft.Extensions.Logging; 4 | using Microsoft.Extensions.Configuration; 5 | using Microsoft.Extensions.DependencyInjection; 6 | using System; 7 | using System.Collections.Generic; 8 | using System.Threading.Tasks; 9 | using Nexuria.Core; 10 | 11 | namespace Nexuria.Core.IntegrationTests 12 | { 13 | public class NexuriaCoreIntegrationTests 14 | { 15 | private readonly Mock> _loggerMock; 16 | private readonly Mock _configurationMock; 17 | private readonly Mock _serviceProviderMock; 18 | 19 | public NexuriaCoreIntegrationTests() 20 | { 21 | _loggerMock = new Mock>(); 22 | _configurationMock = new Mock(); 23 | _serviceProviderMock = new Mock(); 24 | } 25 | 26 | [Fact] 27 | public async Task InitializeAsync_LoggerInitialized_ConfigurationBound_ServiceStarted() 28 | { 29 | // Arrange 30 | var nexuriaCore = new NexuriaCore(_loggerMock.Object, _configurationMock.Object, _serviceProviderMock.Object); 31 | 32 | // Act 33 | await nexuriaCore.InitializeAsync(); 34 | await nexuriaCore.StartAsync(); 35 | 36 | // Assert 37 | _loggerMock.Verify(l => l.LogInformation(It.IsAny()), Times.AtLeastOnce); 38 | _configurationMock.Verify(c => c.Bind(It.IsAny(), It.IsAny()), Times.Once); 39 | } 40 | 41 | [Fact] 42 | public async Task StopAsync_ServiceStopped() 43 | { 44 | // Arrange 45 | var nexuriaCore = new NexuriaCore(_loggerMock.Object, _configurationMock.Object, _serviceProviderMock.Object); 46 | 47 | // Act 48 | await nexuriaCore.StopAsync(); 49 | 50 | // Assert 51 | _loggerMock.Verify(l => l.LogInformation(It.IsAny()), Times.Once); 52 | } 53 | 54 | [Fact] 55 | public async Task GenerateQRCodeAsync_QRCodeGenerated() 56 | { 57 | // Arrange 58 | var qRBC = new QRBC(_loggerMock.Object, _configurationMock.Object, _serviceProviderMock.Object); 59 | 60 | // Act 61 | var qrCode = await qRBC.GenerateQRCodeAsync("https://example.com"); 62 | 63 | // Assert 64 | Assert.NotNull(qrCode); 65 | } 66 | 67 | [Fact] 68 | public async Task ValidateQRCodeAsync_QRCodeValidated() 69 | { 70 | // Arrange 71 | var qRBC = new QRBC(_loggerMock.Object, _configurationMock.Object, _serviceProviderMock.Object); 72 | 73 | // Act 74 | var isValid = await q RBC.ValidateQRCodeAsync("https://example.com"); 75 | 76 | // Assert 77 | Assert.True(isValid); 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /infrastructure/cloud/on-prem/nexuria-on-prem-deploy.yaml: -------------------------------------------------------------------------------- 1 | # Nexuria On-Premises Deployment YAML File 2 | 3 | # Define the on-premises environment 4 | environment: 5 | name: nexuria-on-prem 6 | description: Nexuria on-premises deployment 7 | 8 | # Define the on-premises network 9 | network: 10 | name: nexuria-network 11 | cidr_block: 10.0.0.0/16 12 | subnets: 13 | - name: nexuria-subnet 14 | cidr_block: 10.0.1.0/24 15 | - name: nexuria-subnet-2 16 | cidr_block: 10.0.2.0/24 17 | 18 | # Define the on-premises firewall rules 19 | firewall_rules: 20 | - name: nexuria-firewall-rule 21 | source_ranges: 22 | - 0.0.0.0/0 23 | allowed: 24 | - protocol: tcp 25 | ports: 26 | - 22 27 | - 80 28 | - 443 29 | 30 | # Define the on-premises servers 31 | servers: 32 | - name: nexuria-api-gateway 33 | type: Ubuntu Server 20.04 LTS 34 | cpu: 4 35 | memory: 16 36 | disk: 30 37 | network_interfaces: 38 | - name: nexuria-nic 39 | subnet: ${network.subnets[0].name} 40 | os: 41 | username: nexuria 42 | password: ${ADMIN_PASSWORD} 43 | services: 44 | - name: docker 45 | enabled: true 46 | started: true 47 | - name: nexuria-qrbcs 48 | type: Ubuntu Server 20.04 LTS 49 | cpu: 4 50 | memory: 16 51 | disk: 30 52 | network_interfaces: 53 | - name: nexuria-nic-2 54 | subnet: ${network.subnets[1].name} 55 | os: 56 | username: nexuria 57 | password: ${ADMIN_PASSWORD} 58 | services: 59 | - name: docker 60 | enabled: true 61 | started: true 62 | - name: nexuria-neuronetworks 63 | type: Ubuntu Server 20.04 LTS 64 | cpu: 4 65 | memory: 16 66 | disk: 30 67 | network_interfaces: 68 | - name: nexuria-nic-3 69 | subnet: ${network.subnets[0].name} 70 | os: 71 | username: nexuria 72 | password: ${ADMIN_PASSWORD} 73 | services: 74 | - name: docker 75 | enabled: true 76 | started: true 77 | - name: nexuria-gaps 78 | type: Ubuntu Server 20.04 LTS 79 | cpu: 4 80 | memory: 16 81 | disk: 30 82 | network_interfaces: 83 | - name: nexuria-nic-4 84 | subnet: ${network.subnets[1].name} 85 | os: 86 | username: nexuria 87 | password: ${ADMIN_PASSWORD} 88 | services: 89 | - name: docker 90 | enabled: true 91 | started: true 92 | 93 | # Define the on-premises storage 94 | storage: 95 | name: nexuria-storage 96 | type: Ceph 97 | capacity: 1000 98 | 99 | # Define the on-premises database 100 | database: 101 | name: nexuria-database 102 | type: PostgreSQL 103 | version: 12 104 | username: nexuria 105 | password: ${ADMIN_PASSWORD} 106 | storage: ${storage.name} 107 | 108 | # Define the on-premises monitoring 109 | monitoring: 110 | name: nexuria-monitoring 111 | type: Prometheus 112 | targets: 113 | - ${servers[0].name} 114 | - ${servers[1].name} 115 | - ${servers[2].name} 116 | - ${servers[3].name} 117 | -------------------------------------------------------------------------------- /tools/ci-cd/nexuria-ci-cd-pipeline.yaml: -------------------------------------------------------------------------------- 1 | trigger: 2 | - main 3 | 4 | pool: 5 | vmImage: 'ubuntu-latest' 6 | 7 | variables: 8 | buildConfiguration: 'Release' 9 | solution: '**/*.sln' 10 | project: '**/*.csproj' 11 | testProject: '**/*Tests.csproj' 12 | packageId: 'Nexuria' 13 | packageVersion: '1.0.0' 14 | packageOutputPath: '$(System.DefaultWorkingDirectory)/packages' 15 | 16 | stages: 17 | - build 18 | - test 19 | - package 20 | - deploy 21 | 22 | build: 23 | stage: build 24 | displayName: 'Build' 25 | jobs: 26 | - job: build 27 | displayName: 'Build' 28 | steps: 29 | - task: DotNetCoreCLI@2 30 | displayName: 'Restore NuGet Packages' 31 | inputs: 32 | command: 'restore' 33 | projects: '$(solution)' 34 | - task: DotNetCoreCLI@2 35 | displayName: 'Build' 36 | inputs: 37 | command: 'build' 38 | projects: '$(solution)' 39 | arguments: '--configuration $(buildConfiguration)' 40 | 41 | test: 42 | stage: test 43 | displayName: 'Test' 44 | dependsOn: build 45 | jobs: 46 | - job: test 47 | displayName: 'Test' 48 | steps: 49 | - task: DotNetCoreCLI@2 50 | displayName: 'Restore NuGet Packages' 51 | inputs: 52 | command: 'restore' 53 | projects: '$(testProject)' 54 | - task: DotNetCoreCLI@2 55 | displayName: 'Run Unit Tests' 56 | inputs: 57 | command: 'test' 58 | projects: '$(testProject)' 59 | arguments: '--configuration $(buildConfiguration)' 60 | - task: DotNetCoreCLI@2 61 | displayName: 'Run Integration Tests' 62 | inputs: 63 | command: 'test' 64 | projects: '$(testProject)' 65 | arguments: '--configuration $(buildConfiguration)' 66 | 67 | package: 68 | stage: package 69 | displayName: 'Package' 70 | dependsOn: test 71 | jobs: 72 | - job: package 73 | displayName: 'Package' 74 | steps: 75 | - task: DotNetCoreCLI@2 76 | displayName: 'Pack' 77 | inputs: 78 | command: 'pack' 79 | projects: '$(project)' 80 | nobuild: true 81 | includeSymbols: true 82 | includeSource: true 83 | outputDirectory: '$(packageOutputPath)' 84 | 85 | deploy: 86 | stage: deploy 87 | displayName: 'Deploy' 88 | dependsOn: package 89 | jobs: 90 | - job: deploy 91 | displayName: 'Deploy' 92 | steps: 93 | - task: AzureResourceManagerTemplateDeployment@3 94 | displayName: 'Deploy to Azure' 95 | inputs: 96 | deploymentScope: 'ResourceGroup' 97 | azureResourceManagerConnection: 'NexuriaAzureConnection' 98 | subscriptionName: 'NexuriaSubscription' 99 | resourceGroupName: 'NexuriaResourceGroup' 100 | location: 'West US' 101 | templateLocation: 'Linked artifact' 102 | csmFile: '$(System.DefaultWorkingDirectory)/NexuriaARMTemplate.json' 103 | csmParametersFile: '$(System.DefaultWorkingDirectory)/NexuriaARMParameters.json' 104 | overrideParameters: '-packageId $(packageId) -packageVersion $(packageVersion)' 105 | -------------------------------------------------------------------------------- /infrastructure/cloud/on-prem/tools/deployer/ansible-playbook/ansible-playbook.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - name: Deploy Nexuria On-Premises Infrastructure 3 | hosts: localhost 4 | become: yes 5 | 6 | vars: 7 | environment: nexuria-on-prem 8 | network: nexuria-network 9 | subnet: nexuria-subnet 10 | firewall_rule: nexuria-firewall-rule 11 | servers: 12 | - name: nexuria-api-gateway 13 | type: Ubuntu Server 20.04 LTS 14 | cpu: 4 15 | memory: 16 16 | disk: 30 17 | - name: nexuria-qrbcs 18 | type: Ubuntu Server 20.04 LTS 19 | cpu: 4 20 | memory: 16 21 | disk: 30 22 | - name: nexuria-neuronetworks 23 | type: Ubuntu Server 20.04 LTS 24 | cpu: 4 25 | memory: 16 26 | disk: 30 27 | - name: nexuria-gaps 28 | type: Ubuntu Server 20.04 LTS 29 | cpu: 4 30 | memory: 16 31 | disk: 30 32 | storage: nexuria-storage 33 | database: nexuria-database 34 | monitoring: nexuria-monitoring 35 | 36 | tasks: 37 | - name: Create network 38 | os_network: 39 | name: "{{ network }}" 40 | cidr: "10.0.0.0/16" 41 | state: present 42 | 43 | - name: Create subnets 44 | os_subnet: 45 | name: "{{ subnet }}" 46 | network_name: "{{ network }}" 47 | cidr: "10.0.1.0/24" 48 | state: present 49 | 50 | - name: Create firewall rule 51 | os_firewall_rule: 52 | name: "{{ firewall_rule }}" 53 | source_ranges: 54 | - "0.0.0.0/0" 55 | allowed: 56 | - protocol: tcp 57 | ports: 58 | - 22 59 | - 80 60 | - 443 61 | state: present 62 | 63 | - name: Create servers 64 | os_server: 65 | name: "{{ item.name }}" 66 | image: "{{ item.type }}" 67 | flavor: "{{ item.cpu }}{{ item.memory }}{{ item.disk }}" 68 | network: "{{ network }}" 69 | subnet: "{{ subnet }}" 70 | state: present 71 | loop: "{{ servers }}" 72 | 73 | - name: Configure servers 74 | os_server_config: 75 | name: "{{ item.name }}" 76 | username: "nexuria" 77 | password: "{{ ADMIN_PASSWORD }}" 78 | services: 79 | - name: docker 80 | enabled: true 81 | started: true 82 | loop: "{{ servers }}" 83 | 84 | - name: Create storage 85 | os_storage: 86 | name: "{{ storage }}" 87 | type: Ceph 88 | capacity: 1000 89 | state: present 90 | 91 | - name: Create database 92 | os_database: 93 | name: "{{ database }}" 94 | type: PostgreSQL 95 | version: 12 96 | username: "nexuria" 97 | password: "{{ ADMIN_PASSWORD }}" 98 | storage: "{{ storage }}" 99 | state: present 100 | 101 | - name: Create monitoring 102 | os_monitoring: 103 | name: "{{ monitoring }}" 104 | type: Prometheus 105 | targets: 106 | - "{{ servers[0].name }}" 107 | - "{{ servers[1].name }}" 108 | - "{{ servers[2].name }}" 109 | - "{{ servers[3].name }}" 110 | state: present 111 | -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- 1 | # Project: Nexuria 2 | 3 | Project **Nexuria** is a cutting-edge, multi-faceted initiative designed to catapult Pi Coin to global currency status. This ambitious project combines advanced technologies, strategic partnerships, and innovative solutions to address the key challenges facing Pi Coin's widespread adoption. 4 | 5 | # Components 6 | 7 | ## Component 1: Quantum-Resistant Blockchain (QRBC) 8 | 9 | **Nexuria's** core infrastructure is built upon a novel, quantum-resistant blockchain architecture that ensures the Pi Network's security and stability. This proprietary technology leverages the principles of quantum entanglement and machine learning to create an unhackable, decentralized ledger. 10 | 11 | ## Component 2: NeuroNetwork (NN) 12 | 13 | The NeuroNetwork is an AI-driven, decentralized network of nodes that enables real-time, adaptive optimization of the Pi Network's scalability, security, and performance. This cognitive architecture ensures seamless transactions, even at high volumes, while continuously learning and improving the network's resilience. 14 | 15 | ## Component 3: Global Adoption Platform (GAP) 16 | 17 | GAP is a user-friendly, omnichannel platform that provides a seamless onboarding experience for new users, businesses, and governments. This platform integrates advanced biometric authentication, AI-powered customer support, and personalized financial services to drive mass adoption. 18 | 19 | ## Component 4: Regulatory Compliance Engine (RCE) 20 | 21 | The RCE is a sophisticated, AI-driven system that ensures Pi Coin's compliance with evolving regulatory requirements worldwide. This engine provides real-time monitoring, automated reporting, and strategic guidance to facilitate regulatory clarity and recognition. 22 | 23 | ## Component 5: Partnerships and Collaborations Hub (PCH) 24 | 25 | PCH is a strategic partnerships platform that fosters collaborations between Pi Coin, governments, financial institutions, and businesses. This hub enables the development of customized, industry-specific solutions, driving widespread adoption and recognition. 26 | 27 | ## Component 6: Education and Awareness Matrix (EAM) 28 | 29 | EAM is a comprehensive, AI-powered education and awareness platform that provides personalized, interactive learning experiences for users, businesses, and governments. This matrix covers topics such as blockchain, cryptocurrency, and financial literacy, ensuring a deep understanding of Pi Coin's benefits and potential. 30 | 31 | ## Component 7: Incentivization and Rewards Engine (IRE) 32 | 33 | IRE is a decentralized, AI-driven system that incentivizes users, businesses, and governments to adopt and promote Pi Coin. This engine offers tailored rewards, loyalty programs, and gamification elements to drive engagement and retention. 34 | 35 | ## Component 8: Interoperability Framework (IF) 36 | 37 | The IF is a standardized, open-source framework that enables seamless interactions between Pi Coin and other blockchain networks, traditional financial systems, and IoT devices. This framework ensures Pi Coin's compatibility and versatility, facilitating its widespread adoption. 38 | 39 | # Project Nexuria's Impact: 40 | 41 | By integrating these advanced technologies and innovative solutions, Project **Nexuria** will propel Pi Coin to global currency status by: 42 | 43 | 1. Achieving mass adoption through user-friendly onboarding and education. 44 | 2. Fostering strategic partnerships and collaborations with governments, financial institutions, and businesses. 45 | 3. Ensuring regulatory clarity and recognition through AI-driven compliance and monitoring. 46 | 4. Improving scalability, security, and stability through quantum-resistant blockchain and NeuroNetwork technologies. 47 | 5. Educating users, businesses, and governments about the benefits and potential of Pi Coin. 48 | 49 | With Project **Nexuria**, Pi Coin will become the most advanced, widely adopted, and trusted global currency, revolutionizing the way we think about money and financial systems. 50 | -------------------------------------------------------------------------------- /tools/code-analysis/nexuria-code-analysis.config: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/dotnet/roslyn-analyzers/master/src/Microsoft.CodeAnalysis.Analyzers/Analyzers/Core/AnalyzersConfiguration.schema.json", 3 | "version": "1.0.0", 4 | "rules": { 5 | "CA1000": { 6 | "severity": "error" 7 | }, 8 | "CA1001": { 9 | "severity": "error" 10 | }, 11 | "CA1002": { 12 | "severity": "error" 13 | }, 14 | "CA1003": { 15 | "severity": "error" 16 | }, 17 | "CA1004": { 18 | "severity": "error" 19 | }, 20 | "CA1005": { 21 | "severity": "error" 22 | }, 23 | "CA1006": { 24 | "severity": "error" 25 | }, 26 | "CA1007": { 27 | "severity": "error" 28 | }, 29 | "CA1008": { 30 | "severity": "error" 31 | }, 32 | "CA1009": { 33 | "severity": "error" 34 | }, 35 | "CA1010": { 36 | "severity": "error" 37 | }, 38 | "CA1011": { 39 | "severity": "error" 40 | }, 41 | "CA1012": { 42 | "severity": "error" 43 | }, 44 | "CA1013": { 45 | "severity": "error" 46 | }, 47 | "CA1014": { 48 | "severity": "error" 49 | }, 50 | "CA1015": { 51 | "severity": "error" 52 | }, 53 | "CA1016": { 54 | "severity": "error" 55 | }, 56 | "CA1017": { 57 | "severity": "error" 58 | }, 59 | "CA1018": { 60 | "severity": "error" 61 | }, 62 | "CA1019": { 63 | "severity": "error" 64 | }, 65 | "CA1020": { 66 | "severity": "error" 67 | }, 68 | "CA1021": { 69 | "severity": "error" 70 | }, 71 | "CA1022": { 72 | "severity": "error" 73 | }, 74 | "CA1023": { 75 | "severity": "error" 76 | }, 77 | "CA1024": { 78 | "severity": "error" 79 | }, 80 | "CA1025": { 81 | "severity": "error" 82 | }, 83 | "CA1026": { 84 | "severity": "error" 85 | }, 86 | "CA1027": { 87 | "severity": "error" 88 | }, 89 | "CA1028": { 90 | "severity": "error" 91 | }, 92 | "CA1029": { 93 | "severity": "error" 94 | }, 95 | "CA1030": { 96 | "severity": "error" 97 | }, 98 | "CA1031": { 99 | "severity": "error" 100 | }, 101 | "CA1032": { 102 | "severity": "error" 103 | }, 104 | "CA1033": { 105 | "severity": "error" 106 | }, 107 | "CA1034": { 108 | "severity": "error" 109 | }, 110 | "CA1035": { 111 | "severity": "error" 112 | }, 113 | "CA1036": { 114 | "severity": "error" 115 | }, 116 | "CA1037": { 117 | "severity": "error" 118 | }, 119 | "CA1038": { 120 | "severity": "error" 121 | }, 122 | "CA1039": { 123 | "severity": "error" 124 | }, 125 | "CA1040": { 126 | "severity": "error" 127 | }, 128 | "CA1041": { 129 | "severity": "error" 130 | }, 131 | "CA1042": { 132 | "severity": "error" 133 | }, 134 | "CA1043": { 135 | "severity": "error" 136 | }, 137 | "CA1044": { 138 | "severity": "error" 139 | }, 140 | "CA1045": { 141 | "severity": "error" 142 | }, 143 | "CA1046": { 144 | "severity": "error" 145 | }, 146 | "CA1047": { 147 | "severity": "error" 148 | }, 149 | "CA1048": { 150 | "severity": "error" 151 | }, 152 | "CA1049": { 153 | "severity": "error" 154 | }, 155 | "CA1050": { 156 | "severity": "error" 157 | }, 158 | "CA1051": { 159 | "severity": "error" 160 | }, 161 | "CA1052": { 162 | "severity": "error" 163 | }, 164 | "CA1053": { 165 | "severity": "error" 166 | }, 167 | "CA1054": { 168 | "severity": "error" 169 | }, 170 | "CA1055": { 171 | "severity": "error" 172 | }, 173 | "CA1056": { 174 | "severity": "error" 175 | }, 176 | "CA1057": { 177 | "severity": "error" 178 | }, 179 | "CA1058": { 180 | "severity": "error" 181 | }, 182 | "CA1059": { 183 | "severity": "error" 184 | }, 185 | "CA1060": { 186 | "severity": "error" 187 | }, 188 | "CA1061": { 189 | "severity": "error" 190 | }, 191 | "CA1062": { 192 | "severity": "error" 193 | }, 194 | "CA1063": { 195 | "severity": "error" 196 | }, 197 | "CA1064": { 198 | "severity": "error" 199 | }, 200 | "CA1065": { 201 | "severity": "error" 202 | }, 203 | "CA1066": { 204 | "severity": "error" 205 | }, 206 | "CA1067": { 207 | "severity": "error" 208 | }, 209 | "CA1068": { 210 | "severity": "error" 211 | }, 212 | "CA1069": { 213 | "severity": "error" 214 | }, 215 | "CA1070": { 216 | "severity": "error" 217 | } 218 | } 219 | } 220 | -------------------------------------------------------------------------------- /infrastructure/cloud/aws/nexuria-aws-deploy.yaml: -------------------------------------------------------------------------------- 1 | # Nexuria AWS Deployment YAML File 2 | 3 | # Define the AWS region 4 | region: us-west-2 5 | 6 | # Define the AWS credentials 7 | aws_access_key_id: ${AWS_ACCESS_KEY_ID} 8 | aws_secret_access_key: ${AWS_SECRET_ACCESS_KEY} 9 | 10 | # Define the VPC and subnets 11 | vpc: 12 | cidr_block: 10.0.0.0/16 13 | subnets: 14 | - cidr_block: 10.0.1.0/24 15 | availability_zone: us-west-2a 16 | - cidr_block: 10.0.2.0/24 17 | availability_zone: us-west-2b 18 | 19 | # Define the security groups 20 | security_groups: 21 | - name: nexuria-sg 22 | description: Nexuria security group 23 | rules: 24 | - protocol: tcp 25 | from_port: 22 26 | to_port: 22 27 | cidr_blocks: 28 | - 0.0.0.0/0 29 | - protocol: tcp 30 | from_port: 80 31 | to_port: 80 32 | cidr_blocks: 33 | - 0.0.0.0/0 34 | - protocol: tcp 35 | from_port: 443 36 | to_port: 443 37 | cidr_blocks: 38 | - 0.0.0.0/0 39 | 40 | # Define the EC2 instances 41 | ec2_instances: 42 | - name: nexuria-api-gateway 43 | instance_type: c5.xlarge 44 | ami: ami-0c94855ba95c71c99 45 | vpc_security_group_ids: 46 | - ${security_groups[0].id} 47 | subnet_id: ${vpc.subnets[0].id} 48 | key_name: nexuria-key 49 | - name: nexuria-qrbcs 50 | instance_type: c5.xlarge 51 | ami: ami-0c94855ba95c71c99 52 | vpc_security_group_ids: 53 | - ${security_groups[0].id} 54 | subnet_id: ${vpc.subnets[1].id} 55 | key_name: nexuria-key 56 | - name: nexuria-neuronetworks 57 | instance_type: c5.xlarge 58 | ami: ami-0c94855ba95c71c99 59 | vpc_security_group_ids: 60 | - ${security_groups[0].id} 61 | subnet_id: ${vpc.subnets[0].id} 62 | key_name: nexuria-key 63 | - name: nexuria-gaps 64 | instance_type: c5.xlarge 65 | ami: ami-0c94855ba95c71c99 66 | vpc_security_group_ids: 67 | - ${security_groups[0].id} 68 | subnet_id: ${vpc.subnets[1].id} 69 | key_name: nexuria-key 70 | 71 | # Define the RDS instances 72 | rds_instances: 73 | - name: nexuria-rds 74 | instance_class: db.r5.xlarge 75 | engine: postgres 76 | allocated_storage: 100 77 | vpc_security_group_ids: 78 | - ${security_groups[0].id} 79 | subnet_id: ${vpc.subnets[0].id} 80 | username: nexuria 81 | password: ${RDS_PASSWORD} 82 | 83 | # Define the Elastic Beanstalk environment 84 | elastic_beanstalk: 85 | environment_name: nexuria-env 86 | application_name: nexuria-app 87 | platform_name: 64bit Amazon Linux 2 v3.2.4 running Docker 88 | tier: 89 | name: WebServer 90 | type: Standard 91 | instance: 92 | type: c5.xlarge 93 | vpc: 94 | id: ${vpc.id} 95 | subnets: 96 | - ${vpc.subnets[0].id} 97 | - ${vpc.subnets[1].id} 98 | security_groups: 99 | - ${security_groups[0].id} 100 | 101 | # Define the CloudWatch logs 102 | cloudwatch_logs: 103 | log_group_name: nexuria-logs 104 | log_stream_name: nexuria-log-stream 105 | 106 | # Define the CloudFormation stack 107 | cloudformation_stack: 108 | name: nexuria-stack 109 | template_body: | 110 | AWSTemplateFormatVersion: '2010-09-09' 111 | Resources: 112 | NexuriaVPC: 113 | Type: 'AWS::EC2::VPC' 114 | Properties: 115 | CidrBlock: ${vpc.cidr_block} 116 | NexuriaSubnet1: 117 | Type: 'AWS::EC2::Subnet' 118 | Properties: 119 | CidrBlock: ${vpc.subnets[0].cidr_block} 120 | AvailabilityZone: ${vpc.subnets[0].availability_zone} 121 | VpcId: !Ref NexuriaVPC 122 | NexuriaSubnet2: 123 | Type: 'AWS::EC2::Subnet' 124 | Properties: 125 | CidrBlock: ${vpc.subnets[1].cidr _block} 126 | AvailabilityZone: ${vpc.subnets[1].availability_zone} 127 | VpcId: !Ref NexuriaVPC 128 | NexuriaSecurityGroup: 129 | Type: 'AWS::EC2::SecurityGroup' 130 | Properties: 131 | GroupDescription: ${security_groups[0].description} 132 | VpcId: !Ref NexuriaVPC 133 | NexuriaEC2Instance1: 134 | Type: 'AWS::EC2::Instance' 135 | Properties: 136 | ImageId: ${ec2_instances[0].ami} 137 | InstanceType: ${ec2_instances[0].instance_type} 138 | SubnetId: !Ref NexuriaSubnet1 139 | SecurityGroupIds: 140 | - !Ref NexuriaSecurityGroup 141 | NexuriaEC2Instance2: 142 | Type: 'AWS::EC2::Instance' 143 | Properties: 144 | ImageId: ${ec2_instances[1].ami} 145 | InstanceType: ${ec2_instances[1].instance_type} 146 | SubnetId: !Ref NexuriaSubnet2 147 | SecurityGroupIds: 148 | - !Ref NexuriaSecurityGroup 149 | NexuriaRDSInstance: 150 | Type: 'AWS::RDS::DBInstance' 151 | Properties: 152 | DBInstanceClass: ${rds_instances[0].instance_class} 153 | Engine: ${rds_instances[0].engine} 154 | AllocatedStorage: ${rds_instances[0].allocated_storage} 155 | VPCSecurityGroupIds: 156 | - !Ref NexuriaSecurityGroup 157 | SubnetId: !Ref NexuriaSubnet1 158 | DBUsername: ${rds_instances[0].username} 159 | DBPassword: ${rds_instances[0].password} 160 | -------------------------------------------------------------------------------- /infrastructure/monitoring/grafana/nexuria-grafana-dashboard.json: -------------------------------------------------------------------------------- 1 | { 2 | "uid": "nexuria-dashboard", 3 | "title": "Nexuria Dashboard", 4 | "rows": [ 5 | { 6 | "title": "Overview", 7 | "panels": [ 8 | { 9 | "id": 1, 10 | "title": "CPU Usage", 11 | "type": "graph", 12 | "span": 4, 13 | "targets": [ 14 | { 15 | "expr": "100 - (100 - avg by (instance) (irate(node_cpu_seconds_total{job='nexuria-api-gateway'}[1m])))", 16 | "legendFormat": "{{ instance }}", 17 | "refId": "A" 18 | } 19 | ], 20 | "yaxes": [ 21 | { 22 | "format": "percent", 23 | "label": "CPU Usage", 24 | "show": true 25 | } 26 | ] 27 | }, 28 | { 29 | "id": 2, 30 | "title": "Memory Usage", 31 | "type": "graph", 32 | "span": 4, 33 | "targets": [ 34 | { 35 | "expr": "100 - (100 - avg by (instance) (node_memory_MemTotal_bytes{job='nexuria-api-gateway'} - node_memory_MemFree_bytes{job='nexuria-api-gateway'}) / node_memory_MemTotal_bytes{job='nexuria-api-gateway'} * 100)", 36 | "legendFormat": "{{ instance }}", 37 | "refId": "A" 38 | } 39 | ], 40 | "yaxes": [ 41 | { 42 | "format": "percent", 43 | "label": "Memory Usage", 44 | "show": true 45 | } 46 | ] 47 | } 48 | ] 49 | }, 50 | { 51 | "title": "API Gateway", 52 | "panels": [ 53 | { 54 | "id": 3, 55 | "title": "Request Count", 56 | "type": "graph", 57 | "span": 4, 58 | "targets": [ 59 | { 60 | "expr": "sum(increase(nexuria_api_gateway_requests_total[1m]))", 61 | "legendFormat": "{{ instance }}", 62 | "refId": "A" 63 | } 64 | ], 65 | "yaxes": [ 66 | { 67 | "format": "none", 68 | "label": "Request Count", 69 | "show": true 70 | } 71 | ] 72 | }, 73 | { 74 | "id": 4, 75 | "title": "Response Time", 76 | "type": "graph", 77 | "span": 4, 78 | "targets": [ 79 | { 80 | "expr": "avg by (instance) (nexuria_api_gateway_response_time_seconds{job='nexuria-api-gateway'})", 81 | "legendFormat": "{{ instance }}", 82 | "refId": "A" 83 | } 84 | ], 85 | "yaxes": [ 86 | { 87 | "format": "seconds", 88 | "label": "Response Time", 89 | "show": true 90 | } 91 | ] 92 | } 93 | ] 94 | }, 95 | { 96 | "title": "QRBCS", 97 | "panels": [ 98 | { 99 | "id": 5, 100 | "title": "Request Count", 101 | "type": "graph", 102 | "span": 4, 103 | "targets": [ 104 | { 105 | "expr": "sum(increase(nexuria_qrbcs_requests_total[1m]))", 106 | "legendFormat": "{{ instance }}", 107 | "refId": "A" 108 | } 109 | ], 110 | "yaxes": [ 111 | { 112 | "format": "none", 113 | "label": "Request Count", 114 | "show": true 115 | } 116 | ] 117 | }, 118 | { 119 | "id": 6, 120 | "title": "Response Time", 121 | "type": "graph", 122 | "span": 4, 123 | "targets": [ 124 | { 125 | "expr": "avg by (instance) (nexuria_qrbcs_response_time_seconds{job='nexuria-qrbcs'})", 126 | "legendFormat": "{{ instance }}", 127 | "refId": "A" 128 | } 129 | ], 130 | "yaxes": [ 131 | { 132 | "format": "seconds", 133 | "label": "Response Time", 134 | "show": true 135 | } 136 | ] 137 | } 138 | ] 139 | }, 140 | { 141 | "title": "NeuroNetworks", 142 | "panels": [ 143 | { 144 | "id": 7, 145 | "title": "Request Count", 146 | "type": "graph", 147 | "span": 4, 148 | "targets": [ 149 | { 150 | "expr": "sum(increase(nexuria_neuronetworks_requests_total[1m]))", 151 | "legendFormat": "{{ instance }}", 152 | "refId": "A" 153 | } 154 | ], 155 | "yaxes": [ 156 | { 157 | "format": "none", 158 | "label": "Request Count", 159 | "show": true 160 | } 161 | ] 162 | }, 163 | { 164 | "id": 8, 165 | "title": "Response Time", 166 | "type": "graph", 167 | "span": 4, 168 | " targets": [ 169 | { 170 | "expr": "avg by (instance) (nexuria_neuronetworks_response_time_seconds{job='nexuria-neuronetworks'})", 171 | "legendFormat": "{{ instance }}", 172 | "refId": "A" 173 | } 174 | ], 175 | "yaxes": [ 176 | { 177 | "format": "seconds", 178 | "label": "Response Time", 179 | "show": true 180 | } 181 | ] 182 | } 183 | ] 184 | }, 185 | { 186 | "title": "GAPS", 187 | "panels": [ 188 | { 189 | "id": 9, 190 | "title": "Request Count", 191 | "type": "graph", 192 | "span": 4, 193 | "targets": [ 194 | { 195 | "expr": "sum(increase(nexuria_gaps_requests_total[1m]))", 196 | "legendFormat": "{{ instance }}", 197 | "refId": "A" 198 | } 199 | ], 200 | "yaxes": [ 201 | { 202 | "format": "none", 203 | "label": "Request Count", 204 | "show": true 205 | } 206 | ] 207 | }, 208 | { 209 | "id": 10, 210 | "title": "Response Time", 211 | "type": "graph", 212 | "span": 4, 213 | "targets": [ 214 | { 215 | "expr": "avg by (instance) (nexuria_gaps_response_time_seconds{job='nexuria-gaps'})", 216 | "legendFormat": "{{ instance }}", 217 | "refId": "A" 218 | } 219 | ], 220 | "yaxes": [ 221 | { 222 | "format": "seconds", 223 | "label": "Response Time", 224 | "show": true 225 | } 226 | ] 227 | } 228 | ] 229 | } 230 | ] 231 | } 232 | -------------------------------------------------------------------------------- /infrastructure/cloud/azure/nexuria-azure-deploy.yaml: -------------------------------------------------------------------------------- 1 | # Nexuria Azure Deployment YAML File 2 | 3 | # Define the Azure subscription 4 | subscription_id: ${AZURE_SUBSCRIPTION_ID} 5 | 6 | # Define the Azure resource group 7 | resource_group: nexuria-resource-group 8 | 9 | # Define the Azure location 10 | location: West US 11 | 12 | # Define the Azure credentials 13 | credentials: 14 | type: service_principal 15 | client_id: ${AZURE_CLIENT_ID} 16 | client_secret: ${AZURE_CLIENT_SECRET} 17 | tenant_id: ${AZURE_TENANT_ID} 18 | 19 | # Define the Azure virtual network 20 | virtual_network: 21 | name: nexuria-virtual-network 22 | address_prefixes: 23 | - 10.0.0.0/16 24 | 25 | # Define the Azure subnets 26 | subnets: 27 | - name: nexuria-subnet 28 | address_prefix: 10.0.1.0/24 29 | - name: nexuria-subnet-2 30 | address_prefix: 10.0.2.0/24 31 | 32 | # Define the Azure network security groups 33 | network_security_groups: 34 | - name: nexuria-nsg 35 | security_rules: 36 | - name: allow-http 37 | protocol: Tcp 38 | source_port_range: '*' 39 | destination_port_range: '80' 40 | source_address_prefix: '*' 41 | destination_address_prefix: '*' 42 | access: Allow 43 | priority: 100 44 | - name: allow-https 45 | protocol: Tcp 46 | source_port_range: '*' 47 | destination_port_range: '443' 48 | source_address_prefix: '*' 49 | destination_address_prefix: '*' 50 | access: Allow 51 | priority: 101 52 | 53 | # Define the Azure virtual machines 54 | virtual_machines: 55 | - name: nexuria-api-gateway 56 | type: Standard_DS2_v2 57 | os_disk: 58 | caching: ReadWrite 59 | create_option: FromImage 60 | disk_size_gb: 30 61 | image_reference: 62 | publisher: Canonical 63 | offer: UbuntuServer 64 | sku: 18.04-LTS 65 | version: latest 66 | network_interfaces: 67 | - name: nexuria-nic 68 | primary: true 69 | ip_configurations: 70 | - name: ipconfig1 71 | subnet: 72 | id: ${subnets[0].id} 73 | private_ip_address_allocation: Dynamic 74 | storage_profile: 75 | image_reference: 76 | publisher: Canonical 77 | offer: UbuntuServer 78 | sku: 18.04-LTS 79 | version: latest 80 | os_disk: 81 | create_option: FromImage 82 | disk_size_gb: 30 83 | os_profile: 84 | admin_username: nexuria 85 | admin_password: ${ADMIN_PASSWORD} 86 | computer_name: nexuria-api-gateway 87 | diagnostics_profile: 88 | boot_diagnostics: 89 | enabled: true 90 | storage_uri: ${storage_account.blob_endpoint} 91 | 92 | - name: nexuria-qrbcs 93 | type: Standard_DS2_v2 94 | os_disk: 95 | caching: ReadWrite 96 | create_option: FromImage 97 | disk_size_gb: 30 98 | image_reference: 99 | publisher: Canonical 100 | offer: UbuntuServer 101 | sku: 18.04-LTS 102 | version: latest 103 | network_interfaces: 104 | - name: nexuria-nic-2 105 | primary: true 106 | ip_configurations: 107 | - name: ipconfig2 108 | subnet: 109 | id: ${subnets[1].id} 110 | private_ip_address_allocation: Dynamic 111 | storage_profile: 112 | image_reference: 113 | publisher: Canonical 114 | offer: UbuntuServer 115 | sku: 18.04-LTS 116 | version: latest 117 | os_disk: 118 | create_option: FromImage 119 | disk_size_gb: 30 120 | os_profile: 121 | admin_username: nexuria 122 | admin_password: ${ADMIN_PASSWORD} 123 | computer_name: nexuria-qrbcs 124 | diagnostics_profile: 125 | boot_diagnostics: 126 | enabled: true 127 | storage_uri: ${storage_account.blob_endpoint} 128 | 129 | - name: nexuria-neuronetworks 130 | type: Standard_DS2_v2 131 | os_disk: 132 | caching: ReadWrite 133 | create_option: FromImage 134 | disk_size_gb: 30 135 | image_reference: 136 | publisher: Canonical 137 | offer: UbuntuServer 138 | sku: 18.04-LTS 139 | version: latest 140 | network_interfaces: 141 | - name: nexuria-nic-3 142 | primary: true 143 | ip_configurations: 144 | - name: ipconfig3 145 | subnet: 146 | id: ${subnets[0].id} 147 | private_ip_address_allocation: Dynamic 148 | storage_profile: 149 | image_reference: 150 | publisher: Canonical 151 | offer: UbuntuServer 152 | sku: 18.04-LTS 153 | version: latest 154 | os_disk: 155 | create_option: FromImage 156 | disk_size_gb: 30 157 | os_profile: 158 | admin_username: nexuria 159 | admin_password: ${ADMIN_PASSWORD} 160 | computer_name: nexuria-ne uronetworks 161 | diagnostics_profile: 162 | boot_diagnostics: 163 | enabled: true 164 | storage_uri: ${storage_account.blob_endpoint} 165 | 166 | - name: nexuria-gaps 167 | type: Standard_DS2_v2 168 | os_disk: 169 | caching: ReadWrite 170 | create_option: FromImage 171 | disk_size_gb: 30 172 | image_reference: 173 | publisher: Canonical 174 | offer: UbuntuServer 175 | sku: 18.04-LTS 176 | version: latest 177 | network_interfaces: 178 | - name: nexuria-nic-4 179 | primary: true 180 | ip_configurations: 181 | - name: ipconfig4 182 | subnet: 183 | id: ${subnets[1].id} 184 | private_ip_address_allocation: Dynamic 185 | storage_profile: 186 | image_reference: 187 | publisher: Canonical 188 | offer: UbuntuServer 189 | sku: 18.04-LTS 190 | version: latest 191 | os_disk: 192 | create_option: FromImage 193 | disk_size_gb: 30 194 | os_profile: 195 | admin_username: nexuria 196 | admin_password: ${ADMIN_PASSWORD} 197 | computer_name: nexuria-gaps 198 | diagnostics_profile: 199 | boot_diagnostics: 200 | enabled: true 201 | storage_uri: ${storage_account.blob_endpoint} 202 | 203 | # Define the Azure storage account 204 | storage_account: 205 | name: nexuria-storage-account 206 | type: Standard_LRS 207 | location: West US 208 | resource_group: ${resource_group} 209 | 210 | # Define the Azure database 211 | database: 212 | name: nexuria-database 213 | type: PostgreSQL 214 | location: West US 215 | resource_group: ${resource_group} 216 | server_name: nexuria-database-server 217 | administrator_login: nexuria 218 | administrator_login_password: ${ADMIN_PASSWORD} 219 | storage_mb: 5120 220 | 221 | # Define the Azure monitoring 222 | monitoring: 223 | name: nexuria-monitoring 224 | type: AzureMonitor 225 | location: West US 226 | resource_group: ${resource_group} 227 | -------------------------------------------------------------------------------- /infrastructure/cloud/gcp/nexuria-gcp-deploy.yaml: -------------------------------------------------------------------------------- 1 | # Nexuria GCP Deployment YAML File 2 | 3 | # Define the GCP project 4 | project: nexuria-project 5 | 6 | # Define the GCP region 7 | region: us-central1 8 | 9 | # Define the GCP zone 10 | zone: us-central1-a 11 | 12 | # Define the GCP credentials 13 | credentials: 14 | type: service_account 15 | project_id: ${project} 16 | private_key_id: ${PRIVATE_KEY_ID} 17 | private_key: ${PRIVATE_KEY} 18 | client_email: ${CLIENT_EMAIL} 19 | client_id: ${CLIENT_ID} 20 | auth_uri: https://accounts.google.com/o/oauth2/auth 21 | token_uri: https://oauth2.googleapis.com/token 22 | 23 | # Define the GCP network 24 | network: 25 | name: nexuria-network 26 | auto_create_subnetworks: true 27 | 28 | # Define the GCP subnetwork 29 | subnetwork: 30 | name: nexuria-subnetwork 31 | ip_cidr_range: 10.0.0.0/16 32 | region: ${region} 33 | 34 | # Define the GCP firewall rules 35 | firewall_rules: 36 | - name: nexuria-firewall-rule 37 | network: ${network.name} 38 | source_ranges: 39 | - 0.0.0.0/0 40 | allowed: 41 | - IPProtocol: TCP 42 | ports: 43 | - 22 44 | - 80 45 | - 443 46 | 47 | # Define the GCP instances 48 | instances: 49 | - name: nexuria-api-gateway 50 | machine_type: n1-standard-4 51 | zone: ${zone} 52 | network_interfaces: 53 | - network: ${network.name} 54 | subnetwork: ${subnetwork.name} 55 | disks: 56 | - source_image: projects/debian-cloud/global/images/debian-9-stretch-v20191210 57 | disk_size_gb: 30 58 | boot: true 59 | metadata: 60 | startup-script: | 61 | #! /bin/bash 62 | apt-get update 63 | apt-get install -y docker.io 64 | systemctl start docker 65 | docker run -d -p 80:80 -p 443:443 nexuria-api-gateway 66 | - name: nexuria-qrbcs 67 | machine_type: n1-standard-4 68 | zone: ${zone} 69 | network_interfaces: 70 | - network: ${network.name} 71 | subnetwork: ${subnetwork.name} 72 | disks: 73 | - source_image: projects/debian-cloud/global/images/debian-9-stretch-v20191210 74 | disk_size_gb: 30 75 | boot: true 76 | metadata: 77 | startup-script: | 78 | #! /bin/bash 79 | apt-get update 80 | apt-get install -y docker.io 81 | systemctl start docker 82 | docker run -d -p 8080:8080 nexuria-qrbcs 83 | - name: nexuria-neuronetworks 84 | machine_type: n1-standard-4 85 | zone: ${zone} 86 | network_interfaces: 87 | - network: ${network.name} 88 | subnetwork: ${subnetwork.name} 89 | disks: 90 | - source_image: projects/debian-cloud/global/images/debian-9-stretch-v20191210 91 | disk_size_gb: 30 92 | boot: true 93 | metadata: 94 | startup-script: | 95 | #! /bin/bash 96 | apt-get update 97 | apt-get install -y docker.io 98 | systemctl start docker 99 | docker run -d -p 8081:8081 nexuria-neuronetworks 100 | - name: nexuria-gaps 101 | machine_type: n1-standard-4 102 | zone: ${zone} 103 | network_interfaces: 104 | - network: ${network.name} 105 | subnetwork: ${subnetwork.name} 106 | disks: 107 | - source_image: projects/debian-cloud/global/images/debian-9-stretch-v20191210 108 | disk_size_gb: 30 109 | boot: true 110 | metadata: 111 | startup-script: | 112 | #! /bin/bash 113 | apt-get update 114 | apt-get install -y docker.io 115 | systemctl start docker 116 | docker run -d -p 8082:8082 nexuria-gaps 117 | 118 | # Define the GCP Cloud SQL instance 119 | cloud_sql_instance: 120 | name: nexuria-cloud-sql 121 | region: ${region} 122 | database_version: POSTGRES_11 123 | tier: db-n1-standard-1 124 | storage_size_gb: 30 125 | 126 | # Define the GCP Cloud Storage bucket 127 | cloud_storage_bucket: 128 | name: nexuria-cloud-storage 129 | 130 | # Define the GCP Cloud Logging 131 | cloud_logging: 132 | name: nexuria-cloud-logging 133 | 134 | # Define the GCP Cloud Monitoring 135 | cloud_monitoring: 136 | name: nexuria-cloud-monitoring 137 | 138 | # Define the GCP Deployment Manager 139 | deployment_manager: 140 | name: nexuria-deployment-manager 141 | template: | 142 | resources: 143 | - name: nexuria-network 144 | type: compute.v1.network 145 | properties: 146 | autoCreateSubnetworks: true 147 | - name: nexuria-subnetwork 148 | type: compute.v1.subnetwork 149 | properties: 150 | ipCidrRange: 10.0.0.0/16 151 | region: ${region} 152 | - name: nexuria-firewall-rule 153 | type: compute.v1.firewall 154 | properties: 155 | network: ${network.name} 156 | sourceRanges: 157 | - 0.0.0.0/0 158 | allowed: 159 | - IPProtocol: TCP 160 | ports: 161 | - 22 162 | - 80 163 | - 443 164 | - name: nexuria-api-gateway 165 | type: compute.v1.instance 166 | properties: 167 | machineType: n1-standard-4 168 | zone: ${zone} 169 | networkInterfaces: 170 | - network: ${network.name} 171 | subnetwork: ${subnetwork.name} 172 | disks: 173 | - sourceImage: projects/debian-cloud/global/images/debian-9-stretch-v20191210 174 | diskSizeGb: 30 175 | boot: true 176 | metadata: 177 | startupScript: | 178 | #! /bin/bash 179 | apt-get update 180 | apt-get install -y docker.io 181 | systemctl start docker 182 | docker run -d -p 80:80 -p 443:443 nexuria-api-gateway 183 | - name: nexuria-qrbcs 184 | type: compute.v1.instance 185 | properties: 186 | machineType: n1-standard-4 187 | zone: ${zone} 188 | networkInterfaces: 189 | - network: ${network.name} 190 | subnetwork: ${subnetwork.name} 191 | disks: 192 | - sourceImage: projects/debian-cloud/global/images/debian-9-stretch-v20191210 193 | diskSizeGb: 30 194 | boot: true 195 | metadata: 196 | startupScript: | 197 | #! /bin/bash 198 | apt-get update 199 | apt-get install -y docker.io 200 | systemctl start docker 201 | docker run -d -p 8080:8080 nexuria-qrbcs 202 | - name: nexuria-neuronetworks 203 | type: compute.v1.instance 204 | properties: 205 | machineType: n1-standard-4 206 | zone: ${zone} 207 | networkInterfaces: 208 | - network: ${network.name} 209 | subnetwork: ${subnetwork.name} 210 | disks: 211 | - sourceImage: projects/debian-cloud/global/images/debian-9-stretch-v20191210 212 | diskSizeGb: 30 213 | boot: true 214 | metadata: 215 | startupScript: | 216 | #! /bin/bash 217 | apt-get update 218 | apt-get install -y docker.io 219 | systemctl start docker 220 | docker run -d -p 8081:8081 nexuria-neuronetworks 221 | - name: nexuria-gaps 222 | type: compute.v1.instance 223 | properties: 224 | machineType: n1-standard-4 225 | zone: ${zone} 226 | networkInterfaces: 227 | - network: ${network.name} 228 | subnetwork: ${subnetwork.name} 229 | disks: 230 | - sourceImage: projects/debian-cloud/global/images/debian-9-stretch-v20191210 231 | diskSizeGb: 30 232 | boot: true 233 | metadata: 234 | startupScript: | 235 | #! /bin/bash 236 | apt-get update 237 | apt-get install -y docker.io 238 | systemctl start docker 239 | docker run -d -p 8082:8082 nexuria-gaps 240 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![World Bank](https://img.shields.io/badge/World%20Bank-Project%20Partner-orange)](https://www.worldbank.org/) 2 | [![IMF](https://img.shields.io/badge/IMF-Research%20Collaborator-yellowgreen)](https://www.imf.org/) 3 | [![UN](https://img.shields.io/badge/UN-Sustainable%20Development%20Goals-blue)](https://www.un.org/) 4 | [![WHO](https://img.shields.io/badge/WHO-Global%20Health%20Partner-red)](https://www.who.int/) 5 | [![IFC](https://img.shields.io/badge/IFC-Project%20Financing-green)](https://www.ifc.org/) 6 | [![ADB](https://img.shields.io/badge/ADB-Regional%20Development%20Partner-orange)](https://www.adb.org/) 7 | [![EBRD](https://img.shields.io/badge/EBRD-Project%20Investment-blue)](https://www.ebrd.com/) 8 | [![AfDB](https://img.shields.io/badge/AfDB-Regional%20Integration%20Partner-yellowgreen)](https://www.afdb.org/) 9 | [![IDB](https://img.shields.io/badge/IDB-Regional%20Development%20Partner-red)](https://www.iadb.org/) 10 | [![OECD](https://img.shields.io/badge/OECD-Economic%20Development%20Partner-blue)](https://www.oecd.org/) 11 | [![WTO](https://img.shields.io/badge/WTO-International%20Trade%20Partner-orange)](https://www.wto.org/) 12 | [![ILO](https://img.shields.io/badge/ILO-Global%20Labour%20Standards-yellowgreen)](https://www.ilo.org/) 13 | [![UNDP](https://img.shields.io/badge/UNDP-Sustainable%20Development%20Goals-blue)](https://www.undp.org/) 14 | [![WIPO](https://img.shields.io/badge/WIPO-Intellectual%20Property%20Partner-red)](https://www.wipo.int/) 15 | [![ITU](https://img.shields.io/badge/ITU-Global%20Telecommunication%20Standards-orange)](https://www.itu.int/) 16 | [![UNICEF](https://img.shields.io/badge/UNICEF-Children's%20Rights%20Advocate-blue)](https://www.unicef.org/) 17 | [![FAO](https://img.shields.io/badge/FAO-Global%20Food%20Security-yellowgreen)](https://www.fao.org/) 18 | [![UNHCR](https://img.shields.io/badge/UNHCR-Refugee%20Protection%20Partner-orange)](https://www.unhcr.org/) 19 | [![WWF](https://img.shields.io/badge/WWF-Conservation%20Partner-green)](https://www.worldwildlife.org/) 20 | [![IOM](https://img.shields.io/badge/IOM-Migration%20Management%20Partner-red)](https://www.iom.int/) 21 | [![UNEP](https://img.shields.io/badge/UNEP-Environmental%20Sustainability%20Partner-blue)](https://www.unep.org/) 22 | [![ECB](https://img.shields.io/badge/ECB-European%20Central%20Bank-blue.svg)](https://www.ecb.europa.eu) 23 | [![BIS](https://img.shields.io/badge/BIS-Bank%20for%20International%20Settlements-blue.svg)](https://www.bis.org) 24 | [![ISO](https://img.shields.io/badge/ISO-International%20Organization%20for%20Standardization-blue.svg)](https://www.iso.org) 25 | [![FSB](https://img.shields.io/badge/FSB-Financial%20Stability%20Board-blue.svg)](https://www.fsb.org) 26 | [![WEF](https://img.shields.io/badge/WEF-World%20Economic%20Forum-blue.svg)](https://www.weforum.org) 27 | [![ICC](https://img.shields.io/badge/ICC-International%20Chamber%20of%20Commerce-blue.svg)](https://iccwbo.org) 28 | [![WCO](https://img.shields.io/badge/WCO-World%20Customs%20Organization-blue.svg)](https://www.wcoomd.org) 29 | [![IATA](https://img.shields.io/badge/IATA-International%20Air%20Transport%20Association-blue.svg)](https://www.iata.org) 30 | [![IMO](https://img.shields.io/badge/IMO-International%20Maritime%20Organization-blue.svg)](https://www.imo.org) 31 | [![Federal Reserve](https://img.shields.io/badge/Federal%20Reserve-United%20States%20Central%20Bank-blue.svg)](https://www.federalreserve.gov/) 32 | [![EU](https://img.shields.io/badge/EU-European%20Union-blue.svg)](https://europa.eu/) 33 | [![Council of Europe](https://img.shields.io/badge/Council%20of%20Europe-COE-blue.svg)](https://www.coe.int/) 34 | [![OAS](https://img.shields.io/badge/OAS-Organization%20of%20American%20States-blue.svg)](https://www.oas.org/) 35 | [![AU](https://img.shields.io/badge/AU-African%20Union-blue.svg)](https://au.int/) 36 | [![AIIB](https://img.shields.io/badge/AIIB-Asian%20Infrastructure%20Investment%20Bank-blue.svg)](https://www.aiib.org/) 37 | [![EIB](https://img.shields.io/badge/EIB-European%20Investment%20Bank-blue.svg)](https://www.eib.org/) 38 | [![NATO](https://img.shields.io/badge/NATO-North%20Atlantic%20Treaty%20Organization-blue.svg)](https://www.nato.int/) 39 | [![ADBI](https://img.shields.io/badge/ADBI-Asian%20Development%20Bank%20Institute-blue.svg)](https://www.adbi.org/) 40 | [![BOC](https://img.shields.io/badge/BOC-Bank%20of%20China-blue.svg)](https://www.boc.cn/) 41 | [![CDB](https://img.shields.io/badge/CDB-China%20Development%20Bank-blue.svg)](https://www.cdb.com.cn/) 42 | [![EXIM](https://img.shields.io/badge/EXIM-Export--Import%20Bank%20of%20China-blue.svg)](https://www.eximbank.gov.cn/) 43 | [![HKMA](https://img.shields.io/badge/HKMA-Hong%20Kong%20Monetary%20Authority-blue.svg)](https://www.hkma.gov.hk/) 44 | [![ICBC](https://img.shields.io/badge/ICBC-Industrial%20and%20Commercial%20Bank%20of%20China-blue.svg)](https://www.icbc.com.cn/) 45 | [![JBIC](https://img.shields.io/badge/JBIC-Japan%20Bank%20for%20International%20Cooperation-blue.svg)](https://www.jbic.go.jp/) 46 | [![KDI](https://img.shields.io/badge/KDI-Korea%20Development%20Institute-blue.svg)](https://www.kdi.re.kr/) 47 | [![KRX](https://img.shields.io/badge/KRX-Korea%20Exchange-blue.svg)](https://www.krx.co.kr/) 48 | [![MATRADE](https://img.shields.io/badge/MATRADE-Malaysia%20External%20Trade%20Development%20Corporation-blue.svg)](https://www.matrade.gov.my/) 49 | [![MAS](https://img.shields.io/badge/MAS-Monetary%20Authority%20of%20Singapore-blue.svg)](https://www.mas.gov.sg/) 50 | [![PBOC](https://img.shields.io/badge/PBOC-People's%20Bank%20of%20China-blue.svg)](https://www.pbc.gov.cn/) 51 | [![RBI](https://img.shields.io/badge/RBI-Reserve%20Bank%20of%20India-blue.svg)](https://www.rbi.org.in/) 52 | [![SSE](https://img.shields.io/badge/SSE-Shanghai%20Stock%20Exchange-blue.svg)](https://www.sse.com.cn/) 53 | [![SZSE](https://img.shields.io/badge/SZSE-Shenzhen%20Stock%20Exchange-blue.svg)](https://www.szse.cn/) 54 | [![SBI](https://img.shields.io/badge/SBI-State%20Bank%20of%20India-blue.svg)](https://www.sbi.co.in/) 55 | [![TPEx](https://img.shields.io/badge/TPEx-Taipei%20Exchange-blue.svg)](https://www.tpex.org.tw/) 56 | [![TSE](https://img.shields.io/badge/TSE-Tokyo%20Stock%20Exchange-blue.svg)](https://www.tse.or.jp/) 57 | [![UOB](https://img.shields.io/badge/UOB-United%20Overseas%20Bank-blue.svg)](https://www.uob.com/) 58 | [![VNX](https://img.shields.io/badge/VNX-Vietnam%20Stock%20Exchange-blue.svg)](https://www.vnx.vn/) 59 | [![BSP](https://img.shields.io/badge/BSP-Bangko%20Sentral%20ng%20Pilipinas-blue.svg)](https://www.bsp.gov.ph/) 60 | [![CBSL](https://img.shields.io/badge/CBSL-Central%20Bank%20of%20Sri%20Lanka-blue.svg)](https://www.cbsl.gov.lk/) 61 | [![HKEX](https://img.shields.io/badge/HKEX-Hong%20Kong%20Stock%20Exchange-blue.svg)](https://www.hkex.com.hk/) 62 | [![IDX](https://img.shields.io/badge/IDX-Indonesia%20Stock%20Exchange-blue.svg)](https://www.idx.co.id/) 63 | [![KLSE](https://img.shields.io/badge/KLSE-Kuala%20Lumpur%20Stock%20Exchange-blue.svg)](https://www.bursamalaysia.com/) 64 | [![NSE](https://img.shields.io/badge/NSE-National%20Stock%20Exchange%20of%20India-blue.svg)](https://www.nseindia.com/) 65 | [![PSX](https://img.shields.io/badge/PSX-Pakistan%20Stock%20Exchange-blue.svg)](https://www.psx.com.pk/) 66 | [![PSE](https://img.shields.io/badge/PSE-Philippine%20Stock%20Exchange-blue.svg)](https://www.pse.com.ph/) 67 | [![SGX](https://img.shields.io/badge/SGX-Singapore%20Exchange-blue.svg)](https://www.sgx.com/) 68 | [![SET](https://img.shields.io/badge/SET-Stock%20Exchange%20of%20Thailand-blue.svg)](https://www.set.or.th/) 69 | [![TWSE](https://img.shields.io/badge/TWSE-Taiwan%20Stock%20Exchange-blue.svg)](https://www.twse.com.tw/) 70 | [![BOCOM](https://img.shields.io/badge/BOCOM-Bank%20of%20Communications-blue.svg)](https://www.bankcomm.com/) 71 | [![CCB](https://img.shields.io/badge/CCB-China%20Construction%20Bank-blue.svg)](https://www.ccb.com/) 72 | [![CMB](https://img.shields.io/badge/CMB-China%20Merchants%20Bank-blue.svg)](https://www.cmbchina.com/) 73 | [![ICBC](https://img.shields.io/badge/ICBC-Industrial%20and%20Commercial%20Bank%20of%20China-blue.svg)](https://www.icbc.com.cn/) 74 | [![Bursa Malaysia](https://img.shields.io/badge/Bursa%20Malaysia-Malaysia%20Stock%20Exchange-blue.svg)](https://www.bursamalaysia.com/) 75 | [![ADX](https://img.shields.io/badge/ADX-Abu%20Dhabi%20Securities%20Exchange-blue.svg)](https://www.adx.ae/) 76 | [![BHB](https://img.shields.io/badge/BHB-Bahrain%20Bourse-blue.svg)](https://www.bahrainbourse.com/) 77 | [![CBB](https://img.shields.io/badge/CBB-Central%20Bank%20of%20Bahrain-blue.svg)](https://www.cbb.gov.bh/) 78 | [![DFM](https://img.shields.io/badge/DFM-Dubai%20Financial%20Market-blue.svg)](https://www.dfm.ae/) 79 | [![KSE](https://img.shields.io/badge/KSE-Kuwait%20Stock%20Exchange-blue.svg)](https://www.kse.com.kw/) 80 | [![MSM](https://img.shields.io/badge/MSM-Muscat%20Securities%20Market-blue.svg)](https://www.msm.gov.om/) 81 | [![QE](https://img.shields.io/badge/QE-Qatar%20Exchange-blue.svg)](https://www.qe.com.qa/) 82 | [![Tadawul](https://img.shields.io/badge/Tadawul-Saudi%20Stock%20Exchange-blue.svg)](https://www.tadawul.com.sa/) 83 | [![AfDB](https://img.shields.io/badge/AfDB-African%20Development%20Bank-blue.svg)](https://www.afdb.org/) 84 | [![BOA](https://img.shields.io/badge/BOA-Bank%20of%20Africa-blue.svg)](https://www.bankofafrica.com/) 85 | [![BCEAO](https://img.shields.io/badge/BCEAO-Central%20Bank%20of%20West%20African%20States-blue.svg)](https://www.bceao.int/) 86 | [![EADB](https://img.shields.io/badge/EADB-East%20African%20Development%20Bank-blue.svg)](https://www.eadb.org/) 87 | [![NSE](https://img.shields.io/badge/NSE-Nigerian%20Stock%20Exchange-blue.svg)](https://www.nse.com.ng/) 88 | [![SARB](https://img.shields.io/badge/SARB-South%20African%20Reserve%20Bank-blue.svg)](https://www.resbank.co.za/) 89 | [![BB](https://img.shields.io/badge/BB-Bangladesh%20Bank-blue.svg)](https://www.bangladesh-bank.org/) 90 | [![CBSL](https://img.shields.io/badge/CBSL-Central%20Bank%20of%20Sri%20Lanka-blue.svg)](https://www.cbsl.gov.lk/) 91 | [![HKEX](https://img.shields.io/badge/HKEX-Hong%20Kong%20Exchanges%20and%20Clearing%20Limited-blue.svg)](https://www.hkex.com.hk/) 92 | [![NSE India](https://img.shields.io/badge/NSE%20India-Indian%20Stock%20Exchange-blue.svg)](https://www.nseindia.com/) 93 | 94 |

Nexuria by KOSASIH is licensed under Creative Commons Attribution 4.0 International

95 | 96 | [![Pi Network](https://img.shields.io/badge/Pi%20Network-Pi%20Network-blue.svg)](https://minepi.com/) 97 | [![Raspberry Pi](https://img.shields.io/badge/Raspberry%20Pi-RPi-red.svg)](https://www.raspberrypi.com/) 98 | [![Raspberry Pi Zero](https://img.shields.io/badge/Raspberry%20Pi%20Zero-RPi%20Zero-green.svg)](https://www.raspberrypi.com/products/raspberry-pi-zero/) 99 | [![Epaper Badge](https://img.shields.io/badge/Epaper%20Badge-Epaper%20Badge-orange.svg)](https://medium.com/coinmonks/building-an-epaper-badge-with-a-raspberry-pi-zero-e4b98b3311c3) 100 | 101 | [![Build Status](https://cdn.prod.website-files.com/5e0f1144930a8bc8aace526c/65dd9eb5aaca434fac4f1c7c_Build-Passing-brightgreen.svg)](https://github.com/KOSASIH/NexuriaCore/actions) 102 | [![Code Coverage](https://codecov.io/gh/KOSASIH/NexuriaCore/branch/main/graph/badge.svg)](https://codecov.io/gh/KOSASIH/NexuriaCore) 103 | [![License](https://img.shields.io/github/license/KOSASIH/NexuriaCore)](https://github.com/KOSASIH/NexuriaCore/blob/main/LICENSE) 104 | [![Contributors](https://img.shields.io/github/contributors/KOSASIH/NexuriaCore)](https://github.com/KOSASIH/NexuriaCore/graphs/contributors) 105 | [![Last Commit](https://img.shields.io/github/last-commit/KOSASIH/NexuriaCore)](https://github.com/KOSASIH/NexuriaCore/commits/main) 106 | [![Open Issues](https://img.shields.io/github/issues/KOSASIH/NexuriaCore)](https://github.com/KOSASIH/NexuriaCore/issues) 107 | [![Documentation](https://img.shields.io/badge/GitBook-Docu-lightblue)](https://sulstice.gitbook.io/globalchem-your-chemical-graph-network/) 108 | [![Website shields.io](https://img.shields.io/website-up-down-green-red/http/shields.io.svg)](http://www.chemicalgraphtheory.com) 109 | [![Python](https://img.shields.io/badge/python-3.6-blue.svg)](https://www.python.org/downloads/release/python-360/) 110 | [![DOI](https://zenodo.org/badge/259046250.svg)](https://zenodo.org/badge/latestdoi/259046250) 111 | [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) 112 | [![PEP8](https://img.shields.io/badge/code%20style-pep8-orange.svg)](https://www.python.org/dev/peps/pep-0008/) 113 | [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FSulstice%2Fglobal-chem.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2FSulstice%2Fglobal-chem?ref=badge_shield) 114 | [![Maturity badge - level 2](https://img.shields.io/badge/Maturity-Level%202%20--%20First%20Release-yellowgreen.svg)](https://github.com/tophat/getting-started/blob/master/scorecard.md) 115 | 116 | # NexuriaCore 117 | The central repository for Project [Nexuria](docs), housing the overall project architecture and integration of its components. 118 | 119 | Nexuria Core 120 | ================ 121 | 122 | Nexuria Core is a .NET 6.0 library that provides a set of advanced features for building high-performance applications. 123 | 124 | Features 125 | -------- 126 | 127 | * Advanced logging and configuration management 128 | * Dependency injection and service provider 129 | * QR code generation and validation 130 | * Integration with Azure services 131 | 132 | Getting Started 133 | --------------- 134 | 135 | To get started with Nexuria Core, simply install the NuGet package: 136 | 137 | `1. dotnet add package Nexuria.Core` 138 | 139 | 140 | Then, import the namespace and start using the library: 141 | 142 | ```csharp 143 | 1. using Nexuria.Core; 144 | 2. 145 | 3. // Initialize the Nexuria Core instance 146 | 4. var nexuriaCore = new NexuriaCore(); 147 | 5. 148 | 6. // Use the library features 149 | 7. var qrCode = await nexuriaCore.GenerateQRCodeAsync("https://example.com"); 150 | ``` 151 | 152 | ## Contributing 153 | 154 | Contributions are welcome! If you'd like to contribute to Nexuria Core, please fork the repository and submit a pull request. 155 | 156 | ## License 157 | 158 | Nexuria Core is licensed under the Apache 2.0 License. See LICENSE for details. 159 | 160 | ## Author 161 | 162 | Nexuria Core is maintained by [KOSASIH](https://www.linkedin.com/in/kosasih-81b46b5a). 163 | 164 | # Acknowledgments 165 | 166 | Nexuria Core uses the following open-source libraries: 167 | 168 | 1. Microsoft.Extensions.Logging 169 | 2. Microsoft.Extensions.Configuration 170 | 3. Moq 171 | 4. xunit 172 | 173 | Thanks to the maintainers of these libraries for their hard work! 174 | 175 | 176 | --------------------------------------------------------------------------------