{"id":30732700,"url":"https://github.com/alfonsovidrio/springboot-react-product-crud","last_synced_at":"2026-05-06T06:35:08.309Z","repository":{"id":305127335,"uuid":"1021986058","full_name":"AlfonsoVidrio/springboot-react-product-crud","owner":"AlfonsoVidrio","description":"A full-stack web application for product management built with Spring Boot and React.","archived":false,"fork":false,"pushed_at":"2025-07-18T09:44:36.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-18T13:43:57.656Z","etag":null,"topics":["axios","bootstrap","flyway","jpa","react","spring-boot"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/AlfonsoVidrio.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,"zenodo":null}},"created_at":"2025-07-18T09:09:43.000Z","updated_at":"2025-07-18T09:46:04.000Z","dependencies_parsed_at":"2025-07-18T13:54:16.494Z","dependency_job_id":null,"html_url":"https://github.com/AlfonsoVidrio/springboot-react-product-crud","commit_stats":null,"previous_names":["alfonsovidrio/springboot-react-product-crud"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/AlfonsoVidrio/springboot-react-product-crud","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlfonsoVidrio%2Fspringboot-react-product-crud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlfonsoVidrio%2Fspringboot-react-product-crud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlfonsoVidrio%2Fspringboot-react-product-crud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlfonsoVidrio%2Fspringboot-react-product-crud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlfonsoVidrio","download_url":"https://codeload.github.com/AlfonsoVidrio/springboot-react-product-crud/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlfonsoVidrio%2Fspringboot-react-product-crud/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273484956,"owners_count":25114123,"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","status":"online","status_checked_at":"2025-09-03T02:00:09.631Z","response_time":76,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["axios","bootstrap","flyway","jpa","react","spring-boot"],"created_at":"2025-09-03T17:48:42.934Z","updated_at":"2025-10-21T18:25:48.204Z","avatar_url":"https://github.com/AlfonsoVidrio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 Spring Boot + React CRUD Application\n\nA full-stack web application for product management built with Spring Boot (backend) and React (frontend).\n\n## 📋 Table of Contents\n- [Features](#features)\n- [Technologies Used](#technologies-used)\n- [Project Structure](#project-structure)\n- [Prerequisites](#prerequisites)\n- [Installation \u0026 Setup](#installation--setup)\n- [Running the Application](#running-the-application)\n- [API Endpoints](#api-endpoints)\n- [Database Schema](#database-schema)\n- [Screenshots](#screenshots)\n- [Contributing](#contributing)\n- [License](#license)\n\n## ✨ Features\n\n- **Full CRUD Operations**: Create, Read, Update, Delete products\n- **RESTful API**: Spring Boot with Spring Data REST\n- **React Frontend**: Modern UI with Vite build tool and Bootstrap styling\n- **Database Integration**: MySQL with Flyway migrations\n- **Auto-generated Database**: Flyway automatically creates tables and sample data\n\n## 🛠️ Technologies Used\n\n### Backend\n- **Spring Boot 3.2.11** - Java framework for building the REST API\n- **Spring Data JPA** - Data access layer with JPA/Hibernate\n- **Spring Data REST** - Automatic REST endpoint generation\n- **MySQL** - Relational database for data persistence\n- **Flyway** - Database migration tool\n- **Maven** - Dependency management and build tool\n\n### Frontend\n- **React 18** - JavaScript library for building user interfaces\n- **Vite** - Fast build tool and development server\n- **JavaScript** - Modern JavaScript features\n- **Bootstrap** - CSS framework for responsive design and styling\n\n## 📁 Project Structure\n\n```\nCRUD Fullstack/\n├── backend-products/          # Spring Boot backend\n│   ├── src/main/java/\n│   │   └── com/alfonsovidrio/springboot/backend/backend_products/\n│   │       ├── BackendProductsApplication.java\n│   │       ├── DataRestConfig.java\n│   │       ├── entities/\n│   │       │   └── Product.java\n│   │       └── repositories/\n│   │           └── ProductRepository.java\n│   ├── src/main/resources/\n│   │   ├── application.properties\n│   │   └── db/migration/\n│   │       └── V1__Initial_setup.sql\n│   └── pom.xml\n├── react-app/                 # React frontend\n│   ├── src/\n│   │   ├── components/\n│   │   │   ├── ProductForm.jsx\n│   │   │   ├── ProductTable.jsx\n│   │   │   └── ProductDetails.jsx\n│   │   ├── services/\n│   │   │   └── ProductService.js\n│   │   ├── App.jsx\n│   │   └── main.jsx\n│   ├── package.json\n│   └── vite.config.js\n└── README.md\n```\n\n## 📋 Prerequisites\n\nBefore running this application, make sure you have the following installed:\n\n- **Java 17** or higher\n- **Node.js 18** or higher\n- **MySQL 8.0** or higher\n- **Maven 3.6** or higher\n- **Git**\n\n## 🚀 Installation \u0026 Setup\n\n### 1. Clone the Repository\n```bash\ngit clone https://github.com/AlfonsoVidrio/springboot-react-product-crud.git\ncd springboot-react-product-crud\n```\n\n### 2. Database Setup\n\n**Important:** You must create the database before running the application. Flyway will automatically create the tables and insert sample data.\n\n1. Create a MySQL database named `db_backend_products`:\n```sql\nCREATE DATABASE db_backend_products;\n```\n\n2. Configure environment variables or update `backend-products/src/main/resources/application.properties`:\n```properties\nspring.datasource.url=jdbc:mysql://localhost:3306/db_backend_products\nspring.datasource.username=your_username\nspring.datasource.password=your_password\n```\n\n**Note:** Flyway will automatically create the `products` table and insert sample data when you first run the application.\n\n### 3. Backend Setup\n```bash\ncd backend-products\nmvn clean install\n```\n\n### 4. Frontend Setup\n```bash\ncd react-app\nnpm install\n```\n\n## 🏃‍♂️ Running the Application\n\n### Start the Backend (Spring Boot)\n```bash\ncd backend-products\nmvn spring-boot:run\n```\nThe backend will start on `http://localhost:8080`\n\n### Start the Frontend (React)\n```bash\ncd react-app\nnpm run dev\n```\nThe frontend will start on `http://localhost:5173`\n\n## 📡 API Endpoints\n\nThe application uses Spring Data REST which automatically generates RESTful endpoints:\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| GET | `/products` | Get all products |\n| GET | `/products/{id}` | Get product by ID |\n| POST | `/products` | Create new product |\n| PUT | `/products/{id}` | Update product |\n| DELETE | `/products/{id}` | Delete product |\n\n### Example API Usage\n\n**Get All Products:**\n```bash\ncurl http://localhost:8080/products\n```\n\n**Create a Product:**\n```bash\ncurl -X POST http://localhost:8080/products \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"New Product\",\n    \"description\": \"Product description\",\n    \"price\": 299.99\n  }'\n```\n\n## 🗄️ Database Schema\n\n### Products Table\n| Column | Type | Description |\n|--------|------|-------------|\n| id | BIGINT | Primary key (auto-increment) |\n| name | VARCHAR(255) | Product name |\n| description | TEXT | Product description |\n| price | DECIMAL(10,2) | Product price |\n\n### Sample Data\n\nFlyway will automatically create the following sample products in the database:\n\n- Laptop Dell XPS 13 - $1299.99\n- iPhone 14 - $999.99\n- Samsung Galaxy S23 - $849.99\n- MacBook Pro 16 - $2499.99\n- iPad Air - $599.99\n\n## 📸 Screenshots\n\n### Frontend Application\n\u003cimg width=\"1920\" height=\"868\" alt=\"screencapture-localhost-5173-2025-07-18-03_42_14\" src=\"https://github.com/user-attachments/assets/526a53f6-e9a3-44fb-86fb-378481cf72b2\" /\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falfonsovidrio%2Fspringboot-react-product-crud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falfonsovidrio%2Fspringboot-react-product-crud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falfonsovidrio%2Fspringboot-react-product-crud/lists"}