{"id":20209425,"url":"https://github.com/googlemaps-samples/js-solar-potential","last_synced_at":"2025-04-04T17:04:07.036Z","repository":{"id":199389168,"uuid":"679404472","full_name":"googlemaps-samples/js-solar-potential","owner":"googlemaps-samples","description":"Source code for the Solar Potential demo using the Solar API from Google Maps Platform","archived":false,"fork":false,"pushed_at":"2025-03-25T15:37:51.000Z","size":449,"stargazers_count":123,"open_issues_count":17,"forks_count":107,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-03-28T16:04:20.935Z","etag":null,"topics":["google-maps","google-maps-platform","solar-api"],"latest_commit_sha":null,"homepage":"https://goo.gle/maps-solar-potential-demo","language":"Svelte","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/googlemaps-samples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2023-08-16T19:03:49.000Z","updated_at":"2025-03-28T01:08:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"2d184bb1-9094-419d-8e48-7aec10996aeb","html_url":"https://github.com/googlemaps-samples/js-solar-potential","commit_stats":null,"previous_names":["googlemaps-samples/js-solar-potential"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlemaps-samples%2Fjs-solar-potential","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlemaps-samples%2Fjs-solar-potential/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlemaps-samples%2Fjs-solar-potential/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/googlemaps-samples%2Fjs-solar-potential/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/googlemaps-samples","download_url":"https://codeload.github.com/googlemaps-samples/js-solar-potential/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247217174,"owners_count":20903008,"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":["google-maps","google-maps-platform","solar-api"],"created_at":"2024-11-14T05:40:01.747Z","updated_at":"2025-04-04T17:04:07.018Z","avatar_url":"https://github.com/googlemaps-samples.png","language":"Svelte","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build](https://github.com/googlemaps-samples/js-solar-potential/actions/workflows/build.yml/badge.svg)](https://github.com/googlemaps-samples/js-solar-potential/actions/workflows/build.yml)\n[![Tests](https://github.com/googlemaps-samples/js-solar-potential/actions/workflows/tests.yml/badge.svg)](https://github.com/googlemaps-samples/js-solar-potential/actions/workflows/tests.yml)\n\n![Contributors](https://img.shields.io/github/contributors/googlemaps-samples/js-solar-potential?color=green)\n[![License](https://img.shields.io/github/license/googlemaps-samples/js-solar-potential?color=blue)][license]\n[![StackOverflow](https://img.shields.io/stackexchange/stackoverflow/t/google-maps?color=orange\u0026label=google-maps\u0026logo=stackoverflow)](https://stackoverflow.com/questions/tagged/google-maps)\n[![Discord](https://img.shields.io/discord/676948200904589322?color=6A7EC2\u0026logo=discord\u0026logoColor=ffffff)][Discord server]\n\n# ☀️ Solar Potential demo\n\n## Description\n\nThis repository provides a sample app demonstrating use of the **[Solar API]**. The Solar API offers many benefits to solar marketplace websites, solar installers, and solar SaaS designers.\n\nThe demo app showcases and displays the information from the Solar API on a map.\n\n## Requirements\n\nTo run the samples, you will need:\n\n- To [sign up with Google Maps Platform]\n- A Google Maps Platform [project] with the **Maps JavaScript and Solar APIs** enabled\n- An [API key] associated with the project above\n- Current version of Node.js and NPM\n\n## Google Maps API key\n\nOnce you have your API key, update the [`.env`](.env) file with your key.\n\n```sh\nVITE_GOOGLE_MAPS_API_KEY=\"YOUR_API_KEY\"\n```\n\n## Running the app\n\nFirst, run `npm install` to install the required dependencies.\n\n### Developer mode\n\nTo start the app in developer mode, this allows hot-reloads.\nThis means that every time you change a file, the app reloads itself automatically.\n\n```sh\n# Run in developer mode.\nnpm run dev\n```\n\n### Production mode\n\nStarting in developer mode enables a lot of useful tools while developing, but for a production version we first need to build the app.\n\n```sh\n# Build the app.\nnpm run build\n\n# Start the app.\nnpm run start\n```\n\n## Deploying to Cloud Run\n\nOne option to deploy your app is with [Cloud Run](https://cloud.google.com/run).\nIt's easy to use and allows us to build and deploy scalable containerized apps written in any language on a fully managed platform.\n\nFor some languages like Node.js, it infers the configuration and can [deploy from source directly](https://cloud.google.com/run/docs/deploying-source-code), without any additional configurations!\nThis uploads your source, builds it with [Cloud Build](https://cloud.google.com/build), deploys it to Cloud Run, and starts the service with `npm run start`.\nAll with a single command.\n\n```sh\n# Choose the Cloud location to deploy the app.\nexport LOCATION=\"us-central1\"\n\n# Build and deploy the app from source.\ngcloud run deploy \"solar-potential\" \\\n  --source=\".\" \\\n  --region=\"$LOCATION\" \\\n  --allow-unauthenticated\n```\n\n## Checking your code\n\nYou can use `npm run check` to do type checking and check for other common issues.\nYou can also use `npm run check:watch` to continuously check your code when you save your changes.\n\nTo check for styling and formatting issues, you can use `npm run lint`.\nTo fix any lint issues, use `npm run format` to automatically format all the code base.\n\n## Tech stack\n\n- [Solar API](https://developers.google.com/maps/documentation/solar/overview): Get solar panel configurations, solar potential, and data layers.\n- [Google Maps](https://developers.google.com/maps/documentation/javascript/overview): Display a custom map with the Google Maps JavaScript API.\n- [Material Desgin 3](https://m3.material.io): Material Design 3 [web components](https://github.com/material-components/material-web#readme).\n- [SvelteKit](https://kit.svelte.dev): Compiler framework to develop declarative reactive web apps with [TypeScript](https://www.typescriptlang.org).\n- [Vite](https://vitejs.dev): Build tool with a fast development experience for modern web projects.\n- [Tailwind](https://tailwindcss.com): CSS framework for design and styling.\n- [ESLint](https://eslint.org): Statically analyze code to quickly find problems.\n- [Prettier](https://prettier.io): Opinionated code formatter.\n\n## Contributing\n\nContributions are welcome and encouraged! If you'd like to contribute, send us a [pull request] and refer to our [code of conduct] and [contributing guide].\n\n## Terms of Service\n\nThis sample uses Google Maps Platform services. Use of Google Maps Platform services through this sample is subject to the Google Maps Platform [Terms of Service].\n\nThis sample is not a Google Maps Platform Core Service. Therefore, the Google Maps Platform Terms of Service (e.g. Technical Support Services, Service Level Agreements, and Deprecation Policy) do not apply to the code in this sample.\n\n## Support\n\nThis sample is offered via an open source [license]. It is not governed by the Google Maps Platform Support [Technical Support Services Guidelines], the [SLA], or the [Deprecation Policy]. However, any Google Maps Platform services used by the sample remain subject to the Google Maps Platform Terms of Service.\n\nIf you find a bug, or have a feature request, please [file an issue] on GitHub. If you would like to get answers to technical questions from other Google Maps Platform developers, ask through one of our [developer community channels]. If you'd like to contribute, please check the [contributing guide].\n\nYou can also discuss this sample on our [Discord server].\n\n[Solar API]: https://developers.google.com/maps/documentation/solar\n[API key]: https://developers.google.com/maps/documentation/solar/get-api-key\n\n[code of conduct]: ?tab=coc-ov-file#readme\n[contributing guide]: CONTRIBUTING\n[Deprecation Policy]: https://cloud.google.com/maps-platform/terms\n[developer community channels]: https://developers.google.com/maps/developer-community\n[Discord server]: https://discord.gg/hYsWbmk\n[file an issue]: https://github.com/googlemaps-samples/js-solar-potential/issues/new/choose\n[license]: LICENSE\n[pull request]: https://github.com/googlemaps-samples/js-solar-potential/compare\n[project]: https://developers.google.com/maps/documentation/solar/cloud-setup#enabling-apis\n[Sign up with Google Maps Platform]: https://console.cloud.google.com/google/maps-apis/start\n[SLA]: https://cloud.google.com/maps-platform/terms/sla\n[Technical Support Services Guidelines]: https://cloud.google.com/maps-platform/terms/tssg\n[Terms of Service]: https://cloud.google.com/maps-platform/terms\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglemaps-samples%2Fjs-solar-potential","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgooglemaps-samples%2Fjs-solar-potential","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglemaps-samples%2Fjs-solar-potential/lists"}