{"id":51013966,"url":"https://github.com/spring-petclinic/spring-petclinic-flutter","last_synced_at":"2026-06-21T07:31:39.111Z","repository":{"id":355116928,"uuid":"1226278524","full_name":"spring-petclinic/spring-petclinic-flutter","owner":"spring-petclinic","description":"Flutter frontend for Spring Petclinic, supporting Android and web with the Spring Petclinic REST backend.","archived":false,"fork":false,"pushed_at":"2026-06-08T18:25:20.000Z","size":702,"stargazers_count":5,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-06-08T20:12:05.282Z","etag":null,"topics":["android","cross-platform","dart","flutter","flutter-demo","mobile-app","rest-api","sample","spring","spring-petclinic","web"],"latest_commit_sha":null,"homepage":"","language":"Dart","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":"CONTRIBUTING.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-01T07:30:21.000Z","updated_at":"2026-06-08T18:31:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/spring-petclinic/spring-petclinic-flutter","commit_stats":null,"previous_names":["spring-petclinic/spring-petclinic-flutter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/spring-petclinic/spring-petclinic-flutter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-petclinic%2Fspring-petclinic-flutter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-petclinic%2Fspring-petclinic-flutter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-petclinic%2Fspring-petclinic-flutter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-petclinic%2Fspring-petclinic-flutter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spring-petclinic","download_url":"https://codeload.github.com/spring-petclinic/spring-petclinic-flutter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-petclinic%2Fspring-petclinic-flutter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34601660,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-21T02:00:05.568Z","response_time":54,"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":["android","cross-platform","dart","flutter","flutter-demo","mobile-app","rest-api","sample","spring","spring-petclinic","web"],"created_at":"2026-06-21T07:31:37.910Z","updated_at":"2026-06-21T07:31:39.104Z","avatar_url":"https://github.com/spring-petclinic.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Petclinic Flutter\n\n[![Flutter CI](https://github.com/spring-petclinic/spring-petclinic-flutter/actions/workflows/dart.yml/badge.svg?branch=master)](https://github.com/spring-petclinic/spring-petclinic-flutter/actions/workflows/dart.yml)\n[![OSV Scanner](https://github.com/spring-petclinic/spring-petclinic-flutter/actions/workflows/osv-scanner.yml/badge.svg?branch=master)](https://github.com/spring-petclinic/spring-petclinic-flutter/actions/workflows/osv-scanner.yml)\n[![Semgrep](https://github.com/spring-petclinic/spring-petclinic-flutter/actions/workflows/semgrep.yml/badge.svg?branch=master)](https://github.com/spring-petclinic/spring-petclinic-flutter/actions/workflows/semgrep.yml)\n[![CodeQL](https://github.com/spring-petclinic/spring-petclinic-flutter/actions/workflows/codeql.yml/badge.svg?branch=master)](https://github.com/spring-petclinic/spring-petclinic-flutter/actions/workflows/codeql.yml)\n\nFlutter frontend for [Spring Petclinic](https://github.com/spring-petclinic). This app targets Android and web, mirrors\nthe functional flows of the [Angular frontend](https://github.com/spring-petclinic/spring-petclinic-angular), and uses the same REST backend exposed by \n[spring-petclinic-rest](https://github.com/spring-petclinic/spring-petclinic-rest).\n\nThe CI status includes static analysis, tests, the web build, and the Android debug APK build.\n\n## Table of Contents\n\n- [Screenshots](#screenshots)\n- [Project Structure](#project-structure)\n- [Backend](#backend)\n- [API Configuration](#api-configuration)\n- [Run on Android](#run-on-android)\n- [Run on Web](#run-on-web)\n- [Build](#build)\n- [Validation](#validation)\n- [Contributing](#contributing)\n\n## Screenshots\n\n### Web\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/screenshots/web-owners.png\" width=\"900\" alt=\"Spring Petclinic owners screen on web\" /\u003e\n  \u003cimg src=\"docs/screenshots/web-owners-details.png\" width=\"900\" alt=\"Spring Petclinic owners details screen on web\" /\u003e\n\u003c/p\u003e\n\n### Android\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/screenshots/mobile-home.jpeg\" width=\"260\" alt=\"Spring Petclinic home screen on Android\" /\u003e\n  \u003cimg src=\"docs/screenshots/mobile-owner-details.jpeg\" width=\"260\" alt=\"Spring Petclinic owner details screen on Android\" /\u003e\n\u003c/p\u003e\n\n## Project Structure\n\nThe codebase follows a feature-first package structure under the `lib` directory:\n\n```text\nlib/\n├── features/          # Feature-specific modules (screens, services, models)\n│   ├── home/          # Home screen\n│   ├── owners/        # Owner management (list, details, form)\n│   ├── pets/          # Pet management (form)\n│   ├── pettypes/      # Pet type administration\n│   ├── specialties/   # Vet specialties administration\n│   ├── vets/          # Veterinarians list and forms\n│   └── visits/        # Pet visit registration and history\n├── shared/            # Common and shared components across features\n│   ├── config/        # Global configuration (e.g., API config)\n│   ├── forms/         # Generic form validators and text helpers\n│   ├── navigation/    # App routes and navigation extensions\n│   ├── network/       # HTTP/REST API client and exception handling\n│   ├── theme/         # App color schemes and typography\n│   ├── utils/         # Helper functions and formatting utilities\n│   └── widgets/       # Reusable layout and UI widgets\n└── main.dart          # App entry point\n```\n\n## Backend\n\nStart the backend first:\n\n```bash\ncd ~/spring-petclinic-rest\n./mvnw spring-boot:run\n```\n\nThe expected API is:\n\n```text\nhttp://localhost:9966/petclinic/api\n```\n\n## API configuration\n\nThe app resolves the API base URL in this order:\n\n1. `PETCLINIC_API_BASE_URL` passed with `--dart-define`\n2. Platform default\n\nPlatform defaults:\n\n- Android emulator: `http://10.0.2.2:9966/petclinic/api`\n- Web: `http://localhost:9966/petclinic/api`\n- Other non-Android platforms: `http://localhost:9966/petclinic/api`\n\nThat logic lives in:\n\n```text\nlib/shared/config/api_config.dart\n```\n\nOverride it at runtime when needed:\n\n```bash\nflutter run --dart-define=PETCLINIC_API_BASE_URL=http://\u003chost\u003e:9966/petclinic/api\n```\n\nUse an explicit override when:\n\n- running on a physical Android device;\n- serving the web app against a backend that is not on `localhost`;\n- pointing the app to a shared/staging backend.\n\n## Run on Android\n\nFor an Android emulator:\n\n```bash\ncd ~/spring-petclinic-flutter\nflutter pub get\nflutter run\n```\n\nFor a physical Android device, pass the host machine IP explicitly:\n\n```bash\nflutter run --dart-define=PETCLINIC_API_BASE_URL=http://\u003chost\u003e:9966/petclinic/api\n```\n\n## Run on Web\n\nFor local browser development against the backend running on the same machine:\n\n```bash\ncd ~/spring-petclinic-flutter\nflutter pub get\nflutter run -d chrome\n```\n\nIf the backend is not reachable at `http://localhost:9966/petclinic/api`, pass an override:\n\n```bash\nflutter run -d chrome --dart-define=PETCLINIC_API_BASE_URL=http://\u003chost\u003e:9966/petclinic/api\n```\n\n## Build\n\nBuild an Android debug APK:\n\n```bash\nflutter build apk --debug\n```\n\nBuild the web app:\n\n```bash\nflutter build web\n```\n\n## Validation\n\nTypical checks:\n\n```bash\ndart format --set-exit-if-changed .\nflutter analyze\nflutter test\nflutter build apk --debug\nflutter build web\n```\n\nGitHub Actions also runs dependency vulnerability scanning with OSV Scanner,\nan advisory Semgrep scan, and CodeQL analysis for workflow security.\n\n## Contributing\n\nThe [issue tracker](https://github.com/San-43/spring-petclinic-flutter/issues) is the preferred channel for reporting bugs and proposing new features.\n\nPlease refer to [CONTRIBUTING.md](CONTRIBUTING.md) for detailed contribution guidelines, including the pull request process and contribution workflow.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspring-petclinic%2Fspring-petclinic-flutter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspring-petclinic%2Fspring-petclinic-flutter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspring-petclinic%2Fspring-petclinic-flutter/lists"}