{"id":20172891,"url":"https://github.com/7irelo/variate-jdbc-api","last_synced_at":"2025-06-24T08:33:07.711Z","repository":{"id":257556275,"uuid":"850307265","full_name":"7irelo/variate-jdbc-api","owner":"7irelo","description":"E-Commerce JDBC API","archived":false,"fork":false,"pushed_at":"2024-11-09T14:28:40.000Z","size":60,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-07T20:05:24.040Z","etag":null,"topics":["actuator","h2","jdbc","lombok","postgresql","spring-devtools","spring-security"],"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/7irelo.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-08-31T12:19:43.000Z","updated_at":"2024-11-09T14:28:43.000Z","dependencies_parsed_at":"2025-01-13T15:45:54.101Z","dependency_job_id":"f101709c-5b59-45cc-97ad-cc5447db8a5a","html_url":"https://github.com/7irelo/variate-jdbc-api","commit_stats":null,"previous_names":["7irelo/variate-jdbc-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/7irelo/variate-jdbc-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/7irelo%2Fvariate-jdbc-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/7irelo%2Fvariate-jdbc-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/7irelo%2Fvariate-jdbc-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/7irelo%2Fvariate-jdbc-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/7irelo","download_url":"https://codeload.github.com/7irelo/variate-jdbc-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/7irelo%2Fvariate-jdbc-api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261635755,"owners_count":23187907,"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":["actuator","h2","jdbc","lombok","postgresql","spring-devtools","spring-security"],"created_at":"2024-11-14T01:32:44.991Z","updated_at":"2025-06-24T08:33:07.674Z","avatar_url":"https://github.com/7irelo.png","language":"Java","readme":"# **Variate JDBC API**\n\n![variate](https://github.com/user-attachments/assets/5309b3ad-4cef-41ca-bf11-70d5e441f00f)\n\n**Variate JDBC API** is a Spring Boot-based e-commerce backend application that provides a RESTful API for managing categories, products, orders, order items, payments, and reviews. The application integrates with PostgreSQL as its primary database and supports JWT-based authentication for secure access.\n\n## **Features**\n\n- **Category Management**: Create, read, update, patch, and delete product categories.\n- **Product Management**: Handle products under different categories, including information such as price, description, and stock availability.\n- **Order Management**: Create, update, and manage customer orders.\n- **Order Item Management**: Handle individual items within customer orders.\n- **Payment Management**: Manage payment details related to customer orders.\n- **Review Management**: Customers can add, update, and manage reviews for products.\n- **JWT Authentication**: Secure API access using JSON Web Tokens (JWT).\n- **Swagger Documentation**: Explore and interact with the API using Swagger UI.\n\n## **Technologies Used**\n\n- **Java 22**\n- **Spring Boot 3.3.3**\n- **JDBC** for direct database access and SQL queries\n- **Spring Security** with JWT for authentication and authorization\n- **PostgreSQL** as the primary database\n- **H2** for in-memory testing\n- **ModelMapper** for DTO conversions\n- **Swagger/OpenAPI** for API documentation\n- **Maven** for dependency management and build automation\n\n## **Database Setup**\n\nThis project uses PostgreSQL as the database. The default configuration assumes a database named `variatespring`. Ensure PostgreSQL is installed and running in your local environment, and update the credentials in the `application.properties` file as needed.\n\nExample `application.properties` configuration:\n\n```properties\nspring.datasource.url=jdbc:postgresql://localhost:5432/variatespring\nspring.datasource.username=yourUsername\nspring.datasource.password=yourPassword\n```\n\n## **Endpoints Overview**\n\n### **Category Endpoints**\n\n- `POST /api/categories`: Create a new category\n- `GET /api/categories/{id}`: Retrieve a category by ID\n- `GET /api/categories`: List all categories\n- `PUT /api/categories/{id}`: Update a category by ID\n- `PATCH /api/categories/{id}`: Partially update a category\n- `DELETE /api/categories/{id}`: Delete a category\n\n### **Product Endpoints**\n\n- `POST /api/products`: Create a new product\n- `GET /api/products/{id}`: Retrieve a product by ID\n- `GET /api/products`: List all products\n- `PUT /api/products/{id}`: Update a product\n- `PATCH /api/products/{id}`: Partially update a product\n- `DELETE /api/products/{id}`: Delete a product\n\n### **Order Endpoints**\n\n- `POST /api/orders`: Create a new order\n- `GET /api/orders/{id}`: Retrieve an order by ID\n- `GET /api/orders`: List all orders\n- `PUT /api/orders/{id}`: Update an order\n- `PATCH /api/orders/{id}`: Partially update an order\n- `DELETE /api/orders/{id}`: Delete an order\n\n### **Order Item Endpoints**\n\n- `POST /api/order-items`: Create a new order item\n- `GET /api/order-items/{id}`: Retrieve an order item by ID\n- `GET /api/order-items`: List all order items\n- `PUT /api/order-items/{id}`: Update an order item\n- `PATCH /api/order-items/{id}`: Partially update an order item\n- `DELETE /api/order-items/{id}`: Delete an order item\n\n### **Payment Endpoints**\n\n- `POST /api/payments`: Create a new payment\n- `GET /api/payments/{id}`: Retrieve a payment by ID\n- `GET /api/payments`: List all payments\n- `PUT /api/payments/{id}`: Update a payment\n- `PATCH /api/payments/{id}`: Partially update a payment\n- `DELETE /api/payments/{id}`: Delete a payment\n\n### **Review Endpoints**\n\n- `POST /api/reviews`: Create a new review\n- `GET /api/reviews/{id}`: Retrieve a review by ID\n- `GET /api/reviews`: List all reviews\n- `PUT /api/reviews/{id}`: Update a review\n- `PATCH /api/reviews/{id}`: Partially update a review\n- `DELETE /api/reviews/{id}`: Delete a review\n\n## **Security**\n\nJWT-based authentication is used for securing the API. Publicly accessible endpoints include:\n\n- `/api/auth/login`\n- `/api/auth/register`\n- `/swagger-ui/**`\n- `/v3/api-docs/**`\n\nAll other endpoints require a valid JWT token to access.\n\n## **API Documentation**\n\nExplore the API using Swagger UI. You can access the interactive API documentation via the following links:\n\n- **Swagger UI**: `http://localhost:8080/swagger-ui/index.html`\n- **OpenAPI Docs**: `http://localhost:8080/v3/api-docs`\n\n## **Running the Application**\n\nTo run the application locally:\n\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/7irelo/variate-jdbc-api.git\n   ```\n\n2. Navigate to the project directory:\n   ```bash\n   cd variate-jdbc-api\n   ```\n\n3. Configure your PostgreSQL database credentials in `application.properties`.\n\n4. Run the application using Maven:\n   ```bash\n   ./mvnw spring-boot:run\n   ```\n\n## **Development**\n\nFor local development, the project utilizes Maven for managing dependencies. You can take advantage of tools like `spring-boot-devtools` for live reloading during development.\n\n### **Key Dependencies**\n\n- `spring-boot-starter-web`: Provides RESTful web services\n- `spring-boot-starter-jdbc`: For database access using JDBC\n- `spring-boot-starter-security`: To handle security features\n- `postgresql`: PostgreSQL JDBC Driver\n- `modelmapper`: For mapping entities to DTOs and vice versa\n- `jjwt`: For JWT-based authentication\n- `springdoc-openapi-ui`: For auto-generated Swagger documentation\n\n## **Contributing**\n\nWe welcome contributions to improve the project! To contribute:\n\n1. Fork the repository.\n2. Create your feature branch: `git checkout -b feature/new-feature`.\n3. Commit your changes: `git commit -m 'Add a new feature'`.\n4. Push to the branch: `git push origin feature/new-feature`.\n5. Open a pull request and provide a description of your changes.\n\n## **License**\n\nThis project is licensed under the MIT License.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F7irelo%2Fvariate-jdbc-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F7irelo%2Fvariate-jdbc-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F7irelo%2Fvariate-jdbc-api/lists"}