{"id":21015757,"url":"https://github.com/marks5/carrefour-demo","last_synced_at":"2025-03-13T16:43:26.444Z","repository":{"id":186546398,"uuid":"619941048","full_name":"marks5/carrefour-demo","owner":"marks5","description":null,"archived":false,"fork":false,"pushed_at":"2023-03-29T00:53:58.000Z","size":115,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-20T12:08:03.658Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marks5.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-03-27T18:04:03.000Z","updated_at":"2023-03-28T03:39:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"e63d941e-081b-409c-94b0-62a15ea14ad5","html_url":"https://github.com/marks5/carrefour-demo","commit_stats":null,"previous_names":["marks5/carrefour-demo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marks5%2Fcarrefour-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marks5%2Fcarrefour-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marks5%2Fcarrefour-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marks5%2Fcarrefour-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marks5","download_url":"https://codeload.github.com/marks5/carrefour-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243446999,"owners_count":20292447,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T10:11:08.951Z","updated_at":"2025-03-13T16:43:26.409Z","avatar_url":"https://github.com/marks5.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg width=\"696\" alt=\"image\" src=\"https://user-images.githubusercontent.com/6106197/227732319-18959d8e-3cb9-412e-8442-79a81b3c6625.png\"\u003e\n\n![image](https://user-images.githubusercontent.com/6106197/228066458-6cdb240a-1a1d-4836-99ac-2fe345cf8893.png)\n\n# Instruções de local\n\nApontar para arquivo DemoApplication e rodar localmente, endereço está como localhost e porta 8080. A aplicação faz uso do h2 database, não e preciso se conectar em nenhum SGBD externo para tanto.\n\nTambém é possível rodar com os comandos\n\n./gradlew build\n\n./gradlew bootRun\n\n# Instruções de consumo docker\n\ndocker build -t marks/demo .\n\ndocker run -p 8080:8080 marks/demo\n\n# Instruções de consumo das APIs\n\n![image](https://user-images.githubusercontent.com/6106197/228394664-1b67d46e-1c04-4af0-9893-7b3e9d30d683.png)\n\n  /api/dashboard/debits -\u003e Verifica lista de débitos\n  \n  /api/dashboard/credits -\u003e Verifica lista de créditos\n  \n  /api/dashboard/consolidated -\u003e Verifica o balanço do dia debits - credits dado dia atual\n\n  /api/dashboard/consolidated/by?data=yyyy-MM-dd -\u003e Verifica o balanço do dia correspondendo a data específica yyyy-MM-dd\n\n  /api/transaction -\u003e Insere um débito ou crédito por post no body \n\n// Sendo true define como débito, sendo falso define como crédito, claro que podemos melhorar isso criando duas tabelas a fim de melhorar o desempenho mas escolhi assim por se tratar de uma definiçao simplória.\nO valor é um double e o débito/crédito é um booleano.\n\n{\n    \"debito\":true, \n    \"valor\":12000.00\n}\n\n\u003cimg width=\"596\" alt=\"image\" src=\"https://user-images.githubusercontent.com/6106197/228395211-a3d21d9f-4364-4053-991d-367314262f6e.png\"\u003e\n\n\u003cimg width=\"542\" alt=\"image\" src=\"https://user-images.githubusercontent.com/6106197/228395265-a4b22a42-9c20-4000-b368-509366856f95.png\"\u003e\n\n\u003cimg width=\"544\" alt=\"image\" src=\"https://user-images.githubusercontent.com/6106197/228395308-28f5838e-bf22-4b57-897e-975ccd48165f.png\"\u003e\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarks5%2Fcarrefour-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarks5%2Fcarrefour-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarks5%2Fcarrefour-demo/lists"}