Home
Softono

Ecommerce Fastapi Stripe

Open source MIT HTML
101
Stars
31
Forks
2
Issues
3
Watchers
1 year
Last Commit

 About Ecommerce Fastapi Stripe

ecommerce-fastapi-stripe is an open-source mini eCommerce starter kit built with FastAPI and Stripe. It enables developers to launch a fully functional online store without a database by loading product data directly from JSON files stored in the templates directory. The application features a clean, styled user interface and integrates Stripe for secure payment processing, allowing users to purchase items and manage transactions seamlessly. Key features include a simple setup process via Docker or manual Python virtual environment installation, dynamic product generation by adding JSON files and corresponding media assets, and customizable pricing and currency settings. The software serves as an ideal foundation for developers learning FastAPI, prototyping payment workflows, or creating lightweight e-commerce solutions with minimal configuration overhead. It supports easy expansion by allowing users to add new products through a straightforward JSON structure and image placement in static directories. While

Platforms

Web Self-hosted

Languages

HTML

Need Help Installing Ecommerce Fastapi Stripe?

We provide expert installation service for this software. Our team will install, configure, and secure Ecommerce Fastapi Stripe on your server. plans start at just $30.

Ecommerce Fastapi Stripe

View on GitHub

FastAPI & Stripe Mini eCommerce

Open-source eCommerce Starter that loads the products from JSON files saved in the templates directory (no database required) and uses a decent UI for page styling - Powered by FastAPI & Stripe.


Quick Start in Docker

👉 Step 1 - Download the code from the GH repository (using GIT)

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

👉 Step 2 - Start the APP in Docker

$ docker-compose up --build 

Visit http://localhost:5085 in your browser. The app should be up & running.


✨ Manual Build

The process is basically the usual set up for any Python app: environment set up, dependencies install, and bootstrap.


👉 Step 1 - Download the code from the GH repository (using GIT)

$ 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

  • Edit STRIPE_SECRET_KEY - provided by Stripe Platform
  • Edit STRIPE_PUBLISHABLE_KEY - provided by Stripe Platform

👉 Step 3 - Install dependencies

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

👉 Step 4 - Start the App

$ uvicorn src.app:app --reload

Visit http://localhost:8000 in your browser. For another port, use --port 8099 directive.


✨ Create a new Product

  • Go to src/templates/products directory
  • Create a new JSON file with data:
    • name: Used in product page & Cards
    • price: Used for payment
    • currency: Used for payment
    • info: used in cards
    • short_description: used in product page
    • full_description: used in product page
  • Create Media Files
    • Go to src/static/products
    • Create a directory using the same name as for JSON file
      • Create card.jpg: 500x335px
      • Create cover.jpg: 2100x1400px
  • Start or refresh the app
    • The new product should be listed in the products/ page
    • Product page is available at address:
      • http://localhost:8000/products/<SLUG>/ where the SLUG is the name of the JSON file

Sample product page generated for Air ZOOM Pegasus, assets loaded from here


Need More? Go PRO with Rocket eCommerce

Production-ready eCommerce CMS integrated with Stripe, Analytics, Discounts Page, Docker and CI/CD support - Actively supported by App-Generator.

Status Item info
Stack Django, Tailwind, React
Payments Stripe
Categories YES
Tags YES
Checkout YES
Discounts Page YES
Products Import Stripe
Products Local Customization YES
Analytics Weekly, Monthly, Year Sales
Transactions Tracking YES
Docker YES
CI/CD Render

Rocket eCommerce - Production-ready eCommerce CMS integrated with Stripe, Analytics, Discounts Page, Docker and CI/CD support.



FastAPI & Stripe Mini eCommerce - Open-source eCommerce Starter provided by App-Generator.