AstroE-commerce

sanity-astro-club — Astro Ecommerce Template

By jazsouf

An Astro-based template for showcasing and selling digital works, with content managed through Sanity Studio and checkout sessions generated via the Polar API.

Explore the design

Compare the page layouts and mobile experience. Open any screenshot for a closer look.

3 previews
Desktop homepage1 / 3
Desktop captureTop of page

Actual screenshot captured by the server browser.

All pages & views 3

Screenshots show visual appearance; interactive behavior may differ.

Recorded 2026-10-05View source

What stands out

A quick read of the recorded project description.

01

The Astro frontend and Sanity Studio are split into the frontend and studio workspaces, managed together from the root directory

02

Content is maintained through an extensible Sanity Studio rather than hard-coded into pages

03

Integrates the Polar API to generate checkout sessions, supporting a digital works sales flow

04

Provides env.example files describing the secrets and configuration items that need to be filled in

05

The README lists to-dos: the shopping cart feature and TypeScript conversion of scripts are not yet implemented

Template Details

Sanity Astro Club is a website template for showcasing and selling digital works such as illustrations and artworks. It began as an experimental proof of concept by Codrops and Alex Tkachev, and was later extended by Soufiane: an extensible Sanity Studio was added to manage content, and the Polar API was integrated to generate checkout sessions.

The project uses a workspace structure split into frontend (the Astro app) and studio (Sanity Studio), with the root package.json handling workspace configuration. During development, the local Astro server runs on port 4321 and Sanity runs on port 3333; build, preview, lint, and format commands target the two sub-packages separately via pnpm's --filter flag.

Before use, you need to fill in secrets based on env.example in the studio and frontend directories. You must register a Polar account, add products, and create an API key with read and write permissions for checkout_links, checkouts, and products; then put the Polar API key and organization ID into the Sanity Studio secret configuration. The README also mentions that a webhook can be set up to trigger a rebuild when content changes. The frontend can be deployed to any hosting service, while the Studio is deployed to Sanity Cloud after logging in through the Sanity CLI.

The template's to-do list includes a shopping cart feature (based on Astro sessions) and rewriting scripts in TypeScript, indicating that these capabilities are not currently included. Third-party assets such as images and fonts on the demo site must be checked separately under their respective licenses.

AstroE-commerce

Is it right for your project?

Use Cases

  • Building a personal portfolio site that showcases and sells digital works such as illustrations and photography
  • Using Sanity as a content backend to manage work entries and detail page content
  • Integrating the Polar checkout flow to generate purchase links for digital goods
  • Serving as an example project combining Astro and Sanity for learning or further development

Suitable For

  • Independent creators who need to combine content management with digital product sales
  • Developers familiar with or willing to use Astro, Sanity, and pnpm workspaces
  • Users who want to modify and self-host based on MIT-licensed code

Getting started & customization

Use these recorded setup notes alongside the repository instructions for your chosen version.

  1. 1

    Use pnpm install to install dependencies for both the frontend and studio workspaces

  2. 2

    Fill in the required secrets by referring to env.example in the studio and frontend directories

  3. 3

    Register a Polar account and add products, then create an API key with read and write permissions for checkout_links, checkouts, and products

  4. 4

    Put the Polar API key and organization ID into the Sanity Studio secret configuration, and optionally set up a webhook triggered by content changes

  5. 5

    The Studio requires npx sanity login first, then deployment to Sanity Cloud via pnpm --filter=studio run deploy

Read repository instructions

License & source material

Usage conditions & limitations

Free to use · keep license notice

This entry covers the free version under the MIT license in the public repository; the free scope applies to that version's code and does not mean external services or third-party assets are free.

Must comply with when using

  • You may use, modify, commercialize, and distribute this version's code for free.
  • When distributing copies or substantial portions of the code, retain the original author's copyright notice and the complete MIT license notice.
  • The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.

Additional costs & items to verify

  • Demo images, fonts, icons, and other third-party assets must be checked under their respective licenses and cannot be judged solely by the code's MIT license.
  • External services such as domains, hosting, databases, payments, or AI may incur separate charges.
  • Using the checkout/sales functionality requires registering a Polar account, adding products, and creating an API key with read and write permissions for checkout_links, checkouts, and products, which is an external service dependency.
  • The Polar API key and organization ID must be placed in the Sanity Studio secret configuration, otherwise the sales flow will not work.
  • Deploying the Studio requires logging in to a Sanity account, and content management depends on Sanity cloud services.
  • If automatic rebuilds are needed after content changes, a webhook must be configured separately.
  • The shopping cart feature is not yet implemented, and the current template does not include shopping cart capabilities.
  • Scripts have not yet been rewritten in TypeScript, so the current code is not fully TypeScript.
View Original Text Basis

Permission is hereby granted, free of charge

Original License Text

