Anor is a full-stack e-commerce application inspired by the functionality and design of Uzum, eBay, and Zalando. It uses Golang for the backend, HTMX and _hyperscript with Bootstrap for the frontend, and PostgreSQL, Redis, and Typesense for data storage, caching, and search capabilities.
-
User Authentication:
- Signup
- Signin
- Forgot Password
- Logout
- Google Sign-in
-
Product listing page with categories:
- Sort by:
- Popularity
- Price: Lowest
- Price: Highest
- Highest rated
- New arrivals
- Best sellers
- Filter by:
- Price range
- Brand
- Rating
- Custom attributes (size, color, material, etc.)
- Pagination:
- Page-based navigation
- "Show More" functionality (dynamically adds new product item cards)
- Sort by:
-
Product Details Page:
- Product details display
- Additional product images carousel
- Product reviews and ratings
- Related products section
- Add to cart button
-
Customer Profile Page:
- Display user information
- Order history
- Edit profile functionality
- Change password option
- Address book management
-
Shopping cart functionality
-
Checkout and payment integration
-
Order tracking
-
Recommendation engine for products
-
Coupon and discount functionality
-
User review and rating system
-
Advanced search filters
-
Mobile app version
Before installing the application, ensure you have the following tools installed on your machine:
- Docker/Docker Compose.
- sqlc: For generating type-safe code from SQL.
- goose: For database migrations.
- task: A task runner/simpler Make alternative written in Go.
To get the application running locally, follow these steps:
-
Start necessary services
Ensure you start Postgres, Typesense and Redis using Docker:
task compose-up
-
Run database migrations:
Apply database migrations with goose::
task goose-up
-
Import sample data
Populate the database with the initial dataset:
task import-dataset
-
Start the application
Populate the database with the initial dataset:
export CONFIG_FILEPATH=./config.dev.yaml go run cmd/anor/*.go
Project starts on port 8008 by default.
Adjust additional settings and configurations as needed:
- Configuration Files: Customize
config.dev.yaml
as needed to tweak database connections, service endpoints, and other critical settings.
Coming soon
Here are some of the resources that have been instrumental in the development of this eCommerce platform:
- Official documentations of Go, htmx, _hyperscript, Bootstrap , PostgreSQL, Typesense.
- Standard Package Layout (Medium article): A helpful guide to structuring Go projects effectively.
- WTF Dial: A repository providing insights into organizing project structure, useful for project structuring reference.
- Modelling Products and Variants for E-Commerce: A blog post on database modeling for "products," "product attributes," "SKUs," and "product attribute SKUs" tables in e-commerce applications.
- Sharding & IDs at Instagram: An insightful article discussing the implementation of sharding and ID generation at Instagram.
- Sharding and IDs at Instagram: A Hacker News discussion thread related to the Medium article "Sharding & IDs at Instagram," providing additional insights and perspectives on the topic.
- Optimistic UI Patterns for Improved Perceived Performance.
- Commerce for devs: A publication for developers who want to become experts in ecommerce.
- Optimistic checkouts: Blog post about optimistic checkouts in Ecommerce websites.
Future resources to deepen knowledge and enhance the application:
- Intelligent Sort (I.S.): A New Method for Product Sorting in E-Commerce: (Medium article): A helpful guide to implement the
Popular
sorting algorithm, commonly used as the default sorting method in product listing and search results pages for enhanced relevance.
Contributions to the project are welcome! If you have suggestions or improvements, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes and commit them (
git commit -am 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.
We appreciate your input and look forward to improving the application together!
This project is licensed under the MIT License - see the LICENSE file for details.