├── .lesshst ├── .gitconfig ├── PENE ├── ui │ ├── style.css │ └── index.html ├── package.json ├── characters.xlsx ├── client.py └── server.mjs ├── AAAA ├── server │ ├── ICatDb.cs │ ├── CatFacts.cs │ ├── server.http │ ├── appsettings.Development.json │ ├── appsettings.json │ ├── server.csproj │ ├── ArangoCatDb.cs │ ├── Properties │ │ └── launchSettings.json │ └── Program.cs ├── ui │ └── my-app │ │ ├── public │ │ └── favicon.ico │ │ ├── src │ │ ├── app │ │ │ ├── app.routes.ts │ │ │ ├── app.component.html │ │ │ ├── app.config.ts │ │ │ ├── services │ │ │ │ ├── cat-facts.service.ts │ │ │ │ └── cat-facts.service.spec.ts │ │ │ ├── app.component.css │ │ │ ├── app.component.ts │ │ │ └── app.component.spec.ts │ │ ├── main.ts │ │ ├── index.html │ │ └── styles.css │ │ ├── .editorconfig │ │ ├── tsconfig.app.json │ │ ├── tsconfig.spec.json │ │ ├── .gitignore │ │ ├── tsconfig.json │ │ ├── README.md │ │ ├── package.json │ │ └── angular.json ├── client │ └── client.js └── AAAA.sln ├── .angular-config.json ├── .gitignore ├── README.md └── LICENSE /.lesshst: -------------------------------------------------------------------------------- 1 | .less-history-file: 2 | 3 | Puto el que lo lea -------------------------------------------------------------------------------- /.gitconfig: -------------------------------------------------------------------------------- 1 | [user] 2 | name = dager 3 | email = dager_a7x@hotmail.com 4 | -------------------------------------------------------------------------------- /PENE/ui/style.css: -------------------------------------------------------------------------------- 1 | #main{ 2 | width: 80vw; 3 | height:60vh; 4 | } -------------------------------------------------------------------------------- /PENE/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "xlsx": "^0.18.5" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /PENE/characters.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarianoVilla/AToZChallenge/HEAD/PENE/characters.xlsx -------------------------------------------------------------------------------- /AAAA/server/ICatDb.cs: -------------------------------------------------------------------------------- 1 | public interface ICatDb { 2 | 3 | Task> GetCatFacts(); 4 | 5 | } -------------------------------------------------------------------------------- /AAAA/ui/my-app/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MarianoVilla/AToZChallenge/HEAD/AAAA/ui/my-app/public/favicon.ico -------------------------------------------------------------------------------- /AAAA/ui/my-app/src/app/app.routes.ts: -------------------------------------------------------------------------------- 1 | import { Routes } from '@angular/router'; 2 | 3 | export const routes: Routes = []; 4 | -------------------------------------------------------------------------------- /AAAA/server/CatFacts.cs: -------------------------------------------------------------------------------- 1 | public class CatFact 2 | { 3 | public string? fact { get; set; } 4 | public int length { get; set; } 5 | } -------------------------------------------------------------------------------- /AAAA/server/server.http: -------------------------------------------------------------------------------- 1 | @server_HostAddress = http://localhost:5233 2 | 3 | GET {{server_HostAddress}}/weatherforecast/ 4 | Accept: application/json 5 | 6 | ### 7 | -------------------------------------------------------------------------------- /AAAA/server/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /AAAA/server/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /.angular-config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "cli": { 5 | "completion": { 6 | "prompted": true 7 | }, 8 | "analytics": false 9 | }, 10 | "projects": {} 11 | } -------------------------------------------------------------------------------- /AAAA/ui/my-app/src/main.ts: -------------------------------------------------------------------------------- 1 | import { bootstrapApplication } from '@angular/platform-browser'; 2 | import { appConfig } from './app/app.config'; 3 | import { AppComponent } from './app/app.component'; 4 | 5 | bootstrapApplication(AppComponent, appConfig) 6 | .catch((err) => console.error(err)); 7 | -------------------------------------------------------------------------------- /AAAA/ui/my-app/src/app/app.component.html: -------------------------------------------------------------------------------- 1 |

Puto el que lee

