{"id":14986838,"url":"https://github.com/spring-petclinic/spring-petclinic-angular","last_synced_at":"2025-05-15T09:03:13.677Z","repository":{"id":17733028,"uuid":"82604171","full_name":"spring-petclinic/spring-petclinic-angular","owner":"spring-petclinic","description":"Angular 16 version of the Spring Petclinic sample application (frontend)","archived":false,"fork":false,"pushed_at":"2025-04-16T15:27:00.000Z","size":5623,"stargazers_count":213,"open_issues_count":7,"forks_count":511,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-05-15T09:02:20.108Z","etag":null,"topics":["angular","angular-cli","angular16","frontend","hacktoberfest","rest","sample","spring"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/spring-petclinic.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":"2017-02-20T21:24:43.000Z","updated_at":"2025-05-08T02:18:44.000Z","dependencies_parsed_at":"2023-02-18T04:31:32.792Z","dependency_job_id":"18cbd700-82f6-4e66-b65b-4ad01cf2ad8c","html_url":"https://github.com/spring-petclinic/spring-petclinic-angular","commit_stats":{"total_commits":215,"total_committers":13,"mean_commits":16.53846153846154,"dds":0.7395348837209302,"last_synced_commit":"fbe5c5b7e027199285e5ff653d25ee4ff1cde3aa"},"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-angular","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-petclinic%2Fspring-petclinic-angular/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-petclinic%2Fspring-petclinic-angular/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-petclinic%2Fspring-petclinic-angular/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spring-petclinic","download_url":"https://codeload.github.com/spring-petclinic/spring-petclinic-angular/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254310513,"owners_count":22049468,"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":["angular","angular-cli","angular16","frontend","hacktoberfest","rest","sample","spring"],"created_at":"2024-09-24T14:13:39.078Z","updated_at":"2025-05-15T09:03:13.631Z","avatar_url":"https://github.com/spring-petclinic.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Petclinic Angular \n\n[![Build Status](https://github.com/spring-petclinic/spring-petclinic-angular/actions/workflows/angular-ci.yml/badge.svg)](https://github.com/spring-petclinic/spring-petclinic-angular/actions/workflows/angular-ci.yml)\n\n## Angular frontend for Spring Petclinic\n\nWarning: **client only**. \n  Use REST API from backend [spring-petclinic-rest project](https://github.com/spring-petclinic/spring-petclinic-rest)\n  You need start backend server before start frontend application.\n\n## Screenshot\n\n![Screenshot of SPring Petclinic Angular](https://cloud.githubusercontent.com/assets/838318/23263243/f4509c4a-f9dd-11e6-951b-69d0ef72d8bd.png)\n  \n\n## Installation\n\n1. Update angular-cli to latest version (8.0.3 current)\nas described on [angular-cli github readme.md](https://github.com/angular/angular-cli#updating-angular-cli)\n\n````\nnpm uninstall -g angular-cli @angular/cli\nnpm cache clean\nnpm install -g @angular/cli@latest\n````\nClone project from github\n````\ngit clone https://github.com/spring-petclinic/spring-petclinic-angular.git\n````\nInstall local project package\n````\nnpm install --save-dev @angular/cli@latest\nif npm version \u003e 5.0 delete package-lock.json file  ( bug in npm 5.0 - this file prevent correct packages install)\nnpm install\n````\n\nNow project use Angular CLI v.8.0.3 and Angular v.8.0.1\nYou can see current dependencies in [package.json](package.json) file.\n\n## Development server\n\nRun `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.\n\n## Code scaffolding\n\nRun `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|module`.\n\n## Build\n\nRun `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.\n\nYou can also build the application in a dedicated docker image using the provided `Dockerfile` as follows:\n\n```\ndocker build -t spring-petclinic-angular:latest .\n```\n\nThen you will be able to use it as follows:\n\n```\ndocker run --rm -p 8080:8080 spring-petclinic-angular:latest\n```\n\n## Documentation\n\nThe documentation of the Spring Petclinic Angular application is generated by the [compodoc](https://compodoc.app) tool.\n\nDocumentation URL: [https://spring-petclinic.github.io/spring-petclinic-angular/](https://spring-petclinic.github.io/spring-petclinic-angular/)\n\nRegenerate the `docs` folder with [compodoc](https://compodoc.app):\n```\ncompodoc -p src/tsconfig.app.json -d docs\n```\n\n## Deploy on Web servers\n\n### Deploy on Nginx (for Nginx CentOS installation):\n\n1. Build Angular application:\n\n  ng build --prod --base-href=/petclinic/ --deploy-url=/petclinic/\n\n2. Create sub-directory **/petclinic** in default nginx directory **/usr/share/nginx/html**\n\n3. Copy **/dist**  sub-directory from Angular appication to  **/usr/share/nginx/html/petclinic**\n\n4. Edit nginx config (nginx.conf file in /etc/nginx/ directory)\n\n```\nserver {\n\tlisten       80 default_server;\n        root         /usr/share/nginx/html;\n        index index.html;\n\n\tlocation /petclinic/ {\n                alias /usr/share/nginx/html/petclinic/dist/;\n                try_files $uri$args $uri$args/ /petclinic/index.html;\n        }\n}\n```\n\n5. Reload nginx:  **nginx -s reload**\n\n6. Run app in brouser:  http://server_name/petclinic/\n\n### Deploy on Apache (for Apache CentOS installation):\n\n1. Build Angular application:\n\nng build --prod --base-href=/petclinic/ --deploy-url=/petclinic/\n\n2. Create sub-directory **/petclinic** in default Apache directory **/var/www/html**\n\n3. Go into Angular appication **/dist** sub-directory and copy all files and sub-dirs from it to **/var/www/html/petclinic**\n\n4. Edit Apache config (/etc/https/conf/httpd.conf):\n\nsudo vi /etc/httpd/conf/httpd.conf\n\nFind the Directory /var/www/html\u003e section and change the AllowOverride directive from None to All:\n```\n /etc/httpd/conf/httpd.conf\n . . .\n  \u003cDirectory /var/www/html\u003e\n . . .\n # \n # AllowOverride controls what directives may be placed in .htaccess files.\n # It can be \"All\", \"None\", or any combination of the keywords:\n # Options FileInfo AuthConfig Limit\n #\n AllowOverride All\n . . .\n \u003c/Directory\u003e\n . . .\n```\n5. Save and exit the file and then restart Apache to apply the change:\n\nsudo systemctl restart httpd\n\n6. Create a .htaccess file in the directory **/var/www/html/petclinic**\n\nsudo vi /var/www/html/petclinic/.htaccess\n\nAdd the following line to the top of the file to activate the RewriteEngine, which instructs Apache to process any rules that follow:\n```\nRewriteEngine On  \n# If an existing asset or directory is requested go to it as it is\nRewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR]  \nRewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d  \nRewriteRule ^ - [L]\n\n# If the requested resource doesn't exist, use index.html\nRewriteRule ^ index.html  \n```\n7. Reload Apache:\n\nsudo systemctl restart httpd\n\n8. Run app in browser: http://server_name/petclinic/\n\n## Running unit tests\n\nRun `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).\n\n## Running end-to-end tests\n\nRun `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).\nBefore running the tests make sure you are serving the app via `ng serve`.\n\n## Further help\n\nTo get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspring-petclinic%2Fspring-petclinic-angular","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspring-petclinic%2Fspring-petclinic-angular","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspring-petclinic%2Fspring-petclinic-angular/lists"}