{"id":17051646,"url":"https://github.com/k0kai/shopping-list-api","last_synced_at":"2026-05-05T18:32:09.788Z","repository":{"id":257184044,"uuid":"857553049","full_name":"K0kai/shopping-list-api","owner":"K0kai","description":"A basic shopping list API made with RESTful for demo purposes","archived":false,"fork":false,"pushed_at":"2024-09-15T01:18:21.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-23T04:42:14.333Z","etag":null,"topics":["api-rest","demo","java","mysql","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/K0kai.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-15T00:31:37.000Z","updated_at":"2024-09-15T01:18:23.000Z","dependencies_parsed_at":"2024-09-15T07:27:58.216Z","dependency_job_id":null,"html_url":"https://github.com/K0kai/shopping-list-api","commit_stats":null,"previous_names":["k0kai/shopping-list-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/K0kai%2Fshopping-list-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/K0kai%2Fshopping-list-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/K0kai%2Fshopping-list-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/K0kai%2Fshopping-list-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/K0kai","download_url":"https://codeload.github.com/K0kai/shopping-list-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245056902,"owners_count":20553854,"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":["api-rest","demo","java","mysql","spring-boot"],"created_at":"2024-10-14T10:07:00.097Z","updated_at":"2025-10-23T23:48:03.822Z","avatar_url":"https://github.com/K0kai.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\r\n\r\n# Shopping List API\r\n\r\nWelcome to the **Shopping List API**! This is a RESTful API designed to manage a shopping list with seamless integration to a MySQL database. It includes a simple front-end for adding products, making it ideal for demonstration purposes in local development environments.\r\n\r\n## Features\r\n\r\n- **RESTful API**: CRUD operations for managing shopping list items.\r\n- **MySQL Integration**: Data is stored securely using a MySQL database.\r\n- **Priority System**: Assign product priorities (e.g., \"high\", \"medium\", \"low\") which are stored as byte values.\r\n- **Local Hosting**: The API and website are intended to be run on local development servers, such as those provided by IDEs (e.g., IntelliJ, Eclipse).\r\n\r\n## Tech Stack\r\n\r\n- **Backend**: Spring Boot (Java), RESTful API\r\n- **Database**: MySQL\r\n- **Frontend**: Basic HTML, CSS, and JavaScript for interacting with the API\r\n- **Development Tools**: Local server (IDE-based)\r\n\r\n## Installation\r\n\r\nTo run this project locally, follow these steps:\r\n\r\n### Prerequisites\r\n\r\n- [JDK 22](https://www.oracle.com/java/technologies/javase-jdk17-downloads.html)\r\n- [MySQL](https://dev.mysql.com/downloads/)\r\n- [Maven](https://maven.apache.org/download.cgi)\r\n\r\n### Steps\r\n\r\n1. Clone the repository:\r\n\r\n    ```bash\r\n    git clone https://github.com/K0kai/shopping-list-api.git\r\n    ```\r\n\r\n2. Navigate to the project directory:\r\n\r\n    ```bash\r\n    cd shopping-list-api\r\n    ```\r\n\r\n3. Set up the MySQL database:\r\n\r\n    - Create a new database called `lista_compras`.\r\n    - Update the `application.properties` file with your MySQL username, password, and database URL.\r\n\r\n    Example configuration in `src/main/resources/application.properties`:\r\n\r\n    ```properties\r\n    spring.datasource.url=jdbc:mysql://localhost:3306/lista_compras\r\n    spring.datasource.username=yourUsername\r\n    spring.datasource.password=yourPassword\r\n    ```\r\n\r\n4. Build and run the project:\r\n\r\n    ```bash\r\n    mvn clean install\r\n    mvn spring-boot:run\r\n    ```\r\n\r\n5. Access the API via `http://localhost:8080/itens` and the frontend you can access by using a live server or an IDE to run the html file and adding your port to the access origins in the controller and the `WebConfig`.\r\n\r\n## Usage\r\n\r\nOnce the project is running:\r\n\r\n- You can add, update, view, and delete products in your shopping list using the provided API endpoints.\r\n- Use the simple front-end interface to interact with the API for adding products.\r\n\r\n### Example API Requests\r\n\r\n- **Add a product**:  \r\n    `POST /itens`\r\n    ```json\r\n    {\r\n      \"name\": \"Milk\",\r\n      \"quantity\": 2,\r\n      \"priority\": \"high\"\r\n    }\r\n    ```\r\n\r\n- **Get all products**:  \r\n    `GET /itens`\r\n\r\n- **Update a product**:  \r\n    `PUT /itens/{id}`\r\n\r\n- **Delete a product**:  \r\n    `DELETE /itens/{id}`\r\n\t`DELETE /itens/all`\r\n\r\n## Project Structure\r\n\r\n```\r\nshopping-list-api/\r\n│\r\n├── src/\r\n│   ├── main/\r\n│   │   ├── java/com/kokai/\r\n│   │   │   ├── config/       // Configuration Classes\r\n│   │   │   ├── controller/   // REST Controllers\r\n│   │   │   ├── converter/    // Converters for Data Types\r\n│   │   │   ├── entity/       // Entity Classes\r\n│   │   │   ├── lista_compras/ // Core Shopping List Logic\r\n│   │   │   ├── repository/   // Repositories\r\n│   │   │   └── service/      // Business Logic\r\n│   │   └── resources/│   │ \r\n│   │       └── application.properties  // DB Config\r\n│   └── test/                 // Unit and Integration Tests\r\n│\r\n├── pom.xml                 // Maven Dependencies\r\n├── site.html               // Frontend\r\n└── README.md               // This file\r\n```\r\n\r\n## Future Improvements\r\n\r\n- Add authentication and authorization (e.g., JWT).\r\n- Add integration with WhatsApp bots.\r\n- Enhance the API paths by adding more layers.\r\n- Rename the portuguese files and methods to conventional english.\r\n\r\n## Demo Videos\r\n\r\nhttps://github.com/user-attachments/assets/3ecae15b-ecf5-4c40-b665-f9a4d94b14c3\r\n\r\nhttps://github.com/user-attachments/assets/27befd14-c4ae-4f52-bfd7-d0e3b3287b4a\r\n\r\n## Contact\r\n\r\nFor any questions or inquiries, feel free to contact me at: [lipalupa1@gmail.com].\r\n\r\n---\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk0kai%2Fshopping-list-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fk0kai%2Fshopping-list-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk0kai%2Fshopping-list-api/lists"}