{"id":13552839,"url":"https://github.com/notrab/headless-dropshipping-starter","last_synced_at":"2025-05-15T04:05:04.123Z","repository":{"id":37385458,"uuid":"350874478","full_name":"notrab/headless-dropshipping-starter","owner":"notrab","description":"Create your own dropshipping store with Next.js, Snipcart \u0026 Printful 👕","archived":false,"fork":false,"pushed_at":"2025-05-14T08:38:34.000Z","size":348,"stargazers_count":771,"open_issues_count":19,"forks_count":147,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-05-14T09:46:06.526Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://headlessdropshipping.com","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/notrab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["notrab"]}},"created_at":"2021-03-23T22:26:51.000Z","updated_at":"2025-05-10T07:47:09.000Z","dependencies_parsed_at":"2023-12-16T02:38:07.753Z","dependency_job_id":"8c1c1c22-ae77-44bd-9d3c-041c78887a1a","html_url":"https://github.com/notrab/headless-dropshipping-starter","commit_stats":{"total_commits":86,"total_committers":7,"mean_commits":"12.285714285714286","dds":0.5465116279069768,"last_synced_commit":"fd20d1027878a0d5eb83bbb5160ce309de659591"},"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notrab%2Fheadless-dropshipping-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notrab%2Fheadless-dropshipping-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notrab%2Fheadless-dropshipping-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/notrab%2Fheadless-dropshipping-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/notrab","download_url":"https://codeload.github.com/notrab/headless-dropshipping-starter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254270643,"owners_count":22042859,"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":[],"created_at":"2024-08-01T12:02:11.484Z","updated_at":"2025-05-15T04:04:59.107Z","avatar_url":"https://github.com/notrab.png","language":"TypeScript","funding_links":["https://github.com/sponsors/notrab"],"categories":["TypeScript","Nextjs Templates","E Commerce"],"sub_categories":[],"readme":"# [Swag Boilerplate](https://headlessdropshipping.com)\n\n🧦 Build your own Headless eCommerce storefront with [Next.js](https://nextjs.org/) and [Snipcart](https://snipcart.com/), and deliver swag powered by [Printful](https://printful.com/). End to end commerce, styled using [Tailwind CSS](https://tailwindcss.com/) and deployed on [Vercel](https://vercel.com/).\n\n[Demo](https://demo.headlessdropshipping.com) \u0026middot; [Watch video demo](https://www.youtube.com/watch?v=epcysiCJ3l4) \u0026middot; [Learn more](https://headlessdropshipping.com)\n\n![Headless Dropshipping](https://user-images.githubusercontent.com/950181/116987157-9f3cdc00-acc6-11eb-97ff-b8134edd4b65.png)\n\n## Features\n\n- Realtime shipping prices\n- Secure payments\n- Automatic fulfillment\n- Built with Next.js\n- Cart \u0026 Checkout with Snipcart\n- Styled with Tailwind CSS\n- Fully Typed\n- Recover abandoned carts\n- One click deploy\n- ... and more coming soon!\n\n## Setup\n\nYou'll first need to setup Snipcart \u0026 Printful before you can run the storefront locally, or deploy.\n\n### 1. Setup Printful\n\n\u003cdetails\u003e\n  \u003csummary\u003eLogin or create an account\u003c/summary\u003e\n\nYou can [login](https://www.printful.com/auth/login), or [sign up](https://www.printful.com/auth/register) with Facebook, Google, Apple, and your email.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eCreate a new store\u003c/summary\u003e\n  \n  You'll want to select **Manual order platform / API** from the available methods when [creating a new store](https://www.printful.com/dashboard/store).\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eAdd products to your inventory\u003c/summary\u003e\n  \n  Let's add a product to your store.\n\n1. Select from over 200 hundred products which you would like to sell.\n2. Configure the product design by adding your logo, selecting available colors, and sizes.\n3. Next, proceed to mockups to select the image that will be shown in the storefront. You can select from people wearing your product, to flat wrinkled mockups. **Make sure to select `PNG` as your \"mockup format\" when creating your product.**\n4. Next, proceed to details where you can name your product. This name will be shown in the storefront.\n5. Next, proceed to pricing, and set some prices. Here you'll see the price it costs you, and the retail prices you'll charge your customers. You can quickly increase/decrease the profit margin here too.\n6. **Save product**\n\nThat's it! 🎉 Repeat this step for all products you want to sell.\n\nℹ️ Don't forget, shipping and taxes are extra!\n\nℹ️ You can optionally create a [**Product Template**](https://www.printful.com/dashboard/product-templates) for items you may want to add to additional stores later.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eConfigure selling preferences\u003c/summary\u003e\n  \n  Inside **Settings** \u003e **Stores**, you'll want to configure your default selling preferences. You can specify your selling region. You can opt to sell worldwide, and choose products from a wide variety of products, or you can set a specific region, such as the UK.\n\nDepending on where you sell, you'll be liable to pay (or collect + pay) VAT. If you are VAT registered, provide Printful your VAT ID so orders can reflect a zero VAT amount where applicable.\n\n📺 [Learn more about VAT and Printful](https://www.youtube.com/watch?v=LiqGcE267UA)\n\nℹ️ If you need to collect VAT from customers, make sure to enable the Tax API with Snipcart.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eConfigure shipping preferences\u003c/summary\u003e\n  \n  Inside **Settings** \u003e **Stores** \u003e **Shipping**, you'll want to configure the USA \u0026 Europe settings.\n\nThe defaults should work for most, but you might want to make some adjustments for domestic and international shipping.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eCreate a Printful Private token\u003c/summary\u003e\n  \nInside **Settings** \u003e **Stores** \u003e **API**, click visit [Printful Developers](https://developers.printful.com/login).\n\nFrom here you will want to create a new **Private token**, select the store you want to give this token access to, select the permissions (all), set an expiry and copy the value for use later as `PRINTFUL_API_KEY`.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eAdd a billing method\u003c/summary\u003e\n  \nYou'll want to add a [billing method](https://www.printful.com/dashboard/billing/billing-methods) to Printful so you can fulfill orders.\n\nWhen a customer makes an order, Printful will charge YOU to process the order. 📺 [Learn more how Printful processes payments for order fulfillment](https://www.youtube.com/watch?v=_5lsHL8wji4\u0026t=2s).\n\n\u003c/details\u003e\n\n### 2. Setup Snipcart\n\n\u003cdetails\u003e\n  \u003csummary\u003eLogin or create an account\u003c/summary\u003e\n\nYou'll need to [register](https://app.snipcart.com/register), or [login](https://app.snipcart.com) to Snipcart.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eAPI key\u003c/summary\u003e\n\nHead over to [Account \u003e API Keys](https://app.snipcart.com/dashboard/account/credentials) to get your `Public API Key`. You'll want to switch to **LIVE** mode.\n\nMake a copy of your `Public API Key` for use later. You'll need it when deploying, or running locally.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eConfigure your website domain\u003c/summary\u003e\n\nIt's important you configure your **Default Website Domain** so Snipcart can successfully validate product prices.\n\nYou may also want to add other domains, and subdomains if you're working locally with this.\n\nThe domain you provide here will be your live URL, such as `headlessdropshipping.com`.\n\nYou should also configure a Redirect URL. I have this set to the root domain of my store.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eConfigure webhooks\u003c/summary\u003e\n\nYou'll want to configure the endpoint for webhooks. This webhook will be triggered throughout various stages of the pre, and post purchase stages.\n\nFor example, when a customer places a successful order, this webhook will be triggered, and it will call a function to add the order to Printful.\n\n**The webhook URL you provide here will be your domain appended by `/api/snipcart/webhook`.**\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eEnable shipping\u003c/summary\u003e\n\nUnless you want to cover the cost of all shipping, you should enable Shipping. Below the heading **Custom Shipping**, select **Webhooks**, and **Configure** it.\n\n\\*\\*The endpoint URL you provide here will be your domain appended by `/api/snipcart/shipping`.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eEnable taxes (optional)\u003c/summary\u003e\n\nSimilar to shipping, you can enable custom taxes via a webhook. **You should only enable this if you are VAT registered**. Make sure to inform Printful of your VAT ID.\n\nYou will want to turn on webhooks, and click **Configure**.\n\n\\*\\*The endpoint URL you provide here will be your domain appended by `/api/snipcart/tax`.\n\nThe taxes you must collect are then calculated by Printful.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eConfigure your payment gateway\u003c/summary\u003e\n\nYou should enable **SCA** (Strong Customer Authentication) for purchases.\n\nTo connect a payment gateway, click on **Connect** next to the gateway, such as Stripe.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eConfigure regional settings\u003c/summary\u003e\n\nYou'll want to configure your [regional settings](https://app.snipcart.com/dashboard/settings/regional) for Snipcart. I would match the currency you buy with Printful with what you show on the store here. Printful will return a currency with your variants, this is what is added to the cart. It's important Snipcart knows about this currency, and how to format it in the cart/checkout.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eCreate a recovery campaign\u003c/summary\u003e\n\nYou should [create a new recovery campaign](https://app.snipcart.com/dashboard/campaigns/create) for abandoned carts. You can specify when this should be invoked (on orders above a certain amount), and what email is sent.\n\nYou can include a custom discount to the campaign so you can try to recover lost sales.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eAdd a credit card\u003c/summary\u003e\n\nSee [Snipcart pricing](https://snipcart.com/pricing) and add a credit card to your account. Snipcart has a monthly fee if you are below a certain sales amount.\n\n\u003c/details\u003e\n\nWith Snipcart you can invite multiple users to your account, configure your invoice templates, email templates, and much more. You should do all of this to ensure a great end to end experience for your customers.\n\n### 3. Deploy\n\nYou'll need your `PRINTFUL_API_KEY` and `NEXT_PUBLIC_SNIPCART_API_KEY` to deploy.\n\n\u003ca href=\"https://vercel.com/new/git/external?repository-url=https%3A%2F%2Fgithub.com%2Fnotrab%2Fheadless-dropshipping-starter\u0026env=PRINTFUL_API_KEY,NEXT_PUBLIC_SNIPCART_API_KEY\" target=\"_blank\" rel=\"noopener noreferrer\"\u003e\u003cimg src=\"https://vercel.com/button\" alt=\"Deploy with Vercel\" /\u003e\u003c/a\u003e\n\n## Running locally\n\nCopy the example `env.local` file, and add the necessary ENV variables.\n\n```bash\ncp .env.local.example .env.local\n```\n\nYou'll next want to install the project dependencies, and start the local server:\n\n```bash\nnpm install\nnpm run dev\n```\n\nOpen [http://localhost:3000](http://localhost:3000) to see the storefront locally! 🚀\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotrab%2Fheadless-dropshipping-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnotrab%2Fheadless-dropshipping-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotrab%2Fheadless-dropshipping-starter/lists"}