{"id":20791917,"url":"https://github.com/spring-petclinic/spring-petclinic-reactjs","last_synced_at":"2025-05-15T11:08:50.890Z","repository":{"id":48676848,"uuid":"73953793","full_name":"spring-petclinic/spring-petclinic-reactjs","owner":"spring-petclinic","description":"ReactJS (with TypeScript) and Spring Boot version of the Spring Petclinic sample application","archived":false,"fork":false,"pushed_at":"2024-10-20T13:59:17.000Z","size":7528,"stargazers_count":287,"open_issues_count":12,"forks_count":279,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-05-10T03:46:43.710Z","etag":null,"topics":["reactjs","spring-boot","spring-data-jpa","typescript"],"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/spring-petclinic.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2016-11-16T19:31:11.000Z","updated_at":"2025-05-09T08:12:02.000Z","dependencies_parsed_at":"2024-09-08T18:02:56.935Z","dependency_job_id":"7de1a85b-e8cd-4afb-9629-c8f00df306d3","html_url":"https://github.com/spring-petclinic/spring-petclinic-reactjs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-petclinic%2Fspring-petclinic-reactjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-petclinic%2Fspring-petclinic-reactjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-petclinic%2Fspring-petclinic-reactjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-petclinic%2Fspring-petclinic-reactjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spring-petclinic","download_url":"https://codeload.github.com/spring-petclinic/spring-petclinic-reactjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254328385,"owners_count":22052632,"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":["reactjs","spring-boot","spring-data-jpa","typescript"],"created_at":"2024-11-17T15:47:46.860Z","updated_at":"2025-05-15T11:08:50.872Z","avatar_url":"https://github.com/spring-petclinic.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Frontend for Spring Boot PetClinic demo\n[![Build Status](https://travis-ci.org/spring-petclinic/spring-petclinic-reactjs.svg?branch=master)](https://travis-ci.org/spring-petclinic/spring-petclinic-reactjs)\n\nThis project is a port of the [Spring (Boot) PetClinic demo](https://github.com/spring-projects/spring-petclinic) with a frontend built using [ReactJS](https://facebook.github.io/react/) and\n[TypeScript](https://www.typescriptlang.org/). \n\nI have tried to make as few modifications to the backend code as necessary to the [spring-boot branch](https://github.com/spring-projects/spring-petclinic/tree/springboot) of the original sample project.\nMainly I've added the new package `org.springframework.samples.petclinic.web.api`\nthat contains the REST Api that is used by the React frontend. In this package most of the classes are taken \nfrom the [angularjs version](https://github.com/spring-projects/spring-petclinic/tree/angularjs) of the demo.\n\n## Related projects\n\nNote there is another Spring PetClinic example that uses React: [spring-petclinic-graphql](https://github.com/spring-petclinic/spring-petclinic-graphql). Beside React that example uses **GraphQL** for API queries instead of the REST API.\n\n## Contribution\n\nIf you like to help and contribute (there's lot root for improvements! I've collected a list of ideas [here: TODO.md](TODO.md)) you're more than welcome! Please open an issue or contact me on [Twitter](https://twitter.com/nilshartmann) so we can discuss together!\n\n\n## Install and run\n\nNote: Spring Boot Server App must be running before starting the client!\n\nTo start the server, launch a Terminal and run from the project's root folder (`spring-petclinic`):\n```\n./mvnw spring-boot:run\n```\n\nWhen the server is running you can try to access the API for example to query all known pet types:\n```\ncurl http://localhost:8080/api/pettypes\n```\n\nAfter starting the server you can install and run the client from the `client` folder:\n\n1. `npm install` (installs the node modules and the TypeScript definition files)\n2. `PORT=4444 npm start` \n3. Open `http://localhost:4444`\n\n(Why not use the same server for backend and frontend? Because Webpack does a great job for serving JavaScript-based SPAs and I think it's not too uncommon to run this kind of apps using two dedicated server, one for backend, one for frontend)\n\n## Feedback\n\nIn case you have any comments, questions, bugs, enhancements feel free to open an issue in this repository.\nIf you you want to follow me on twitter, my handle is [@nilshartmann](https://twitter.com/nilshartmann).\n \n------\n \n# From the original sample README file:\n\n## Understanding the Spring Petclinic application with a few diagrams\n\u003ca href=\"https://speakerdeck.com/michaelisvy/spring-petclinic-sample-application\"\u003eSee the presentation here\u003c/a\u003e\n\n\n## Running petclinic locally\n```\n\tgit clone https://github.com/spring-projects/spring-petclinic.git\n\tcd spring-petclinic\n\tgit checkout springboot\n\t./mvnw spring-boot:run\n```\n\nYou can then access petclinic here: http://localhost:8080/\n\n## In case you find a bug/suggested improvement for Spring Petclinic\nOur issue tracker is available here: https://github.com/spring-projects/spring-petclinic/issues\n\n\n## Database configuration\n\nIn its default configuration, Petclinic uses an in-memory database (HSQLDB) which\ngets populated at startup with data. A similar setup is provided for MySql in case a persistent database configuration is needed.\nNote that whenever the database type is changed, the data-access.properties file needs to be updated and the mysql-connector-java artifact from the pom.xml needs to be uncommented.\n\nYou may start a MySql database with docker:\n\n```\ndocker run -e MYSQL_ROOT_PASSWORD=petclinic -e MYSQL_DATABASE=petclinic -p 3306:3306 mysql:5.7.8\n```\n\n## Working with Petclinic in Eclipse/STS\n\n### prerequisites\nThe following items should be installed in your system:\n* Maven 3 (http://www.sonatype.com/books/mvnref-book/reference/installation.html)\n* git command line tool (https://help.github.com/articles/set-up-git)\n* Eclipse with the m2e plugin (m2e is installed by default when using the STS (http://www.springsource.org/sts) distribution of Eclipse)\n\nNote: when m2e is available, there is an m2 icon in Help -\u003e About dialog.\nIf m2e is not there, just follow the install process here: http://eclipse.org/m2e/download/\n\n\n### Steps:\n\n1) In the command line\n```\ngit clone https://github.com/spring-projects/spring-petclinic.git\n```\n2) Inside Eclipse\n```\nFile -\u003e Import -\u003e Maven -\u003e Existing Maven project\n```\n\n\n## Looking for something in particular?\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth width=\"300px\"\u003eSpring Boot Configuration\u003c/th\u003e\u003cth width=\"300px\"\u003e\u003c/th\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eThe Main Class\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/src/main/java/org/springframework/samples/petclinic/PetClinicApplication.java\"\u003ePetClinicApplication.java\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eProperties Files\u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href=\"/src/main/resources/application.properties\"\u003eapplication.properties\u003c/a\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eCaching\u003c/td\u003e\n    \u003ctd\u003eUse of EhCache \u003ca href=\"/src/main/java/org/springframework/samples/petclinic/config/CacheConfig.java\"\u003eCacheConfig.java\u003c/a\u003e \u003ca href=\"/src/main/resources/ehcache.xml\"\u003eehcache.xml\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eDandelion\u003c/td\u003e\n    \u003ctd\u003eDatatablesFilter, DandelionFilter and DandelionServlet registration \u003ca href=\"/src/main/java/org/springframework/samples/petclinic/config/DandelionConfig.java\"\u003eDandelionConfig.java\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eSpring MVC - XML integration\u003c/td\u003e\n    \u003ctd\u003e\u003ca href=\"/src/main/java/org/springframework/samples/petclinic/config/CustomViewsConfiguration.java\"\u003eCustomViewsConfiguration.java\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth width=\"300px\"\u003eOthers\u003c/th\u003e\u003cth width=\"300px\"\u003eFiles\u003c/th\u003e\n  \u003c/tr\u003e\n \u003ctr\u003e\n    \u003ctd\u003eJSP custom tags\u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href=\"/src/main/webapp/WEB-INF/tags\"\u003eWEB-INF/tags\u003c/a\u003e\n      \u003ca href=\"/src/main/webapp/WEB-INF/jsp/owners/createOrUpdateOwnerForm.jsp\"\u003ecreateOrUpdateOwnerForm.jsp\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eBower\u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href=\"/pom.xml\"\u003ebower-install maven profile declaration inside pom.xml\u003c/a\u003e \u003cbr /\u003e\n      \u003ca href=\"/bower.json\"\u003eJavaScript libraries are defined by the manifest file bower.json\u003c/a\u003e \u003cbr /\u003e\n      \u003ca href=\"/.bowerrc\"\u003eBower configuration using JSON\u003c/a\u003e \u003cbr /\u003e\n      \u003ca href=\"/src/main/resources/spring/mvc-core-config.xml#L30\"\u003eResource mapping in Spring configuration\u003c/a\u003e \u003cbr /\u003e\n      \u003ca href=\"/src/main/webapp/WEB-INF/jsp/fragments/staticFiles.jsp#L12\"\u003esample usage in JSP\u003c/a\u003e\u003c/td\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eDandelion-datatables\u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href=\"/src/main/webapp/WEB-INF/jsp/owners/ownersList.jsp\"\u003eownersList.jsp\u003c/a\u003e\n      \u003ca href=\"/src/main/webapp/WEB-INF/jsp/vets/vetList.jsp\"\u003evetList.jsp\u003c/a\u003e\n      \u003ca href=\"/src/main/webapp/WEB-INF/web.xml\"\u003eweb.xml\u003c/a\u003e\n      \u003ca href=\"/src/main/resources/dandelion/datatables/datatables.properties\"\u003edatatables.properties\u003c/a\u003e\n   \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\n## Interaction with other open source projects\n\nOne of the best parts about working on the Spring Petclinic application is that we have the opportunity to work in direct contact with many Open Source projects. We found some bugs/suggested improvements on various topics such as Spring, Spring Data, Bean Validation and even Eclipse! In many cases, they've been fixed/implemented in just a few days.\nHere is a list of them:\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003cth width=\"300px\"\u003eName\u003c/th\u003e\n    \u003cth width=\"300px\"\u003e Issue \u003c/th\u003e\n  \u003c/tr\u003e\n\n  \u003ctr\u003e\n    \u003ctd\u003eSpring JDBC: simplify usage of NamedParameterJdbcTemplate\u003c/td\u003e\n    \u003ctd\u003e \u003ca href=\"https://jira.springsource.org/browse/SPR-10256\"\u003e SPR-10256\u003c/a\u003e and \u003ca href=\"https://jira.springsource.org/browse/SPR-10257\"\u003e SPR-10257\u003c/a\u003e \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eBean Validation / Hibernate Validator: simplify Maven dependencies and backward compatibility\u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://hibernate.atlassian.net/browse/HV-790\"\u003e HV-790\u003c/a\u003e and \u003ca href=\"https://hibernate.atlassian.net/browse/HV-792\"\u003e HV-792\u003c/a\u003e\n      \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003eSpring Data: provide more flexibility when working with JPQL queries\u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://jira.springsource.org/browse/DATAJPA-292\"\u003e DATAJPA-292\u003c/a\u003e\n      \u003c/td\u003e\n  \u003c/tr\u003e  \n  \u003ctr\u003e\n    \u003ctd\u003eEclipse: validation bug when working with .tag/.tagx files (has only been fixed for Eclipse 4.3 (Kepler)). \u003ca href=\"https://github.com/spring-projects/spring-petclinic/issues/14\"\u003eSee here for more details.\u003c/a\u003e\u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://issuetracker.springsource.com/browse/STS-3294\"\u003e STS-3294\u003c/a\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e    \n\u003c/table\u003e\n\n\n# Contributing\n\nThe [issue tracker](https://github.com/spring-projects/spring-petclinic/issues) is the preferred channel for bug reports, features requests and submitting pull requests.\n\nFor pull requests, editor preferences are available in the [editor config](https://github.com/spring-projects/spring-petclinic/blob/master/.editorconfig) for easy use in common text editors. Read more and download plugins at \u003chttp://editorconfig.org\u003e.\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspring-petclinic%2Fspring-petclinic-reactjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspring-petclinic%2Fspring-petclinic-reactjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspring-petclinic%2Fspring-petclinic-reactjs/lists"}