You need to create a [Polar](https://polar.sh) account, add your products and create an API key with read and write access to checkout_links, checkouts and products.

Original README

You need to add your Polar API key and your Polar Organisation ID in the secret tab inside your [Sanity Studio](https://www.sanity.io/manage).

Original README

1. Make sure you're logged in to your Sanity account:

Original README

You can also need to set up a webhook to trigger rebuilds when content changes.

Original README

- [ ] Add cart functionality w/ Astro sessions

Original README

- [ ] Rewrite scripts in Typescript

Original README
https://github.com/jazsouf/sanity-astro-club/blob/main/LICENSEhttps://github.com/jazsouf/sanity-astro-club/blob/main/README.md

Compiled by DeepSeek based on repository license and README ·2026-10-05. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.

Project checks & description sources

Template Information

Source platforms
Astro Themes
Documentation and maintenance reference score
Partly documented · 73 / 100
Technologies
Astro
Website type
E-commerce
How this score is calculated

Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.

What to verify for this project

Repository update recorded
2025-04-29
Screenshot last checked
2026-10-05

A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.

The catalog identifies Astro as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.

Use a selection guide →

How this description was prepared

AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.

Review declaration: [email protected] · 2026-10-05

Inspect the recorded source material

SHA-256: ac9a51250ab6b307315290310b27483cae54c452baccda569a685a97a48650e9

2026-10-05T06:43:21.056Z

Source file / repository
# Sanity Astro Club: A Free Astro Template for Showcasing And Selling Digital Products

Sanity Astro Club is a free Astro template for showcasing artworks or any other digital product.
At first, an experimental proof of concept built by [Codrops](https://www.codrops.com) in collaboration with [Alex Tkachev](https://alextkachev.com/).
[Soufiane](https://soufianee.com) then enhanced the template with the addition of an extendable [Sanity](https://sanity.io/) Studio to handle content and a simple [Polar](https://polar.sh/) API integration for generating checkout sessions.

![Image Title](https://cdn.sanity.io/images/awmb54he/production/f785e514977a6c57e1f9a32dd8e73e8083e1d1dc-2879x1698.png)

[Demo](https://sanity-astro-club.netlify.app/)

## Folder Structure

```plaintext
├── frontend/          # Astro application
├── studio/            # Sanity Studio
└── package.json       # Root workspace configuration
```

## Commands

All commands are run from the root of the project, from a terminal:

| Command                                      | Action                                                                                |
| :------------------------------------------- | :------------------------------------------------------------------------------------ |
| `pnpm install`                               | Installs dependencies for the frontend asn studio workspaces                          |
| `pnpm run dev`                               | Starts local dev server at `localhost:4321` for Astro and `localhost:3333` for Sanity |
| `pnpm --filter=frontend run build`           | Build your Astro production site to `./dist/`                                         |
| `pnpm --filter=frontend run preview`         | Preview your Astro build locally, before deploying                                    |
| `pnpm --filter=frontend run astro ...`       | Run Astro CLI commands like `astro add`, `astro check`                                |
| `pnpm --filter=frontend run astro -- --help` | Get help using the Astro CLI                                                          |
| `pnpm --filter=frontend run lint`            | Lint your Astro code using Biome                                                      |
| `pnpm --filter=frontend run format`          | Format your Astro code using Biome                                                    |
| `pnpm --filter=studio run build`             | Build your studio site to `./dist/`                                                   |
| `pnpm --filter=studio run start`             | Preview your Sanity Studio build locally, before deploying                            |
| `pnpm --filter=studio run deploy`            | Deploy your Sanity Studio on the Sanity Cloud                                         |

## Credits

- Design based on [Alex Tkachev's](https://alextkachev.com/) [Players Club Dribbble shot](https://dribbble.com/shots/25156320-Players-Club-UI-Animation).
- Original Template by [Codrops](https://codrops.com). Checkout the [original article on Codrops](https://tympanus.net/codrops/?p=86632)
- Template extension and Artwork content by [Soufiane](https://soufianee.com)

## Misc

Follow Codrops: [Bluesky](https://bsky.app/profile/codrops.bsky.social), [Facebook](http://www.facebook.com/codrops), [GitHub](https://github.com/codrops), [Instagram](https://www.instagram.com/codropsss/)
Follow Soufiane [Bluesky](https://bsky.app/profile/soufianee.com), [GitHub](https://github.com/jazsouf), [Instagram](https://www.instagram.com/snfejzl/)

## License

[MIT](LICENSE)

Made with :blue_heart: by [Codrops](https://www.codrops.com)
Extended with :yellow_heart: by [Soufiane](https://soufianee.com)

## Deployment and Configuration

### Deploy Frontend

You have the freedom to deploy your app to your hosting provider of choice.

### Deploy Studio

To deploy your Sanity Studio to production:

1. Make sure you're logged in to your Sanity account:

```bash
npx sanity login
```

2. Deploy the studio:

```bash
pnpm --filter=studio run deploy
```

### Configuration

There are <code>env.example</code> files for the studio and frontend folders, with the relevant secrets that need to be filled.
You need to create a [Polar](https://polar.sh) account, add your products and create an API key with read and write access to checkout_links, checkouts and products.
You need to add your Polar API key and your Polar Organisation ID in the secret tab inside your [Sanity Studio](https://www.sanity.io/manage).
You can also need to set up a webhook to trigger rebuilds when content changes.

Contact me via email [[email protected]](mailto:[email protected]) or dm on bluesky if you need anything.

## Next steps

- [ ] Add cart functionality w/ Astro sessions
- [ ] Rewrite scripts in Typescript
Report a correction

Explore similar templates

Compare previews and descriptions within the same stack and category.