README.md
Astro Vendure storefront
Description
This project attempts to deliever smooth, mobile-friendly e-commerce storefront experiences to customer/end user. It is powered by Vendure - headless commerce framework as backend and leveraging SSR functionalities and partial hydration on client side that Astro gives us.
Due to the instability and serverβs performance, I am switching to SSG for the moment. If youβre interested in SSR version in the main branch, you can check out branch /ssr also in this repository
Features
This project supports common ecommerce flow such as ordering and managing profile.
-
Order flow:
- Add item to cart
- Modify cart
- Add shipping address
- Authorize payment (dummy payment provider for now)
-
Profile management:
- Orders
- Addresses
- Account detail
π Project Structure
Inside of your Astro project, youβll see the following folders and files:
React components
These are responsible for building UI components and interactivities on the client. As they are just React components, you can probably extract and use them anywhere else (in React project, or Nextjs project β¦). It also follows design-guide carefully in order to create modern looking UI. By quickly modifying color primary / typography / spacing system in tailwind-themes.js you are good to go with your brand.
βββ src/
β βββ components/
β β βββ ui
β β β βββ Button
β β β βββ Input
β β β βββ ...
β β βββ icon
β β β βββ ShoppingBag
β β β βββ Search
β β β βββ ...
β β βββ cart
β β β βββ index.jsx
β β β βββ ...
β β βββ checkout
β β β βββ index.jsx
β β β βββ ...
β β βββ product
β β β βββ index.jsx
β β β βββ ...
β β βββ profile
β β β βββ index.jsx
β β β βββ ...
β β βββ login
β β β βββ index.jsx
β β β βββ ...
β β βββ register
β β β βββ index.jsx
β β β βββ ...
Astro components
These are responsible for layout / non-state Astro component rendered at server.
βββ src/
β βββ pages/
β β βββ index.astro
β β βββ login.astro
β β βββ register.astro
β β βββ cart.astro
β β βββ checkout.astro
β β βββ product
β β β βββ [slug].astro
β β βββ collection
β β β βββ [slug].astro
β βββ layouts/
β β βββ base.astro
Api
These are responsible for api logic serving only in server or public for client.
βββ src/
β βββ api/
β β βββ client.js
β β βββ server.js
Future improvements
- Addresses management
- Write test
- β¦
Powered by
- Astro
- Vendure
- React
- TailwindCSS
- β¦
About me
I am Minh from Berlin. Coding and desiging are my jobs π
I hope you find this project useful!
Description
I was able to fix server issue. Hope the SSR live link works as expected π I must say Iβm glad that I found out about Astro. It has huge benefit on working with popular component framework as React, Vue which I donβt find it with 11ty in the past. So building static site that generates a lot of data is definitely suited for Astro. For some use case that requires complex interactivity on client side I think I have to choose between Astro and NextJS. Still some bugs along development but so far so good. Thanks Astro project and community! π