Credits: Project from Vadim Savin.
The tutorial is available:
- on his website, NotJust.dev
- on his Youtube channel, @notjustdev
It is divided into 4 videos:
- Building a Scalable REST API with NodeJS
- Building an Ecommerce App with React Native, Expo and Gluestack
- Integrate Stripe Payments in Your React Native Ecommerce App
- Build an Ecommerce Admin Dashboard with Next.js
The complete project guide is available here: Complete guide link
I updated some of the dependencies *, added some features, adapted some UI and fixed some bugs.
* The dashboard is NOT updated to NEXT 15 + React 19 because of gluestack-ui
. One of its dependency is not compatible with React 19 yet, I mean react-native-web
.
I hope you'll like the result!
- Fullstack-ecommerce Mobile App
This is a fullstack ecommerce mobile app built with React Native, Expo, and various other technologies. It provides users with a seamless shopping experience, allowing them to browse products, add items to their cart, complete purchases using Stripe payment integration and view their order history. Sellers can also manage their products and orders through a dashboard.
- Authentication: users & sellers can create an account, log in, and log out.
- Authorization: users can access protected screens only after authentication and sellers have a specific role for dashboard access.
- Product Catalog: users can browse a catalog of products and view details about each product.
- Cart Management: users can add products to their cart and proceed to checkout.
- Payment Integration: users can complete purchases using Stripe payment integration in test mode.
- Order Management: users can view their order history, the products included in each order, and the status of each order.
- Dashboard: sellers can create, update, delete products, and manage users orders.
Clone the repository in your favorite IDE as VSCode, IntelliJ IDEA, etc.:
git clone https://github.com/legendapp/fullstack-ecommerce.git
Credits: picture from Vadim Savin
- Node.js: a free, open-source, cross-platform JavaScript runtime environment.
- Express: a fast, unopinionated, minimalist web framework for Node.js.
- Drizzle ORM: a headless TypeScript ORM for Postgres.
- Node Postgres: a relational database management system.
- Zod: a schema validation library.
- Genezio: a cloud deployment platform for serverless functions.
- Go to the api directory:
cd api
- Install the dependencies:
npm install
- Create a
Drizzle ORM
account and create aPostgres database
according to the instructions given in the API video. 📍Note: to openDrizzle Studio
via Chrome on Windows 11, installmkcert
and generate a locally signed SSL certificate - Create an
.env
file in theapi
directory where you will define the following environment variables:DATABASE_URL
: your Postgres database URLJWT_SECRET
: a secret key for JWT authenticationSTRIPE_PUBLISHABLE_KEY
: your Stripe publishable key from test modeSTRIPE_SECRET_KEY
: your Stripe secret key from test modeSTRIPE_WEBHOOK_SECRET
: your Stripe webhook secret keyPORT
: the port number for the API serverNODE_ENV=dev
for development only
- Start the API server:
npm run dev
. The API server will start athttp://localhost:3000
- Follow the API video until the end.
- Go to the root of the project, create the
genezio.yaml
file - in the terminal, run
genezio deploy
Credits: picture from Vadim Savin
- React Native: a JavaScript framework for building mobile applications.
- Expo: a framework for building React Native applications.
- Expo Router: a routing library for React Native applications.
- Expo EAS development build: a cloud development build for Expo applications.
- TypeScript: a strongly typed programming language that extends JavaScript.
- Nativewind: a utility-first CSS framework - Tailwind for React Native.
- Gluestack-UI: a component library for React Native.
- TanStack Query: makes fetching, caching, synchronizing and updating server state in your web applications a breeze.
- Zustand: a state management library for React for the local cart store.
- Stripe: a payment processing platform.
-
Go to the ecommerce-mobile directory:
cd ecommerce-mobile
-
Install the dependencies:
npm install
-
Create an
.env
file in theecommerce-mobile
directory where you will define the following environment variables:NEXT_PUBLIC_API_URL
: the URL of the deployed Genezio API server to avoid launching the API server locally
-
create an EAS development build: see the EAS documentation
-
Install the apk on your physical device or a simulator and run:
npm run start
📍Note: if you are on a physical Android device, the Stripe payment sheet, in Test Mode, will open correctly only using an EAS development build or an Android simulator. There is no compatibility with Expo Go.
-
Test the Stripe payment sheet with:
- Stripe Payment Intent - Succeed
- number:
4242 4242 4242 4242
- date: after the current day, e.g.
02/2030
- CVC: any, e.g.
123
- number:
- Stripe Payment Intent - Failed
- number:
4000 0000 0000 9995
- date: after the current day, e.g.
02/2030
- CVC: any, e.g.
123
- number:
- Stripe Payment Intent - Succeed
-
development mode:
- create an EAS development build and
- install the apk on a physical device or a simulator.
-
live mode:
- for IOS, create an Apple App Store developer account and follow the guide
- for Android, create an Android Playstore developer account and follow the guide
- Nextjs: a framework for building web applications.
- TanStack Query: makes fetching, caching, synchronizing and updating server state in your web applications a breeze.
- Zustand: a state management library for React for the local cart store.
- Genezio: a cloud deployment platform for serverless functions.
📍Note for Windows Developers: No support for Windows + NEXTJS ISR
📍Solution: develop with the same configuration as mine, a Windows 11 + WSL2 + Ubuntu 22.04 LTS + Node 22.13.0 LTS + npm 11.0.0
environment.
- Go to the dashboard directory:
cd dashboard
- Install the dependencies:
npm install
- Create an
.env
file in thedashboard
directory where you will define the following environment variables:NEXT_PUBLIC_API_URL
: the URL of the deployed Genezio API serverJWT_SECRET
: the secret key for JWT authentication, same as the one in your API.env
variables
- Start the development server:
npm run dev
- Follow the tutorial until the end.
- Once you have signed up, go to the Genezio dashboard, find the database, find the menu
view data
with a right-click on the three dots on the right, and then find theusers table
and update its role toseller
.
- create the
genezio.yaml
file at the root of the dashboard project, - in the terminal, run
genezio deploy
📍Note: as Genezio does not support NEXTJS Instant Server Regeneration, updating the Product List after a product is created requires a genezio deploy