{"id":25013842,"url":"https://github.com/levoratojoao/cars-api","last_synced_at":"2026-05-07T17:41:44.416Z","repository":{"id":271626313,"uuid":"913973407","full_name":"LevoratoJoao/cars-api","owner":"LevoratoJoao","description":"Cars Dealership - Full Stack Web App ","archived":false,"fork":false,"pushed_at":"2025-02-25T16:36:28.000Z","size":489,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T05:12:18.263Z","etag":null,"topics":["angular","java","spring","web"],"latest_commit_sha":null,"homepage":"","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/LevoratoJoao.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-08T17:49:12.000Z","updated_at":"2025-02-25T16:36:32.000Z","dependencies_parsed_at":"2025-02-25T04:27:00.015Z","dependency_job_id":"66ab0e6e-f42d-45e3-8d5b-7989e14cf490","html_url":"https://github.com/LevoratoJoao/cars-api","commit_stats":null,"previous_names":["levoratojoao/cars-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LevoratoJoao%2Fcars-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LevoratoJoao%2Fcars-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LevoratoJoao%2Fcars-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LevoratoJoao%2Fcars-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LevoratoJoao","download_url":"https://codeload.github.com/LevoratoJoao/cars-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246277367,"owners_count":20751549,"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":["angular","java","spring","web"],"created_at":"2025-02-05T07:16:08.216Z","updated_at":"2026-05-07T17:41:44.386Z","avatar_url":"https://github.com/LevoratoJoao.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cars-api\n\n## Index\n\n- [Description](#description)\n- [API](#API)\n- [Front-end](#Front-end)\n- [TODO](#TODO)\n\n## Description\n\nThis is a simple dealership Web Application that allows users to view a list of cars, employees, customers and sales, among with the details of each one of them. The application is divided in two parts: the Back-end and the Front-end.\n\nThe Back-end is a RESTful API built with Spring Boot and PostgreSQL as the database. The Front-end is a Angular application that consumes the API.\n\n## API\n\nThe API has the following endpoints:\n\n### Cars\n\n- `/api/v1/cars?page={page}\u0026size={size}`: GET all cars\n\n```json\n[\n\t{\n\t    \"car_id\": 2,\n\t\t\"car_name\": \"Toyota Corolla\",\n\t\t\"model\": \"Sedan\",\n\t\t\"release_year\": 2020,\n\t\t\"motor\": \"V4\",\n\t\t\"kilometers\": 15000.5,\n\t\t\"price\": 20000.0,\n\t\t\"manufacturer\": {\n\t\t\t\"man_name\": \"Toyota\",\n\t\t\t\"country\": \"Japan\"\n\t\t},\n\t\t\"colors\": [\n\t\t\t\"Red\",\n\t\t\t\"White\"\n\t\t]\n\t},\n\t{\n\t\t\"car_id\": 4,\n\t\t\"car_name\": \"Honda Civic\",\n\t\t\"model\": \"Sedan\",\n\t\t\"release_year\": 2019,\n\t\t\"motor\": \"V4\",\n\t\t\"kilometers\": 25000.0,\n\t\t\"price\": 18000.0,\n\t\t\"manufacturer\": {\n\t\t\t\"man_name\": \"Honda\",\n\t\t\t\"country\": \"Japan\"\n\t\t},\n\t\t\"colors\": [\n\t\t\t\"Blue\",\n\t\t\t\"Black\"\n\t\t]\n\t}\n]\n```\n\n- `/api/v1/cars/{id}`: GET a car by id\n\n```json\n{\n    \"car_id\": 2,\n    \"car_name\": \"Toyota Corolla\",\n    \"model\": \"Sedan\",\n    \"release_year\": 2020,\n    \"motor\": \"V4\",\n    \"kilometers\": 15000.5,\n    \"price\": 20000.0,\n    \"manufacturer\": {\n        \"man_name\": \"Toyota\",\n        \"country\": \"Japan\"\n    },\n    \"colors\": [\n        \"Red\",\n        \"White\"\n    ]\n}\n```\n\n- `/api/v1/cars`: POST a new car\n\n```json\n{\n    \"car_name\": \"Toyota Corolla\",\n    \"model\": \"Sedan\",\n    \"release_year\": 2020,\n    \"motor\": \"V4\",\n    \"kilometers\": 15000.5,\n    \"price\": 20000.00,\n    \"manufacturer\": {\n            \"manufacturer_name\": \"Toyota\",\n            \"country\": \"Japan\"\n    },\n    \"colors\": [\"Red\",\"White\"]\n}\n```\n\n- `/api/v1/cars/list`: POST a list of cars\n\n```json\n[\n    {\n        \"car_name\": \"Toyota Corolla\",\n        \"model\": \"Sedan\",\n        \"release_year\": 2020,\n        \"motor\": \"V4\",\n        \"kilometers\": 15000.5,\n        \"price\": 20000.00,\n        \"manufacturer\": {\n            \"manufacturer_name\": \"Toyota\",\n            \"country\": \"Japan\"\n        },\n        \"colors\": [\"Red\",\"White\"]\n    },\n    {\n        \"car_name\": \"Honda Civic\",\n        \"model\": \"Sedan\",\n        \"release_year\": 2019,\n        \"motor\": \"V4\",\n        \"kilometers\": 25000.0,\n        \"price\": 18000.00,\n        \"manufacturer\": {\n            \"manufacturer_name\": \"Honda\",\n            \"country\": \"Japan\"\n        },\n        \"colors\": [\"Blue\",\"Black\"]\n    }\n]\n```\n\n- `/api/v1/cars`: PUT a car\n\n```json\n{\n    \"car_name\": \"Toyota Corolla\",\n    \"model\": \"Sedan\",\n    \"release_year\": 2020,\n    \"motor\": \"V4\",\n    \"kilometers\": 15000.5,\n    \"price\": 20000.00,\n    \"manufacturer\": {\n            \"manufacturer_name\": \"Toyota\",\n            \"country\": \"Japan\"\n    },\n    \"colors\": [\"Red\",\"White\"]\n}\n```\n\n- `/api/v1/cars/{id}`: DELETE a car\n\n- `/api/v1/cars/filter?page={page}\u0026size={size}\u0026`: GET cars by filter\n\n    Optional parameters:\n    - `manufacturer={manufacturer}`: String\n    - `model={model}`: String\n    - `color={color}`: String\n    - `min_price={min_price}`: Double\n    - `max_price={max_price}`: Double\n    - `min_year={min_year}`: Integer\n    - `max_year={max_year}`: Integer\n    - `color={color}`: String\n    - `car={car}`: String\n\n### Employees\n\n- `/api/v1/employees?page={page}\u0026size={size}`: GET all employees\n\n```json\n[\n\t{\n\t\t\"employee_id\": 1,\n\t\t\"first_name\": \"David\",\n\t\t\"last_name\": \"Brown\",\n\t\t\"position\": \"Sales Manager\",\n\t\t\"salary\": 55000.0,\n\t\t\"hire_date\": \"2019-04-15\",\n\t\t\"phone_number\": \"555-1111\",\n\t\t\"email\": \"david.brown@example.com\"\n\t},\n\t{\n\t\t\"employee_id\": 2,\n\t\t\"first_name\": \"Emma\",\n\t\t\"last_name\": \"Wilson\",\n\t\t\"position\": \"Service Technician\",\n\t\t\"salary\": 45000.0,\n\t\t\"hire_date\": \"2020-06-20\",\n\t\t\"phone_number\": \"555-2222\",\n\t\t\"email\": \"emma.wilson@example.com\"\n\t}\n]\n```\n\n- `/api/v1/employees/{id}`: GET an employee by id\n\n```json\n{\n    \"employee_id\": 1,\n    \"first_name\": \"David\",\n    \"last_name\": \"Brown\",\n    \"position\": \"Sales Manager\",\n    \"salary\": 55000.0,\n    \"hire_date\": \"2019-04-15\",\n    \"phone_number\": \"555-1111\",\n    \"email\": \"david.brown@example.com\"\n}\n```\n\n- `/api/v1/employees`: POST a new employee\n\n```json\n{\n    \"first_name\": \"David\",\n    \"last_name\": \"Brown\",\n    \"position\": \"Sales Manager\",\n    \"salary\": 55000.00,\n    \"hire_date\": \"2019-04-15\",\n    \"phone_number\": \"555-1111\",\n    \"email\": \"david.brown@example.com\"\n}\n```\n\n- `api/v1/employees/list`: POST a list of employees\n\n```json\n[\n    {\n        \"first_name\": \"David\",\n        \"last_name\": \"Brown\",\n        \"position\": \"Sales Manager\",\n        \"salary\": 55000.00,\n        \"hire_date\": \"2019-04-15\",\n        \"phone_number\": \"555-1111\",\n        \"email\": \"david.brown@example.com\"\n    },\n    {\n        \"first_name\": \"Emma\",\n        \"last_name\": \"Wilson\",\n        \"position\": \"Service Technician\",\n        \"salary\": 45000.00,\n        \"hire_date\": \"2020-06-20\",\n        \"phone_number\": \"555-2222\",\n        \"email\": \"emma.wilson@example.com\"\n    }\n]\n```\n\n- `/api/v1/employees/filter?page={page}\u0026size={size}\u0026`: GET employees by filter\n\n    Optional parameters:\n    - `first_name={first_name}`: String\n    - `last_name={last_name}`: String\n    - `position={position}`: String\n    - `email={email}`: String\n    - `min_salary={min_salary}`: Double\n    - `max_salary={max_salary}`: Double\n    - `phone_number={phone_number}`: String\n\n### Customers\n\n- `/api/v1/customers?page={page}\u0026size={size}`: GET all customers\n\n```json\n[\n\t{\n\t\t\"customer_id\": 1,\n\t\t\"first_name\": \"Alice\",\n\t\t\"last_name\": \"Johnson\",\n\t\t\"phone_number\": \"555-1234\",\n\t\t\"email\": \"alice.johnson@example.com\"\n\t},\n\t{\n\t\t\"customer_id\": 2,\n\t\t\"first_name\": \"Bob\",\n\t\t\"last_name\": \"Smith\",\n\t\t\"phone_number\": \"555-5678\",\n\t\t\"email\": \"bob.smith@example.com\"\n\t}\n]\n```\n\n- `/api/v1/customers/{id}`: GET a customer by id\n\n```json\n{\n    \"customer_id\": 1,\n    \"first_name\": \"Alice\",\n    \"last_name\": \"Johnson\",\n    \"phone_number\": \"555-1234\",\n    \"email\": \"alice.johnson@example.com\"\n}\n```\n\n- `/api/v1/customers`: POST a new customer\n\n```json\n{\n    \"first_name\": \"Alice\",\n    \"last_name\": \"Johnson\",\n    \"email\": \"alice.johnson@example.com\",\n    \"phone_number\": \"555-1234\"\n}\n```\n\n- `/api/v1/customers/list`: POST a list of customers\n\n```json\n[\n\t{\n\t\t\"first_name\": \"Bob\",\n\t\t\"last_name\": \"Smith\",\n\t\t\"email\": \"bob.smith@example.com\",\n\t\t\"phone_number\": \"555-5678\"\n\t},\n\t{\n\t\t\"first_name\": \"Charlie\",\n\t\t\"last_name\": \"Davis\",\n\t\t\"email\": \"charlie.davis@example.com\",\n\t\t\"phone_number\": \"555-9012\"\n\t}\n]\n```\n\n- `/api/v1/customers/filter?page={page}\u0026size={size}\u0026`: GET customers by filter\n\n    Optional parameters:\n    - `first_name={first_name}`: String\n    - `last_name={last_name}`: String\n    - `email={email}`: String\n    - `phone_number={phone_number}`: String\n\n### Sales\n\n- `/api/v1/sales?page={page}\u0026size={size}`: GET all sales\n\n```json\n[\n\t{\n\t\t\"id\": 4,\n\t\t\"date\": \"2025-01-31\",\n\t\t\"sale_price\": 19000.0,\n\t\t\"car\": {\n\t\t\t\"car_id\": 2,\n\t\t\t\"car_name\": \"Toyota Corolla\",\n\t\t\t\"model\": \"Sedan\",\n\t\t\t\"release_year\": 2020,\n\t\t\t\"motor\": \"V4\",\n\t\t\t\"kilometers\": 15000.5,\n\t\t\t\"price\": 20000.0,\n\t\t\t\"manufacturer\": {\n\t\t\t\t\"manufacturer_id\": 1,\n\t\t\t\t\"manufacturer_name\": \"Toyota\",\n\t\t\t\t\"country\": \"Japan\"\n\t\t\t},\n\t\t\t\"colors\": [\n\t\t\t\t{\n\t\t\t\t\t\"color_id\": 1,\n\t\t\t\t\t\"color_name\": \"Red\"\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\t\"color_id\": 2,\n\t\t\t\t\t\"color_name\": \"White\"\n\t\t\t\t}\n\t\t\t]\n\t\t},\n\t\t\"customer\": {\n\t\t\t\"customer_id\": 2,\n\t\t\t\"first_name\": \"Bob\",\n\t\t\t\"last_name\": \"Smith\",\n\t\t\t\"phone_number\": \"555-5678\",\n\t\t\t\"email\": \"bob.smith@example.com\"\n\t\t},\n\t\t\"employee\": {\n\t\t\t\"employee_id\": 1,\n\t\t\t\"first_name\": \"David\",\n\t\t\t\"last_name\": \"Brown\",\n\t\t\t\"position\": \"Sales Manager\",\n\t\t\t\"salary\": 55000.0,\n\t\t\t\"hire_date\": \"2019-04-15\",\n\t\t\t\"phone_number\": \"555-1111\",\n\t\t\t\"email\": \"david.brown@example.com\"\n\t\t}\n\t}\n]\n```\n\n- `/api/v1/sales/{id}`: GET a sale by id\n\n```json\n{\n    \"id\": 4,\n    \"date\": \"2025-01-31\",\n    \"sale_price\": 19000.0,\n    \"car\": { ... },\n    \"customer\": { ... },\n    \"employee\": { ... }\n}\n```\n\n- `/api/v1/sales`: POST a new sale\n\n```json\n{\n    \"date\": \"2025-01-31\",\n    \"sale_price\": 19000.0,\n    \"car_id\": 2,\n    \"customer_id\": 2,\n    \"employee_id\": 1\n}\n```\n\n- `/api/v1/sales/filter?page={page}\u0026size={size}\u0026`: GET sales by filter\n\n    Optional parameters:\n    - `date={date}`: String\n    - `min_price={min_price}`: Double\n    - `max_price={max_price}`: Double\n    - `car_name={car_name}`: String\n    - `customer_name={customer_name}`: String\n    - `employee_name={employee_name}`: String\n\n## Front-end\n\nThe Front-end is a Angular application that consumes the API through HTTP requests. The application has the following pages:\n\n### Home page:\n\n![Home page](./images/home_page.png)\n\n### Cars page:\n\n![Cars page](./images/cars_page.png)\n\n### Employees page:\n\n![Employees page](./images/employees_page.png)\n\n### Customers page:\n\n![Customers page](./images/customers_page.png)\n\n### Sales page:\n\n![Sales page](./images/sales_page.png)\n\n## TODO:\n\n- [x] Add pagination\n- [x] Add filters\n- [x] Add async and concurrency control\n- [x] Add security with authentication and authorization (backend)\n- [ ] Add security with authentication and authorization (frontend)\n- [ ] Add tests\n- [ ] Add Docker","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevoratojoao%2Fcars-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flevoratojoao%2Fcars-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevoratojoao%2Fcars-api/lists"}