{"id":14108515,"url":"https://github.com/sanity-io/sanity-template-angular-clean","last_synced_at":"2025-10-12T11:54:37.443Z","repository":{"id":169851273,"uuid":"636384616","full_name":"sanity-io/sanity-template-angular-clean","owner":"sanity-io","description":"A clean Angular SPA that gets content from Sanity","archived":false,"fork":false,"pushed_at":"2025-06-10T12:38:28.000Z","size":1427,"stargazers_count":11,"open_issues_count":1,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-02T06:56:49.549Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://sanity-template-angular-clean.sanity.build/","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/sanity-io.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-05-04T18:21:07.000Z","updated_at":"2025-07-24T14:37:03.000Z","dependencies_parsed_at":"2023-10-02T18:17:00.968Z","dependency_job_id":"23659f3a-e0e7-4393-86dd-762307cf3537","html_url":"https://github.com/sanity-io/sanity-template-angular-clean","commit_stats":null,"previous_names":["sanity-io/sanity-template-angular-clean"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/sanity-io/sanity-template-angular-clean","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanity-io%2Fsanity-template-angular-clean","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanity-io%2Fsanity-template-angular-clean/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanity-io%2Fsanity-template-angular-clean/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanity-io%2Fsanity-template-angular-clean/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sanity-io","download_url":"https://codeload.github.com/sanity-io/sanity-template-angular-clean/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanity-io%2Fsanity-template-angular-clean/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279011192,"owners_count":26084900,"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-10-12T02:00:06.719Z","response_time":53,"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":[],"created_at":"2024-08-14T10:01:29.274Z","updated_at":"2025-10-12T11:54:37.415Z","avatar_url":"https://github.com/sanity-io.png","language":"TypeScript","funding_links":[],"categories":["Site Templates"],"sub_categories":["Free Templates"],"readme":"# Clean Angular + Sanity app\n\nThis template includes a [Angular](https://angular.dev/) app with a [Sanity Studio](https://www.sanity.io/) – an open-source React application that connects to your Sanity project’s hosted dataset. The Studio is configured locally and can then be deployed for content collaboration.\n\n## Features\n\n- Fetch content seamlessly with [Sanity Content Lake](https://www.sanity.io/docs/datastore).\n- Render beautiful block content using [Portable Text](https://www.sanity.io/docs/presenting-block-text).\n- Manage and create content with the intuitive [Sanity Studio](https://www.sanity.io/docs/sanity-studio).\n- Advanced image cropping and rendering via [Sanity Image URLs](https://www.sanity.io/docs/image-url).\n\n## Demo\n\nhttps://sanity-template-angular-clean.sanity.build\n\n## Getting Started\n\n### Installing the template\n\n#### 1. Initialize template with Sanity CLI\n\nRun the command in your Terminal to initialize this template on your local computer.\n\nSee the documentation if you are [having issues with the CLI](https://www.sanity.io/help/cli-errors).\n\n```shell\nnpm create sanity@latest -- --template sanity-io/sanity-template-angular-clean\n```\n\n#### 2. Copy the project id and dataset to the Angular project\n\nCopy the project id and dataset from the generated `.env` file in the `/studio` directory to the Angular project's environment file.\n\nSpecifically:\n\n1. Open the `/studio/.env` file and note the values for `SANITY_STUDIO_PROJECT_ID` and `SANITY_STUDIO_DATASET`\n2. Create or edit the `/angular-app/.env` file based on the `.env.example` template\n3. Add the following lines with your values:\n\n```\nSANITY_PROJECT_ID=\"your-project-id\"\nSANITY_DATASET=\"your-dataset-name\"\n```\n\n#### 3. Run the application and Sanity Studio\n\nNavigate back to the template's root directory and start the development servers by running the following command\n\n```shell\nnpm run dev\n```\n\n#### 3. Open the app and sign in to the Studio\n\nOpen the Angular app running locally in your browser on [http://localhost:4200](http://localhost:4200).\n\nOpen the Studio running locally in your browser on [http://localhost:3333](http://localhost:3333). You should now see a screen prompting you to log in to the Studio. Use the same service (Google, GitHub, or email) that you used when you logged in to the CLI.\n\n### Adding content with Sanity\n\n#### 1. Publish your first document\n\nThe template comes pre-defined with a schema containing a `Post` document type.\n\nFrom the Studio, click \"+ Create\" and select the `Post` document type. Go ahead and create and publish the document.\n\nYour content should now appear in your Angular app ([http://localhost:4200](http://localhost:4200)).\n\n#### 2. Extending the Sanity schema\n\nThe schema for the `Post` document type is defined in the `studio/src/schemaTypes/post.ts` file. You can [add more document types](https://www.sanity.io/docs/schema-types) to the schema to suit your needs.\n\n### Deploying your application and inviting editors\n\n#### 1. Deploy Sanity Studio\n\nYour Angular frontend (`/angular-app`) and Sanity Studio (`/studio`) are still only running on your local computer. It's time to deploy and get it into the hands of other content editors.\n\nBack in your Studio directory (`/studio`), run the following command to deploy your Sanity Studio.\n\n```shell\nnpx sanity deploy\n```\n\n#### 2. Deploy Angular app to Vercel\n\nYou have the freedom to deploy your Angular app to your hosting provider of choice. With Vercel and GitHub being a popular choice, we'll cover the basics of that approach.\n\n1. Create a GitHub repository from this project. [Learn more](https://docs.github.com/en/migrations/importing-source-code/using-the-command-line-to-import-source-code/adding-locally-hosted-code-to-github).\n2. Create a new Vercel project and connect it to your Github repository.\n3. Set the `Root Directory` to your Angular app.\n4. Configure your Environment Variables.\n\n#### 3. Invite a collaborator\n\nNow that you’ve deployed your Angular application and Sanity Studio, you can optionally invite a collaborator to your Studio. Open up [Manage](https://www.sanity.io/manage), select your project and click \"Invite project members\"\n\nThey will be able to access the deployed Studio, where you can collaborate together on creating content.\n\n## Resources\n\n- [Sanity documentation](https://www.sanity.io/docs)\n- [Angular documentation](https://angular.dev/overview)\n- [Join the Sanity Community](https://slack.sanity.io)\n- [Learn Sanity](https://www.sanity.io/learn)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanity-io%2Fsanity-template-angular-clean","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanity-io%2Fsanity-template-angular-clean","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanity-io%2Fsanity-template-angular-clean/lists"}