FastAPI & Stripe - Free eCommerce Starter
Tags: webdev, fastapi, stripe, ecommerce
Published: 2022-10-27 17:30:45

---
title: FastAPI & Stripe - Free eCommerce Starter
published: true
description: Open-source eCommerce project that loads the products from JSON files - Powered by FastAPI, Stripe, and Bootstrap 5.
tags: webdev, fastapi, stripe, ecommerce
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w2rl3gaatkhv8fbn1i0o.jpg
canonical_url: https://blog.appseed.us/fastapi-stripe-free-ecommerce/
---
Hello Coders! 

This article presents an open-source **Mini eCommerce** project that uses [Stripe for payments and FastAPI](https://blog.appseed.us/fastapi-stripe-free-ecommerce/) as the backend. The eCommerce section content is loaded from JSON and the information is managed by a simple routing logic. The source code can be found on GitHub under the MIT License (free for commercial or eLearning activities). *Thanks for reading!*

- 👉 [FastAPI & Stripe eCommerce](https://github.com/app-generator/ecommerce-fastapi-stripe) - source code
- 👉 [FastAPI & Stripe eCommerce](https://www.youtube.com/watch?v=5kCE41duksk) - YouTube presentation

Another useful feature of this project is the **Bootstrap 5** design, provided by `Creative-Tim`. [Soft UI Design](https://www.creative-tim.com/product/soft-ui-design-system?AFFILIATE=128200), the UI Kit used to style the pages, comes with 50+ components and reusable widgets for at least a decent **eCommerce** project.

![FastAPI & Stripe eCommerce - Animated Presentation.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3zmghfde1zgs4t8untuj.gif)

---

## ✨ How to use it

The fastest way to start the product and play around with the codebase is to access the repository and follow the build instructions presented on the README file.

---

> 👉 **Step #1** - Clone the project from the [public repository](https://github.com/app-generator/ecommerce-fastapi-stripe):

```bash
$ git clone https://github.com/app-generator/ecommerce-fastapi-stripe.git
$ cd ecommerce-fastapi-stripe
```

---

> 👉 **Step #2** - Rename `env.sample` to `.env` and provide the Stripe Secrets

```env
# Stripe Secrets
STRIPE_PUBLISHABLE_KEY=pk_test_PUBLIC_KEY_HERE
STRIPE_SECRET_KEY=pk_test_SECRET_KEY_HERE
```

---

> 👉 **Step #3** - Install modules inside a virtual environment

```bash
$ virtualenv env
$ source env/bin/activate
$ pip install -r requirements.txt
```

---

> 👉 **Step #4** - Start the app

```bash
$ uvicorn src.app:app --reload
```

The above command will start the project using the port `8000` 

![FastAPI & Stripe eCommerce - HOMEpage (free product)](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/su56n2lkx5rgczgw6knz.png)

---

The above setup is also explained in a video material published on YouTube.

{% embed https://www.youtube.com/watch?v=5kCE41duksk %}

---

> `Thanks for reading!` For more resources and support, please access:

- 🚀 Free [support](https://appseed.us/support/) provided by AppSeed (email & Discord)
- 👉 [Flask & Stripe eCommerce](https://blog.appseed.us/flask-stripe-open-source-mini-ecommerce/) - the Flask version (also free)
- 👉 [Django & Stripe eCommerce](https://blog.appseed.us/django-stripe-mini-ecommerce/) - open-source starter