Skip to content

Commit

Permalink
Merge pull request #5 from TI-TecnicamenteIdiotas/develop
Browse files Browse the repository at this point in the history
Release - 2023/06/24
  • Loading branch information
AlmirJNR authored Jun 24, 2023
2 parents 34f9cf2 + 826e177 commit d74a3bb
Show file tree
Hide file tree
Showing 139 changed files with 6,796 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .assets/initaws/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM amazon/aws-cli

COPY ./init.sh .

ENTRYPOINT ["/bin/sh", "init.sh"]
20 changes: 20 additions & 0 deletions .assets/initaws/init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh

echo '{"Version": "2012-10-17", "Statement":[{"Effect": "Allow", "Principal": "*", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::*"}]}' >> policy.json

aws dynamodb create-table \
--table-name order \
--attribute-definitions AttributeName=id,AttributeType=S \
--key-schema AttributeName=id,KeyType=HASH \
--provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 \
--table-class STANDARD \
--endpoint-url ${NO_SQL_CONNECTION_STRING} || true

aws s3api create-bucket \
--bucket ${AWS_S3_BUCKET_NAME} \
--endpoint-url ${AWS_S3_SERVICE_URL} || true

aws s3api put-bucket-policy \
--bucket ${AWS_S3_BUCKET_NAME} \
--endpoint-url ${AWS_S3_SERVICE_URL} \
--policy file://policy.json || true
31 changes: 31 additions & 0 deletions .assets/initsql/nimbleflow.init.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
CREATE TABLE IF NOT EXISTS category
(
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
title VARCHAR(32) UNIQUE NOT NULL,
color_theme INT NULL,
category_icon INT NULL,
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
deleted_at TIMESTAMP WITH TIME ZONE NULL
);

CREATE TABLE IF NOT EXISTS product
(
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
title VARCHAR(64) UNIQUE NOT NULL,
description VARCHAR(512) NULL,
price DECIMAL NOT NULL,
image_url TEXT NULL,
is_favorite BOOLEAN NOT NULL DEFAULT FALSE,
category_id uuid NOT NULL REFERENCES category (id),
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
deleted_at TIMESTAMP WITH TIME ZONE NULL
);

CREATE TABLE IF NOT EXISTS "table"
(
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
accountable VARCHAR(256) NOT NULL,
is_fully_paid BOOLEAN NOT NULL DEFAULT FALSE,
created_at TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
deleted_at TIMESTAMP WITH TIME ZONE NULL
);
15 changes: 15 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
SQL_CONNECTION_STRING="Server=nimbleflow.sql.db;Port=5432;Database=postgres;User Id=postgres;Password=postgres123"
NO_SQL_CONNECTION_STRING=http://nimbleflow.nosql.db:8000

HUB_SERVER_URL=http://nimbleflow.aspnetcore.hub:10505

AWS_ACCESS_KEY_ID=<CHANGE_ME_IF_NEEDED>
AWS_SECRET_ACCESS_KEY=<CHANGE_ME_IF_NEEDED>
AWS_REGION=us-east-1
AWS_S3_SERVICE_URL=http://192.168.15.131:10502
AWS_S3_BUCKET_NAME=nimbleflow
AWS_ECR_ALIAS=change.me.if.needed

CONTAINER_REGISTRY=public.ecr.aws/${AWS_ECR_ALIAS}

ASPNETCORE_ENVIRONMENT=Development
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ FodyWeavers.xsd
*.msp

# JetBrains Rider
.idea/*
*.sln.iml

### Rider ###
Expand Down Expand Up @@ -486,4 +487,8 @@ fabric.properties
### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide
.ionide

SpringBoot/docker
SpringBoot/target
.idea
43 changes: 43 additions & 0 deletions AspDotNetCore/NimbleFlow.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.32328.378
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NimbleFlow.Api", "Src\NimbleFlow.Api\NimbleFlow.Api.csproj", "{344048D3-F0F1-4F93-891F-BAC7A5611314}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NimbleFlow.Contracts", "Src\NimbleFlow.Contracts\NimbleFlow.Contracts.csproj", "{EA149509-39C5-4771-8E00-01FBFA46A72D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NimbleFlow.Data", "Src\NimbleFlow.Data\NimbleFlow.Data.csproj", "{DF6DC2BE-972F-4BC3-B352-A9261EE8D13F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NimbleFlow.Tests", "Src\NimbleFlow.Tests\NimbleFlow.Tests.csproj", "{6846F7C0-A994-486B-91D3-D8C200BC5F2C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{344048D3-F0F1-4F93-891F-BAC7A5611314}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{344048D3-F0F1-4F93-891F-BAC7A5611314}.Debug|Any CPU.Build.0 = Debug|Any CPU
{344048D3-F0F1-4F93-891F-BAC7A5611314}.Release|Any CPU.ActiveCfg = Release|Any CPU
{344048D3-F0F1-4F93-891F-BAC7A5611314}.Release|Any CPU.Build.0 = Release|Any CPU
{EA149509-39C5-4771-8E00-01FBFA46A72D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EA149509-39C5-4771-8E00-01FBFA46A72D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EA149509-39C5-4771-8E00-01FBFA46A72D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EA149509-39C5-4771-8E00-01FBFA46A72D}.Release|Any CPU.Build.0 = Release|Any CPU
{DF6DC2BE-972F-4BC3-B352-A9261EE8D13F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DF6DC2BE-972F-4BC3-B352-A9261EE8D13F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DF6DC2BE-972F-4BC3-B352-A9261EE8D13F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DF6DC2BE-972F-4BC3-B352-A9261EE8D13F}.Release|Any CPU.Build.0 = Release|Any CPU
{6846F7C0-A994-486B-91D3-D8C200BC5F2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6846F7C0-A994-486B-91D3-D8C200BC5F2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6846F7C0-A994-486B-91D3-D8C200BC5F2C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6846F7C0-A994-486B-91D3-D8C200BC5F2C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CE70867E-D1DF-48C0-A1C5-4B6B67F0FDA9}
EndGlobalSection
EndGlobal
12 changes: 12 additions & 0 deletions AspDotNetCore/Src/NimbleFlow.Api/.config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-ef": {
"version": "7.0.3",
"commands": [
"dotnet-ef"
]
}
}
}
29 changes: 29 additions & 0 deletions AspDotNetCore/Src/NimbleFlow.Api/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/.idea
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
#**/*[Tt]est*
#**/*[Tt]est*/*
#*[Tt]est*
#*[Tt]est*/*
LICENSE
README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using NimbleFlow.Api.Options;

namespace NimbleFlow.Api.ConfigurationExtensions;

public static partial class ConfigurationExtensions
{
public static void ConfigureSwaggerOptions(this IConfiguration configuration)
{
var swaggerOptions = new SwaggerOptions();
configuration.Bind(SwaggerOptions.OptionsName, swaggerOptions);
SwaggerOptions.ConfigureInstance(swaggerOptions);
}
}
Loading

0 comments on commit d74a3bb

Please sign in to comment.