{"id":22432233,"url":"https://github.com/normalhuman01/easy-market","last_synced_at":"2025-03-27T07:41:46.482Z","repository":{"id":212768215,"uuid":"732271912","full_name":"normalhuman01/easy-market","owner":"normalhuman01","description":null,"archived":false,"fork":false,"pushed_at":"2023-12-16T05:49:06.000Z","size":221,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T12:45:31.766Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/normalhuman01.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-12-16T05:46:54.000Z","updated_at":"2023-12-16T05:49:10.000Z","dependencies_parsed_at":"2023-12-16T07:06:27.337Z","dependency_job_id":null,"html_url":"https://github.com/normalhuman01/easy-market","commit_stats":null,"previous_names":["normalhuman01/easy-market"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/normalhuman01%2Feasy-market","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/normalhuman01%2Feasy-market/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/normalhuman01%2Feasy-market/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/normalhuman01%2Feasy-market/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/normalhuman01","download_url":"https://codeload.github.com/normalhuman01/easy-market/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245806000,"owners_count":20675291,"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-12-05T22:11:04.157Z","updated_at":"2025-03-27T07:41:46.463Z","avatar_url":"https://github.com/normalhuman01.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dependencias\n1. pgAdmin\n2. IntelliJ IDEA IDE\n# Instrucciones\n1. Ejecutar las consultas sql de los archivos BD/schema y DB/data en pgAdmin para crear y poblar la base de datos\n2. Agregar el plugin MapStruct al IDE desde el siguiente link: https://plugins.jetbrains.com/plugin/10036-mapstruct-support\n3. Abrir el proyecto con el archivo build.gradle desde el IDE\n4. Correr el proyecto\n# Rutas\n\u003ch2\u003e Productos \u003c/h2\u003e\n\n1. Obtener productos: GET http://localhost:5000/easy-market/api/products/all\n2. Obtener producto por id: GET http://localhost:5000/easy-market/api/products/{id}\n3. Guardar producto: POST http://localhost:5000/easy-market/api/products\u003cbr\u003e\nEjemplo de Body: \n\u003cpre\u003e\n{\n        \"name\": \"Palta\",\n        \"categoryId\": 1,\n        \"price\": 20.0,\n        \"stock\": 100,\n        \"active\": true\n }\n\u003c/pre\u003e\n\n4. Borrar producto por id: DELETE http://localhost:5000/easy-market/api/products/{id}\n\u003ch2\u003e Compras \u003c/h2\u003e\n\n1. Obtener compras: GET http://localhost:5000/easy-market/api/purchases/all\n2. Obtener compra por id: GET http://localhost:5000/easy-market/api/purchases/{id}\n3. Obtener compra por id del cliente: GET http://localhost:5000/easy-market/api/purchases/client/{id}\n4. Guardar compra: POST http://localhost:5000/easy-market/api/purchases\u003cbr\u003e\nEjemplo de body:\n\u003cpre\u003e\n{\n        \"clientId\": \"4546221\",\n        \"date\": \"1992-08-10T17:30:00\",\n        \"paymentMethod\": \"E\",\n        \"comment\": \"\",\n        \"state\": \"P\",\n        \"items\": []\n}\n\u003c/pre\u003e\n\n5. Borrar compra por id: DELETE http://localhost:5000/easy-market/api/purchases/{id}\n # Documentacion (Swagger)\n 1. Acceder a traves del siguiente link: http://localhost:5000/easy-market/api/swagger-ui.html\n # Seguridad (Spring Security)\n 1. La seguridad se maneja a través de JWT, para autenticarse se accede a la API de autorizacion a través de la siguiente ruta: http://localhost:5000/easy-market/api/auth/authenticate\u003cbr\u003e\njunto con un Body:\n\u003cpre\u003e\n{\n  \"username\": \"*****\",\n  \"password\": \"*****\"\n}\n\u003c/pre\u003e\nLuego, se generará un token JWT que tendrá que ser usado en el \u003cb\u003e header \u003c/b\u003e de cada petición http a las API's.\n\n\u003cbr\u003eSi se desea autenticarse una única vez, también se puede llevar a cabo la autenticación haciendo click en el siguiente boton en la documentación swagger (http://localhost:5000/easy-market/api/swagger-ui.html):\n\u003cimg src=\"/media/img/authorize.jpg\" alt=\"Botón de autorizacion\"/\u003e\nLuego se mostrará el siguiente modal:\n\u003cbr\u003e\n\u003cimg src=\"/media/img/bearer_modal.PNG\" alt=\"Modal de autenticacion\"/\u003e\n\u003cbr\u003e\nEn el campo \"Value\" se ingresará la palabra \"Bearer \" mas el token de autenticación generado previamente, una vez hecho esto, se habilitarán todas las peticiones en esta sesión  a través de la documentación swagger al dar click en el botón \"Authorize\".\n # Estado del proyecto\n 1. En desarrollo (90%)\n # Caracteristicas futuras\n 1. Dockerización\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnormalhuman01%2Feasy-market","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnormalhuman01%2Feasy-market","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnormalhuman01%2Feasy-market/lists"}