
Build an e-commerce platform with a Python FastAPI back-end and Nest front-end, enabling user accounts, cart, checkout, reviews, order notifications, admin product analytics, and delivery status updates.
Learn user flows by logging in, updating profile and address, changing profile picture, viewing orders, writing reviews, managing the cart, and performing password reset or account creation.
See sign-up and login flows, product updates, cart and checkout, Stripe payments, order tracking, reviews, and email notifications across admin, delivery, and customer roles.
Trigger paid orders to send email alerts to the delivery team, assign a driver, and update status from shipped to delivered, while reviewing orders, items, and customer feedback.
Navigate the admin panel and user flow to manage products, categories, stock, and orders with analytics, and email updates to customers when status changes.
Preview a UI design in Figman, covering login, forgot and reset password, home, category, products, user profile, and admin and delivery dashboards, with backend-first and frontend-first development guidance.
Demonstrates the forgot and reset password flow, including sending a reset code to email, entering the code, and setting a new password, with a profile password change option.
Design a comprehensive database blueprint featuring users, category, product, order, order items, cart, notification, payment, review, and reset tables, and outline the front-end to back-end flow with an authentication module.
Verify Python 3 is installed and install uv, then review the FastAPI documentation to prepare for building the backend with FastAPI and the frontend with NestJS.
Create a public GitHub repository for the FastAPI e-commerce nest backend, clone via SSH, add a README and Python gitignore, then initialize a uv project named shop is.
Open visual studio code for the fastapi commerce nest package and review main.py and pyproject.toml. Identify dependencies like fastapi, uvicorn, orm, alembic, json web token, passlib-2, smtp, and jinja2.
Add and configure dependencies for a FastAPI backend to load .env, validate emails, enable Stripe payments, support multi-part uploads, and integrate AWS S3 with Roboto 3 and Google Auth 2.
Structure a Python FastAPI project by organizing an app with folders api, core, db, model, schema, services, and templates, each a package with __init__.py. Create a .env at the root for sensitive data and add a main.py to reference the app.
Set up Visual Studio Code with the Python extension, pylons, and the black formatter, plus the Learn with Summit theme and material icon theme to customize indentation and folder icons.
Build your first fastapi api by creating an api router with health and hi endpoints in main.py and running it with uvicorn. Gemini ai speeds development.
Continue building the FastAPI backend by wiring the API router, creating the app, and configuring middleware for cross-origin access; run with uvicorn and expose /api endpoints like health and hi.
Create and connect to Postgres and MySQL databases, define database URLs in .env with postgresql+asyncpg and mysql+asyncmy, and test local connections before using the pedantic library to load .env.
Configure a FastAPI and Next.js app by building a config.py with a settings class, loading .env via pedantic settings, and exposing project, front-end URL, back-end URL, and database URL.
Create and manage an asynchronous database session with createAsyncEngine and session maker, include a lifespan startup test in main.py to verify DB connectivity using settings from .env.
Fix the issues in the .env file and db configuration by passing settings.databaseURL to create the engine, yield the dependency in main.py, and test connections to MySQL and PostgreSQL databases.
Define a user model with SQL model, map to the users table, and run migrations to create it; include id, email, password, name, profile picture, address, role, and created_at.
Define the user model with one-to-many relationships to orders, reviews, and a cart, using back_populate in sqlmodel to enable fastapi data relationships.
Create a category model in category.py using SQLModel, mapping to the categories table with id, name, optional description, and a products relationship with cascade and back_populates to the Product model.
Define the product model with id, name, description, price, stock, image url, created at, and a category reference; enable relations to category, order items, and reviews.
Define the order model in Python FastAPI. Implement order status enum with pending, processing, ship, delivered, cancelled, decimal total price defaulting to 0, and relations to user, payment, and items.
Define the order item model in order_item.py, with quantity, unit price, isReviewed, and references to orders and products, and set up order items and products feeds and relationships.
Design a cart and cart item model linked to the user, enforce order status workflow from pending to processing, shipped, delivered, or canceled, and set default item quantity to one.
Define a Python notification model with id, recipient email, title, message, and a notification type enum (welcome, order update, payment update, promotional, security) defaulting to order update, and created_at timestamp.
Define a payment model with a payment status enum (pending, completed, failed, refunded) and a payments table including amount, currency (default USD), and a provider transaction id from Stripe.
Build a review model with rating and comment fields, track user and product via foreign keys, and define product and user relationships for reviews in a FastAPI app.
Define a reset code model for password resets, with fields email (string), code (unique), created_at, and expires_at, stored in the reset_codes table and set to expire five hours after creation.
Add an optional image URL field to the product with a default to none, and clean up code by removing unused inputs and tightening imports, then proceed with schema classes.
Create a user schema as a DTO to receive and return user data, with password excluded. Configure model for camel case and support snake or camel input using elast generator.
Define and update user schemas and DTOs for login, token data, and password updates, forgot password requests and reset password requests, using SQL models with camel or snake case config.
Create and manage category data with CategoryCreate, CategoryUpdate, and CategoryRead schemas, using optional descriptions and required IDs, and apply config.dic exclude_none to omit null fields.
Define a prodot schema with read and detail responses for an e-commerce app, including id, name, description, price, stock, category id, image url, and reviews, with alias generation and updates.
Demonstrate why a base model fits schemas better than an sql model. Implement order and order item schemas with a checkout request and order read, using validators and computed subtotal.
Define a cat schema where a cat has cat items containing products, and implement CatRead, CatItemRead, and an add-to-cat schema with product ID and quantity.
Create a notification schema by adding notification.py, define NotificationRead extending the base model, include id, email, and a notification type of NotificationType, and import it into the app.
Define a payments schema in payments.py with a checkout session request that accepts an order_id on checkout. Return a CheckoutSessionResponse with an auto-redirected checkout URL and a tracking session ID.
Design and implement the review schema in review.py, enabling creation of reviews with id, rating between one and five, and comments, and returning a response with status, message, and data.
build a generic api response class using a type variable and data of type t, with status and message, and configure exclude_none to omit null fields in the response.
This lecture guides migrating models to database tables using Alembic, including initializing migrations, configuring env.py, importing models, and running the initial migration to create tables in Postgres or MySQL.
Register all models in the model folder init.py, then run alembic migrations, fix import and configuration errors, define dbURL, and upgrade head to persist tables.
Develop a custom FastAPI exception system with an API exception class, a default 400 status, and a general 500 handler, including a Stripe error handler and JSON responses.
Implement a JWT security service to generate and decode tokens using HS256, with a 30-day expiry and secret key from .env, and handle expiration and invalid tokens with API exceptions.
Fix the JWT algorithm handling by decoding with a list of algorithms and encoding with a single algorithm, clarifying singular versus plural usage to ensure the method works.
Enable two-factor authentication and generate a Gmail app password, then configure your .env with smtp.gmail.com, port 587, and mail user and password to enable email sending.
Configure SMTP settings and email variables, create templates for welcome, password reset, payment status, and order updates, and render HTML emails in Python to enable the email service.
Build an email service that loads and renders welcome templates with jinja2, then sends emails via asio-smtp using mailhost, port, user, and password.
Register a new user by hashing the password, verifying email uniqueness, saving to the database with name and role, and sending a welcome email via the email service.
Create an auth module with a /auth router and a POST /register endpoint that uses a user service and a DB session to return a 201 created user.
Test the registration API with Postman by creating an auth collection and a register request, sending a JSON body with email, name, password, and optional role.
Implement user login by fetching the user, verifying the password with a hash, and generating a JWT access token containing the user id and role for subsequent requests.
Perform login api testing for a FastAPI and Next.js ecommerce app, validate /login with email and password, handle 400 errors and bearer tokens, plan forgot and reset password.
implement a forgot password flow: verify the user by email, generate and persist a unique reset code, build a reset URL, and send a templated reset email to the user.
create a forgot password API endpoint in the auth module using a POST request, validating email, processing password reset flow, testing with Postman, and handling SMTP errors with API exceptions.
Implement a password reset flow by validating the reset code, checking expiry within five hours, hashing the new password, cleaning up the code, and exposing a post api endpoint.
test the password reset api with postman by sending the reset code and new password to the reset route, validate invalid codes, and confirm a successful reset and login.
Extract the current logged-in user from the token by decoding the access token, obtaining the user id from sub, querying the database, and returning errors if not found or inactive.
Validate admin and delivery users by extracting the current user from the token with getCurrentUser and enforcing roles via getCurrentAdmin and delivery, raising a forbidden API exception when unauthorized.
Learn to implement a user service with methods to fetch all users by latest, update profiles, and securely change passwords by verifying the old password and hashing the new one.
Implement user API endpoints in FastAPI to manage profiles, fetch all users (admin only), and update or change passwords. Build routes under /users and /me with proper dependencies and responses.
Test the user API with postman by logging in to obtain a token and accessing /users/me, register users, test admin vs. user access, update profile, and change password via json.
Learn to build a profile picture upload service with FastAPI, save images to the backend or cloud storage, generate unique filenames, and update the user profile with the image path.
Create a post endpoint /upload-avatar to upload a profile picture (avatar) for the authenticated user, returning the image URL and 201 created after saving the file path.
Test and debug the profile picture upload api using Postman, form data, and authorization, handling file uploads to the avatar endpoint and logging steps for reliability.
Learn how to upload an image to AWS using Boto3, create an IAM user with S3 access, and configure a public S3 bucket with a bucket policy.
Register the AWS config with the access key, secret key, and bucket name. Create an S3 client and upload files to S3 with a unique name, returning the URL.
Test s3 upload functionality in the fastapi app by switching to the upload to s3 handler, uploading profile pictures, and verifying public access via bucket policy.
Master Full-Stack E-Commerce: FastAPI, Next.js, Payment & AWS CI/CD
Are you ready to build a real-world, enterprise-grade application from scratch? Welcome to the ultimate project-based course where you will code, secure, and deploy a complete production-ready e-commerce platform using today's most in-demand technologies: Python FastAPI, Next.js, Stripe, and AWS.
This is not a theoretical course. You will build a robust marketplace featuring a multi-role system with dedicated dashboards for Admins, Customers, and Delivery Personnel. From the moment a customer places an order to the final delivery step, you will implement real-time inventory tracking, multi-role access controls, automated transactional emails, and secure payment workflows.
What You Will Build and Master
Advanced Authentication & Authorization: Implement secure user management using JWT tokens (pyjwt), secure password hashing via Argon2 (pwdlib), OAuth/social logins with Authlib, and robust validation using Pydantic Settings.
Modern Multi-Role Infrastructure: Design complex business logic separating access and functionality across Admin dashboards, Delivery portals, and Customer profiles.
Dual Database Support & Async ORM: Learn how to switch or migrate seamlessly between PostgreSQL (asyncpg) and MySQL (asyncmy) utilizing SQLModel and manage production database migrations effortlessly with Alembic.
Secure Stripe Payment Integration: Process real-world checkouts and secure webhooks safely on the backend using the official Stripe Python SDK.
Automated Communication & Cloud Storage: Send automated transactional emails using Jinja2 templates via async SMTP protocols (aiosmtplib), and manage secure media uploads directly to AWS S3 using Boto3.
DevOps & Enterprise Deployment: Take your code to the cloud. Set up a complete AWS CI/CD auto-deployment pipeline to ensure every code change automatically tests, builds, and deploys securely to production.
The Professional Python Tech Stack Covered
Every dependency taught in this course mirrors true modern production ecosystems:
Backend Framework: FastAPI & Uvicorn ASGI server for lightning-fast performance.
Data Layer: SQLModel, Alembic, PostgreSQL, and MySQL drivers.
Security & Auth: Authlib, PyJWT, Python-Multipart, and pwdlib (Argon2).
Cloud & Operations: Boto3 (AWS S3) and automated GitHub/AWS CI/CD pipelines.
Integrations: Stripe Payment Gateway, Aiosmtplib for async emails, and HTTPX for async external API calls.
Who is this course for?
Python developers looking to bridge the gap into full-stack architecture.
Frontend developers wanting to master highly performant backend design with FastAPI.
Anyone wanting a massive, production-grade project to stand out on their portfolio or resume.
Stop building basic todo apps. Enroll today, level up your engineering skills, and deploy a full-scale e-commerce system that handles true business logic from order to delivery!