An e-commerce website for beverages
Version: v1.0.0-alpha
Author: Nguyen Hoang Long
Email: nhlong2706@gmail.com
View Demo
·
Report Bug
·
Request Feature
Official website: https://ecommerce-nhlong.vercel.app
Table of Contents
I'm captivated by the intricacies of e-commerce site architecture, especially when executed through a headless CMS approach. My primary focus is on crafting personalized solutions, which includes the development of dedicated order and stock management services. My goal is to establish a self-sustaining ecosystem where reliable Saas solutions like Stripe's checkout and webhook integration handle payment processing.
In terms of data management, my strategy involves web scraping from websites, a method I find particularly effective, especially for dynamic data sources linked to companies like PepsiCo. However, due to the data's volatility, I'm committed to setting up a scheduled cron job that fetches new information and efficiently channels it into Kafka topics.
To ensure data consistency and provide real-time updates, I plan to employ a separate service that consumes data from Kafka and seamlessly updates the MongoDB database. This approach keeps the backend robust and consistently up-to-date, resulting in a seamless experience for users and streamlined operations for the e-commerce platform.
June - July 2023
- User signs up/ signs in with credentials / signs in with Google provider
- User edits profile information
- User browses product catalogue, searches for product by keyword, filter options (category, brand, price range, sort by best rated, most reviewed)
- User views product details: images, description, price, in stock, etc.
- User adds products to cart
- User checkouts
- User pays for their order
- User views order history and payment details
- User leaves reviews for products
- Client: Next/TS + Tailwind (shadcn), Redux
- Server: JWT-based Next-Auth, Next api + graphql (zod), prisma/PostgreSQL, mongoose/MongoDB, Redis, Kafka pub/sub service + cron job
- Services: Stripe checkout, webhook
- Deployment: Vercel, Railway.app, AWS S3
- Find data source to populate the Product collection in MongoDB
- Clone the repo.
git clone https://github.com/nhlong27/ecommerce
- Install NPM packages
npm i
- Add env variables. Point MONGO_URL to your own MongoDB data source. As for Stripe webhook integration, consider reading https://stripe.com/docs/webhooks
NEXT_PUBLIC_SERVER NEXT_PUBLIC_DATA_SOURCE (beginning of product image uri) NEXT_PUBLIC_S3_BUCKET GOOGLE_ID GOOGLE_SECRET NEXTAUTH_SECRET DATABASE_URL (postgresql) MONGO_URL REDIS_URL STRIPE_SECRET_KEY NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY STRIPE_WEBHOOK_SECRET AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_BUCKET_NAME
If you have any troubles please either create an issue or email me. Or message me here: (link to be added)
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
See the open issues for a full list of proposed features (and known issues).