2 |
3 | @for(catFact of catFacts; track $index){ 4 |
5 |

Fact: {{ catFact.fact }}

6 |

Length: {{ catFact.length }}

7 |
8 | } 9 |
-------------------------------------------------------------------------------- /AAAA/ui/my-app/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.ts] 12 | quote_type = single 13 | 14 | [*.md] 15 | max_line_length = off 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /AAAA/ui/my-app/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | MyApp 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /AAAA/ui/my-app/src/app/app.config.ts: -------------------------------------------------------------------------------- 1 | import { ApplicationConfig, provideZoneChangeDetection } from '@angular/core'; 2 | import { provideRouter } from '@angular/router'; 3 | 4 | import { routes } from './app.routes'; 5 | import { provideHttpClient } from '@angular/common/http'; 6 | 7 | export const appConfig: ApplicationConfig = { 8 | providers: [provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes), provideHttpClient()] 9 | }; 10 | -------------------------------------------------------------------------------- /AAAA/ui/my-app/src/app/services/cat-facts.service.ts: -------------------------------------------------------------------------------- 1 | import { HttpClient } from '@angular/common/http'; 2 | import { Injectable } from '@angular/core'; 3 | 4 | @Injectable({ 5 | providedIn: 'root' 6 | }) 7 | export class CatFactsService { 8 | 9 | private readonly beUrl = "http://localhost:5233/getCatFacts"; 10 | 11 | getCatFacts(){ 12 | return this.http.get(this.beUrl); 13 | } 14 | constructor(private http: HttpClient) { 15 | 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /AAAA/ui/my-app/src/app/services/cat-facts.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { CatFactsService } from './cat-facts.service'; 4 | 5 | describe('CatFactsService', () => { 6 | let service: CatFactsService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(CatFactsService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /AAAA/ui/my-app/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | /* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */ 2 | /* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */ 3 | { 4 | "extends": "./tsconfig.json", 5 | "compilerOptions": { 6 | "outDir": "./out-tsc/app", 7 | "types": [] 8 | }, 9 | "files": [ 10 | "src/main.ts" 11 | ], 12 | "include": [ 13 | "src/**/*.d.ts" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /AAAA/ui/my-app/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | body { 3 | font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; 4 | background-image: linear-gradient(to top, #d299c2 0%, #fef9d7 100%); 5 | background-size: auto; 6 | display: flex; 7 | justify-content: center; 8 | align-items: center; 9 | margin: 3vh; 10 | min-height: 100vh; 11 | } -------------------------------------------------------------------------------- /AAAA/ui/my-app/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | /* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */ 2 | /* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */ 3 | { 4 | "extends": "./tsconfig.json", 5 | "compilerOptions": { 6 | "outDir": "./out-tsc/spec", 7 | "types": [ 8 | "jasmine" 9 | ] 10 | }, 11 | "include": [ 12 | "src/**/*.spec.ts", 13 | "src/**/*.d.ts" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /AAAA/server/server.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net8.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /PENE/client.py: -------------------------------------------------------------------------------- 1 | import requests 2 | import json 3 | from types import SimpleNamespace 4 | import pandas as pd 5 | from datetime import datetime 6 | 7 | r = requests.get('https://dragonball-api.com/api/characters') 8 | 9 | json_data = json.loads(r.text) 10 | 11 | df = pd.json_normalize(json_data['items']) 12 | 13 | current_date = datetime.now().strftime('%Y-%m-%d %H:%M:%S') 14 | df['createdAt'] = current_date 15 | 16 | # Save DataFrame to Excel 17 | df.to_excel('characters.xlsx', index=False) 18 | 19 | print("Excel file has been created successfully.") 20 | -------------------------------------------------------------------------------- /AAAA/server/ArangoCatDb.cs: -------------------------------------------------------------------------------- 1 | using ArangoDBNetStandard; 2 | using ArangoDBNetStandard.Transport.Http; 3 | public class ArangoCatDb : ICatDb 4 | { 5 | private ArangoDBClient adb; 6 | public ArangoCatDb() 7 | { 8 | var ArangoPass = Environment.GetEnvironmentVariable("ARANGO_ROOT_PASSWORD"); 9 | var Transport = HttpApiTransport.UsingBasicAuth(new Uri("http://localhost:8529/"), "_system", "root", ArangoPass); 10 | adb = new ArangoDBClient(Transport); 11 | } 12 | public async Task> GetCatFacts() 13 | { 14 | return (await adb.Cursor.PostCursorAsync("FOR doc IN catFacts RETURN doc")).Result; 15 | } 16 | } -------------------------------------------------------------------------------- /AAAA/client/client.js: -------------------------------------------------------------------------------- 1 | const axios = require('axios'); 2 | const db = require('arangojs')(); 3 | 4 | db.useBasicAuth('root', process.env.ARANGO_ROOT_PASSWORD); 5 | collection = db.collection('catFacts'); 6 | 7 | /* 8 | Create the collection (we only needed it once) 9 | collection.create().then( 10 | () => console.log('Collection created'), 11 | err => console.error('Failed to create collection:', err) 12 | ); */ 13 | 14 | axios({ 15 | method:'get', 16 | url:'https://catfact.ninja/fact' 17 | }) 18 | .then(function(response) { 19 | collection.save(response.data) 20 | .then( 21 | meta => console.log('Cat fact saved: ', meta._rev), 22 | err => console.error('Failed to save document: ', err) 23 | ); 24 | }); 25 | -------------------------------------------------------------------------------- /AAAA/ui/my-app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files. 2 | 3 | # Compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | /bazel-out 8 | 9 | # Node 10 | /node_modules 11 | npm-debug.log 12 | yarn-error.log 13 | 14 | # IDEs and editors 15 | .idea/ 16 | .project 17 | .classpath 18 | .c9/ 19 | *.launch 20 | .settings/ 21 | *.sublime-workspace 22 | 23 | # Visual Studio Code 24 | .vscode/* 25 | !.vscode/settings.json 26 | !.vscode/tasks.json 27 | !.vscode/launch.json 28 | !.vscode/extensions.json 29 | .history/* 30 | 31 | # Miscellaneous 32 | /.angular/cache 33 | .sass-cache/ 34 | /connect.lock 35 | /coverage 36 | /libpeerconnection.log 37 | testem.log 38 | /typings 39 | 40 | # System files 41 | .DS_Store 42 | Thumbs.db 43 | -------------------------------------------------------------------------------- /AAAA/ui/my-app/src/app/app.component.css: -------------------------------------------------------------------------------- 1 | .container { 2 | display: flex; 3 | flex-wrap: wrap; 4 | gap: 1vh; 5 | justify-content: center; 6 | } 7 | 8 | .fact-card { 9 | background-color: white; 10 | border: 1px solid #ddd; 11 | border-radius: 5px; 12 | padding: 20px; 13 | box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); 14 | min-width: 400px; 15 | max-width: 400px; 16 | display: flex; 17 | flex-direction: column; 18 | gap: 1vh; 19 | transition: all .1s ease-in-out; 20 | cursor: pointer; 21 | } 22 | .fact-card:hover{ 23 | transform: scale(1.01); 24 | box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); 25 | } 26 | 27 | .fact-text { 28 | font-size: 16px; 29 | color: #333; 30 | } 31 | 32 | .fact-length { 33 | font-size: 14px; 34 | color: #777; 35 | } 36 | -------------------------------------------------------------------------------- /AAAA/ui/my-app/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, inject } from '@angular/core'; 2 | import { RouterOutlet } from '@angular/router'; 3 | import { CatFactsService } from './services/cat-facts.service'; 4 | import { CommonModule } from '@angular/common'; 5 | import { HttpClientModule } from '@angular/common/http'; 6 | 7 | @Component({ 8 | selector: 'app-root', 9 | standalone: true, 10 | imports: [RouterOutlet, CommonModule, HttpClientModule], 11 | templateUrl: './app.component.html', 12 | styleUrl: './app.component.css' 13 | }) 14 | export class AppComponent { 15 | title = 'adasdadas'; 16 | private catFactsService = inject(CatFactsService); 17 | catFacts: any = []; 18 | constructor() { 19 | this.catFactsService.getCatFacts().subscribe((facts) => this.catFacts = facts); 20 | } 21 | 22 | cardClick(){ 23 | if(confirm('¿Querés falopa?')){ 24 | console.log('YESSSSS'); 25 | }else{ 26 | console.log('NOSSSSSSS'); 27 | } 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /AAAA/ui/my-app/src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { AppComponent } from './app.component'; 3 | 4 | describe('AppComponent', () => { 5 | beforeEach(async () => { 6 | await TestBed.configureTestingModule({ 7 | imports: [AppComponent], 8 | }).compileComponents(); 9 | }); 10 | 11 | it('should create the app', () => { 12 | const fixture = TestBed.createComponent(AppComponent); 13 | const app = fixture.componentInstance; 14 | expect(app).toBeTruthy(); 15 | }); 16 | 17 | it(`should have the 'my-app' title`, () => { 18 | const fixture = TestBed.createComponent(AppComponent); 19 | const app = fixture.componentInstance; 20 | expect(app.title).toEqual('my-app'); 21 | }); 22 | 23 | it('should render title', () => { 24 | const fixture = TestBed.createComponent(AppComponent); 25 | fixture.detectChanges(); 26 | const compiled = fixture.nativeElement as HTMLElement; 27 | expect(compiled.querySelector('h1')?.textContent).toContain('Hello, my-app'); 28 | }); 29 | }); 30 | -------------------------------------------------------------------------------- /PENE/server.mjs: -------------------------------------------------------------------------------- 1 | import { createServer } from 'node:http'; 2 | import XLSX from 'xlsx'; 3 | 4 | const server = createServer((req, res) => { 5 | if (req.url === '/dbz') { 6 | res.setHeader('Access-Control-Allow-Origin', '*'); 7 | res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT, PATCH, DELETE'); 8 | res.setHeader('Access-Control-Allow-Headers', 'X-Requested-With,content-type'); 9 | res.setHeader('Access-Control-Allow-Credentials', true); 10 | res.writeHead(200, { 'Content-Type': 'application/json' }); 11 | 12 | const workbook = XLSX.readFile('characters.xlsx'); 13 | const sheetName = workbook.SheetNames[0]; 14 | const worksheet = workbook.Sheets[sheetName]; 15 | const jsonData = XLSX.utils.sheet_to_json(worksheet); 16 | 17 | res.end(JSON.stringify(jsonData, null, 2)); 18 | 19 | } else { 20 | res.writeHead(200, { 'Content-Type': 'text/plain' }); 21 | res.end('Hello World!\n'); 22 | } 23 | }); 24 | 25 | server.listen(3000, '127.0.0.1', () => { 26 | console.log('Listening on 127.0.0.1:3000'); 27 | }); -------------------------------------------------------------------------------- /AAAA/ui/my-app/tsconfig.json: -------------------------------------------------------------------------------- 1 | /* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */ 2 | /* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */ 3 | { 4 | "compileOnSave": false, 5 | "compilerOptions": { 6 | "outDir": "./dist/out-tsc", 7 | "strict": true, 8 | "noImplicitOverride": true, 9 | "noPropertyAccessFromIndexSignature": true, 10 | "noImplicitReturns": true, 11 | "noFallthroughCasesInSwitch": true, 12 | "skipLibCheck": true, 13 | "esModuleInterop": true, 14 | "sourceMap": true, 15 | "declaration": false, 16 | "experimentalDecorators": true, 17 | "moduleResolution": "bundler", 18 | "importHelpers": true, 19 | "target": "ES2022", 20 | "module": "ES2022", 21 | "useDefineForClassFields": false, 22 | "lib": [ 23 | "ES2022", 24 | "dom" 25 | ] 26 | }, 27 | "angularCompilerOptions": { 28 | "enableI18nLegacyMessageIdFormat": false, 29 | "strictInjectionParameters": true, 30 | "strictInputAccessModifiers": true, 31 | "strictTemplates": true 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /AAAA/ui/my-app/README.md: -------------------------------------------------------------------------------- 1 | # MyApp 2 | 3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 18.0.4. 4 | 5 | ## Development server 6 | 7 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files. 8 | 9 | ## Code scaffolding 10 | 11 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. 12 | 13 | ## Build 14 | 15 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. 16 | 17 | ## Running unit tests 18 | 19 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). 20 | 21 | ## Running end-to-end tests 22 | 23 | Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities. 24 | 25 | ## Further help 26 | 27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page. 28 | -------------------------------------------------------------------------------- /AAAA/AAAA.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.5.002.0 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "server", "server\server.csproj", "{37051AC5-8571-4E6F-AF29-EB5882F17144}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {37051AC5-8571-4E6F-AF29-EB5882F17144}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {37051AC5-8571-4E6F-AF29-EB5882F17144}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {37051AC5-8571-4E6F-AF29-EB5882F17144}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {37051AC5-8571-4E6F-AF29-EB5882F17144}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {C0D042D8-6EF8-4D6D-8921-8BF281AA912D} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /AAAA/ui/my-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "my-app", 3 | "version": "0.0.0", 4 | "scripts": { 5 | "ng": "ng", 6 | "start": "ng serve", 7 | "build": "ng build", 8 | "watch": "ng build --watch --configuration development", 9 | "test": "ng test" 10 | }, 11 | "private": true, 12 | "dependencies": { 13 | "@angular/animations": "^18.0.0", 14 | "@angular/common": "^18.0.0", 15 | "@angular/compiler": "^18.0.0", 16 | "@angular/core": "^18.0.0", 17 | "@angular/forms": "^18.0.0", 18 | "@angular/platform-browser": "^18.0.0", 19 | "@angular/platform-browser-dynamic": "^18.0.0", 20 | "@angular/router": "^18.0.0", 21 | "rxjs": "~7.8.0", 22 | "tslib": "^2.3.0", 23 | "zone.js": "~0.14.3" 24 | }, 25 | "devDependencies": { 26 | "@angular-devkit/build-angular": "^18.0.4", 27 | "@angular/cli": "^18.0.4", 28 | "@angular/compiler-cli": "^18.0.0", 29 | "@types/jasmine": "~5.1.0", 30 | "jasmine-core": "~5.1.0", 31 | "karma": "~6.4.0", 32 | "karma-chrome-launcher": "~3.2.0", 33 | "karma-coverage": "~2.2.0", 34 | "karma-jasmine": "~5.1.0", 35 | "karma-jasmine-html-reporter": "~2.1.0", 36 | "typescript": "~5.4.2" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /AAAA/server/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/launchsettings.json", 3 | "iisSettings": { 4 | "windowsAuthentication": false, 5 | "anonymousAuthentication": true, 6 | "iisExpress": { 7 | "applicationUrl": "http://localhost:30399", 8 | "sslPort": 44380 9 | } 10 | }, 11 | "profiles": { 12 | "http": { 13 | "commandName": "Project", 14 | "dotnetRunMessages": true, 15 | "launchBrowser": true, 16 | "launchUrl": "swagger", 17 | "applicationUrl": "http://localhost:5233", 18 | "environmentVariables": { 19 | "ASPNETCORE_ENVIRONMENT": "Development" 20 | } 21 | }, 22 | "https": { 23 | "commandName": "Project", 24 | "dotnetRunMessages": true, 25 | "launchBrowser": true, 26 | "launchUrl": "swagger", 27 | "applicationUrl": "https://localhost:7126;http://localhost:5233", 28 | "environmentVariables": { 29 | "ASPNETCORE_ENVIRONMENT": "Development" 30 | } 31 | }, 32 | "IIS Express": { 33 | "commandName": "IISExpress", 34 | "launchBrowser": true, 35 | "launchUrl": "swagger", 36 | "environmentVariables": { 37 | "ASPNETCORE_ENVIRONMENT": "Development" 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /AAAA/server/Program.cs: -------------------------------------------------------------------------------- 1 | using System.Data.Common; 2 | using System.Net; 3 | 4 | internal class Program 5 | { 6 | private static void Main(string[] args) 7 | { 8 | var builder = WebApplication.CreateBuilder(args); 9 | 10 | builder.Services.AddCors(options => 11 | { 12 | options.AddPolicy("AllowAll", policy => 13 | { 14 | policy.AllowAnyOrigin() 15 | .AllowAnyMethod() 16 | .AllowAnyHeader(); 17 | }); 18 | }); 19 | 20 | 21 | // Add services to the container. 22 | // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle 23 | builder.Services.AddEndpointsApiExplorer(); 24 | builder.Services.AddSwaggerGen(); 25 | 26 | var app = builder.Build(); 27 | 28 | app.UseCors("AllowAll"); 29 | 30 | // Configure the HTTP request pipeline. 31 | if (app.Environment.IsDevelopment()) 32 | { 33 | app.UseSwagger(); 34 | app.UseSwaggerUI(); 35 | } 36 | 37 | app.UseHttpsRedirection(); 38 | 39 | ICatDb db = new ArangoCatDb(); 40 | 41 | app.MapGet("/getCatFacts", async () => 42 | { 43 | var CatFacts = await db.GetCatFacts(); 44 | return Results.Json(CatFacts); 45 | }) 46 | .WithName("GetCatFacts") 47 | .WithOpenApi(); 48 | 49 | app.Run(); 50 | } 51 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore node_modules folder for JavaScript/Node.js packages 2 | node_modules/ 3 | 4 | # Ignore logs 5 | logs 6 | *.log 7 | npm-debug.log* 8 | yarn-debug.log* 9 | yarn-error.log* 10 | 11 | # Ignore compiled output for .NET Core 12 | bin/ 13 | obj/ 14 | 15 | # Ignore .NET Core project files 16 | project.lock.json 17 | project.fragment.lock.json 18 | artifacts/ 19 | 20 | # Ignore user-specific files and settings for Visual Studio/JetBrains Rider 21 | .vscode/ 22 | *.csproj.user 23 | *.suo 24 | *.user 25 | *.userosscache 26 | *.sln.docstates 27 | .idea/ 28 | *.sln.iml 29 | 30 | # Ignore system-specific files 31 | .DS_Store 32 | Thumbs.db 33 | 34 | # Ignore build output for .NET Core 35 | *.dll 36 | *.exe 37 | *.app 38 | *.lib 39 | *.dylib 40 | *.so 41 | *.a 42 | *.pdb 43 | 44 | # Ignore byproducts of running code 45 | *.pyc 46 | *.pyo 47 | *.pyd 48 | *.pid 49 | *.seed 50 | *.pid.lock 51 | 52 | # Ignore coverage files 53 | coverage/ 54 | *.lcov 55 | 56 | # Ignore temporary files and directories 57 | tmp/ 58 | temp/ 59 | *.tmp 60 | *.temp 61 | *.swp 62 | *~ 63 | 64 | # Ignore NPM related files 65 | package-lock.json 66 | yarn.lock 67 | 68 | # Ignore environment variable files 69 | .env 70 | .env.local 71 | .env.development.local 72 | .env.test.local 73 | .env.production.local 74 | 75 | # Ignore IDE specific files 76 | *.code-workspace 77 | 78 | # Ignore build results 79 | build/ 80 | dist/ 81 | out/ 82 | 83 | # Ignore other random stuff 84 | .cache/ 85 | .vscode-server/ 86 | .nuget/ 87 | .local/ 88 | .dotnet/ 89 | .templateengine/ 90 | .bash_history 91 | .motd_shown 92 | .wget-hsts 93 | .npm/ 94 | .bashrc 95 | .ssh/ 96 | .arangosh.history 97 | .sudo_as_admin_successful 98 | .viminfo 99 | .npmrc 100 | -------------------------------------------------------------------------------- /PENE/ui/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Holi. 2 | 3 | Este repo contiene todo el código de mis streams de live coding con stacks bizarros. 4 | La idea es implementar, usando stacks de cuatro letras (una por componente), la siguiente arquitectura básica: 5 | ![Architecture](https://github.com/MarianoVilla/AToZChallenge/assets/44660612/9ac662ec-33d1-45da-b2db-73a13d1c1b27) 6 | 7 | Originalmente la idea era usar un stack por letra (AAAA, BBBB, etc), pero probablemente nos gane la tentación de stacks más troll (e.g., Python, Elasticsearch, Node, Ember -PENE-). 8 | 9 | *Todo lo que se haga en este repo va a estar documentado en YT; en [esta](https://www.youtube.com/playlist?list=PL6ZpaevWeaf95AXzBKY-w_SqJ_R5wQFiQ) lista de reproducción.* 10 | 11 | ## Stacks terminados. 12 | 13 | ### AAAA 14 | 15 | - [Axios.js](https://axios-http.com/) para el cliente, usando API REST que devuelve un "cat fact" por cada GET que le hagas -> [https://catfact.ninja/](https://catfact.ninja/fact) 16 | - [ArangoDB](https://arangodb.com/), una DB NoSQL orientada a grafos para como capa de persistencia. Usamos varias interfaces para interactuar con la base, incluyendo el CLI (Arangosh), la web UI que provee el motor de la base localmente, y los drivers para JS y .NET. 17 | - [ASP.NET Core](https://learn.microsoft.com/en-us/aspnet/core/?view=aspnetcore-8.0) para el server. En este ejemplo incluimos una explicación de patrones de IoC, usando dependency injection como ejemplo de utilización de interfaces para evitar coupling. 18 | - [Angular](https://angular.dev/) para el front-end. En el último video del stack atravesamos de comienzo a fin la documentación del framework -que yo jamás había usado-, e implementamos un front *HERMOSO*. 19 | 20 | ### PENE 21 | 22 | - [Python](https://www.python.org/) 23 | - [Excel](https://youtu.be/dQw4w9WgXcQ) 24 | - [Node.js](https://nodejs.org/en) 25 | - [ECharts](https://echarts.apache.org/en/index.html) 26 | 27 | 28 | ## Colaborar. 29 | 30 | ### Código. 31 | Si querés colaborar con alguno de los proyectos, sentite libre de abrir una PR. Tené en cuenta que los cambios van a ser revisados en stream, para mantener el requerimiento de que todo esté documentado en YT. 32 | 33 | ### Sugerir stacks. 34 | Si se te ocurre algún stack divertido, podés abrir un issue, o hablarme por cualquier otra vía. 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /AAAA/ui/my-app/angular.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json", 3 | "version": 1, 4 | "newProjectRoot": "projects", 5 | "projects": { 6 | "my-app": { 7 | "projectType": "application", 8 | "schematics": {}, 9 | "root": "", 10 | "sourceRoot": "src", 11 | "prefix": "app", 12 | "architect": { 13 | "build": { 14 | "builder": "@angular-devkit/build-angular:application", 15 | "options": { 16 | "outputPath": "dist/my-app", 17 | "index": "src/index.html", 18 | "browser": "src/main.ts", 19 | "polyfills": [ 20 | "zone.js" 21 | ], 22 | "tsConfig": "tsconfig.app.json", 23 | "assets": [ 24 | { 25 | "glob": "**/*", 26 | "input": "public" 27 | } 28 | ], 29 | "styles": [ 30 | "src/styles.css" 31 | ], 32 | "scripts": [] 33 | }, 34 | "configurations": { 35 | "production": { 36 | "budgets": [ 37 | { 38 | "type": "initial", 39 | "maximumWarning": "500kB", 40 | "maximumError": "1MB" 41 | }, 42 | { 43 | "type": "anyComponentStyle", 44 | "maximumWarning": "2kB", 45 | "maximumError": "4kB" 46 | } 47 | ], 48 | "outputHashing": "all" 49 | }, 50 | "development": { 51 | "optimization": false, 52 | "extractLicenses": false, 53 | "sourceMap": true 54 | } 55 | }, 56 | "defaultConfiguration": "production" 57 | }, 58 | "serve": { 59 | "builder": "@angular-devkit/build-angular:dev-server", 60 | "configurations": { 61 | "production": { 62 | "buildTarget": "my-app:build:production" 63 | }, 64 | "development": { 65 | "buildTarget": "my-app:build:development" 66 | } 67 | }, 68 | "defaultConfiguration": "development" 69 | }, 70 | "extract-i18n": { 71 | "builder": "@angular-devkit/build-angular:extract-i18n" 72 | }, 73 | "test": { 74 | "builder": "@angular-devkit/build-angular:karma", 75 | "options": { 76 | "polyfills": [ 77 | "zone.js", 78 | "zone.js/testing" 79 | ], 80 | "tsConfig": "tsconfig.spec.json", 81 | "assets": [ 82 | { 83 | "glob": "**/*", 84 | "input": "public" 85 | } 86 | ], 87 | "styles": [ 88 | "src/styles.css" 89 | ], 90 | "scripts": [] 91 | } 92 | } 93 | } 94 | } 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /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 | --------------------------------------------------------------------------------