diff --git a/CONTRIBUTE.en.md b/CONTRIBUTE.en.md new file mode 100644 index 000000000..b357a1c68 --- /dev/null +++ b/CONTRIBUTE.en.md @@ -0,0 +1,106 @@ +# Contribution Guidelines + +Contributions of all kinds are welcome, including: + +- Reporting bugs through Issues. +- Discussing business requirements or technical topics through Issues. +- Submitting Pull Requests. +- Providing feedback or improvements to the documentation. +- Any other meaningful contribution to the project. + +Our development resources are limited, so we welcome everyone who would like to contribute and develop the project together. + +The project's basic architecture has already been established, but it is not yet complete. We therefore encourage discussions about both technical and business aspects. + +Before starting any collaboration, however, please take a moment to read the following thoughts. + +## Project Philosophy + +litemall is designed for small and medium-sized businesses rather than large internet companies. Therefore, its development philosophy focuses on being **small yet well-designed**. + +- **Small** means simple technologies, a simple architecture, modest performance requirements, and business functionality that covers only the essential features. +- **Well-designed** means modern technologies, a clear and extensible architecture, a reasonable level of security, and business functionality that can be deployed and used directly. + +For these reasons, the current litemall architecture is intentionally simple, and all three technology stacks use their basic features. + +Despite this simplicity, the project has a relatively high learning curve: + +- The project uses three technology stacks, each of which is relatively independent. +- The Spring Boot and vue-element-admin frameworks already depend on a considerable number of libraries. +- In addition to development technologies, the development process involves other areas such as environment configuration, version control, testing, logging, and deployment. + +Therefore, before contributing new code or discussing business features, please consider the following questions: + +### 1. Does the contribution introduce unnecessary complexity without providing corresponding benefits? + +Since this project aims to be accessible to as many learners and users as possible, complexity is an important consideration. + +If the complexity introduced is equal to or greater than the benefits it provides, whether the contribution should be accepted deserves further discussion. + +### 2. Does the contribution introduce too many dependencies? Is each dependency really necessary? + +If only a small part of a library is needed, could it be implemented through a simple utility class instead? + +For example, some frameworks use Fastjson, while Spring Boot already uses Jackson by default. Unless there is a specific reason to use another library, contributors should prefer Jackson whenever possible. + +### 3. Does the contribution blindly introduce too many advanced technologies? Can their adoption be postponed? + +We encourage a cautious approach. + +For example, introducing a caching solution requires learning the relevant libraries and dealing with potential issues that may arise during implementation. + +Before version 2.0.0, there is generally no need to focus on performance optimization prematurely. + +Similarly, Single Sign-On (SSO) is an essential feature in distributed architectures. However, the two backend services can currently use their own independent authentication mechanisms. + +**Note:** + +> This does not mean that new technologies are discouraged. Instead, we prefer a gradual and cautious approach to adopting them. +> +> In addition, the plan for adopting new technologies is to develop a separate distributed version based on a stable release of this project. + +### 4. Is there already a technology serving the same purpose? Is introducing another alternative necessary? + +We welcome such contributions. + +For example, although the project already provides an admin dashboard built with Vue.js, an alternative admin dashboard using another frontend framework is also welcome. + +This allows users with different technical backgrounds to choose their preferred technology. However, different versions should remain as synchronized as possible. + +Similarly, the mini program already has several development frameworks available, while the current litemall mini program frontend still uses the original native mini program technology. + +Therefore, contributions that refactor the mini program frontend using newer development frameworks are welcome. + +In other words, this project aims to encourage **technical breadth rather than technical depth**, helping both contributors and other users explore and learn different technologies. + +### 5. Small code contributions and documentation improvements are welcome. + +Many open-source projects recommend keeping code contributions small and logically separated. This makes code reviews easier and allows reviewers to understand each change clearly. + +Of course, if the contribution fixes spelling mistakes or similar issues, it is preferable to fix all occurrences of the same problem in a single commit. + +Although the guidelines above may seem cautious about adopting new technologies, we still welcome discussions whenever users discover better technologies or identify a genuine need for them. + +If developers disagree with some of these principles, they are also free to develop their own versions based on their preferred technology choices. + +If you believe your implementation is better, you are welcome to submit its link to this project so that other developers can explore it. + +## Business Features + +The basic business features envisioned for this project have already been listed in the documentation. + +If you would like to introduce advanced features, such as distribution or affiliate marketing functionality, we recommend developing them independently on top of this project. + +If you believe that an essential business feature is missing, you can discuss it through an Issue or the QQ group so that it can be considered for future development. + +However, we would especially appreciate direct code contributions that enrich and improve the existing core business functionality. + +## Code Contributions + +- There are currently no strict coding standards. More detailed guidelines will be added in the future. + +## Issue Guidelines + +- Before submitting an Issue, search the existing Issues to check whether a similar problem has already been reported. +- Provide as much detailed information as possible when submitting an Issue. +- It is recommended to submit Issues based on the latest version of the source code. \ No newline at end of file diff --git a/README.en.md b/README.en.md new file mode 100644 index 000000000..8bb69d3cc --- /dev/null +++ b/README.en.md @@ -0,0 +1,215 @@ +# litemall + +Another lightweight online shopping mall system. + +**litemall** consists of a Spring Boot backend, a Vue.js admin dashboard, a WeChat Mini Program for customers, and a Vue.js mobile frontend. + +- [Documentation](https://linlinjava.gitbook.io/litemall) +- [Contribution Guide](https://linlinjava.gitbook.io/litemall/contribute) +- [FAQ](https://linlinjava.gitbook.io/litemall/faq) +- [API Documentation](https://linlinjava.gitbook.io/litemall/api) + +## Source Code + +- [Gitee](https://gitee.com/linlinjava/litemall) +- [GitHub](https://github.com/linlinjava/litemall) + +## Project Architecture + +![Project Architecture](./doc/pics/readme/project-structure-en.png) + +## Technology Stack + +1. Spring Boot +2. Vue.js +3. WeChat Mini Program + +![Technology Stack](doc/pics/readme/technology-stack.png) + +## Features + +### Online Shopping Mall Features + +- Home page +- Topic lists and topic details +- Category lists and category details +- Brand lists and brand details +- New arrivals and popular products +- Coupon lists and coupon selection +- Group buying +- Product search +- Product details, reviews, and sharing +- Shopping cart +- Order placement +- Order lists, order details, and after-sales services +- Address management, favorites, browsing history, and feedback +- Customer service + +### Admin Dashboard Features + +- User management +- Shopping mall management +- Product management +- Marketing and promotion management +- System management +- Configuration management +- Statistical reports + +## Quick Start + +### 1. Set Up the Development Environment + +Install the following tools: + +- [MySQL](https://dev.mysql.com/downloads/mysql/) +- [JDK 8 or later](http://www.oracle.com/technetwork/java/javase/overview/index.html) +- [Maven](https://maven.apache.org/download.cgi) +- [Node.js](https://nodejs.org/en/download/) +- [WeChat Developer Tools](https://developers.weixin.qq.com/miniprogram/dev/devtools/download.html) + +### 2. Initialize the Database + +Import the following SQL files from the `litemall-db/sql` directory in the specified order: + +1. `litemall_schema.sql` +2. `litemall_table.sql` +3. `litemall_data.sql` + +### 3. Start the Backend Services + +Open a terminal and execute the following commands: + +```bash +cd litemall +mvn install +mvn clean package +java -Dfile.encoding=UTF-8 -jar litemall-all/target/litemall-all-0.1.0-exec.jar +``` + +### 4. Start the Admin Dashboard + +Open another terminal and execute: + +```bash +cd litemall/litemall-admin +npm install --registry=https://registry.npm.taobao.org +npm run dev +``` + +Once the development server starts, open your browser and navigate to: + +`http://localhost:9527` + +The admin dashboard login page will be displayed. + +### 5. Start the Mini Program Frontend + +There are two available mini program frontends: `litemall-wx` and `renard-wx`. Developers can import and test either project. + +Follow these steps: + +1. Import the `litemall-wx` project into WeChat Developer Tools. +2. In the project settings, enable **"Do not verify valid domain names, web-view (business domain) domains, TLS versions, or HTTPS certificates."** +3. Click **Compile** to preview the application in WeChat Developer Tools. +4. Alternatively, click **Preview** and scan the generated QR code with your phone. Debugging mode must be enabled on your phone. + +**Note:** + +The steps above provide only the simplest way to run the application. Features such as WeChat login and WeChat Pay require additional configuration by the developer. + +For detailed instructions, refer to the [Project Documentation](https://linlinjava.gitbook.io/litemall/project). + +### 6. Start the Mobile Web Frontend + +Open another terminal and execute: + +```bash +cd litemall/litemall-vue +npm install --registry=https://registry.npm.taobao.org +npm run dev +``` + +Once the development server starts, open your browser (Chrome mobile emulation mode is recommended) and navigate to: + +`http://localhost:6255` + +The mobile shopping mall interface will be displayed. + +**Note:** This frontend is still under development, and some features may be unstable. + +## Disclaimer + +1. This project is intended for learning and practice purposes only. +2. The project is still under development and is not fully complete. The authors are not responsible for any consequences resulting from its use. +3. The source code is licensed under the [MIT License](./LICENSE), while the project documentation is licensed under [Creative Commons Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0)](https://creativecommons.org/licenses/by-nd/4.0/deed.zh). + +## Acknowledgements + +This project is based on or inspired by the following projects: + +### 1. [nideshop-mini-program](https://github.com/tumobi/nideshop-mini-program) + +**Project Description:** + +An open-source WeChat Mini Program shopping mall application built with Node.js and MySQL. + +**How litemall Uses This Project:** + +1. The litemall database is based on the database structure of nideshop-mini-program. +2. The `litemall-wx` module was developed based on nideshop-mini-program. + +### 2. [vue-element-admin](https://github.com/PanJiaChen/vue-element-admin) + +**Project Description:** + +An integrated admin dashboard solution built with Vue.js and Element UI. + +**How litemall Uses This Project:** + +The frontend framework of the `litemall-admin` module was modified and extended from vue-element-admin. + +### 3. [mall-admin-web](https://github.com/macrozheng/mall-admin-web) + +**Project Description:** + +An e-commerce admin dashboard built with Vue.js and Element UI. + +**How litemall Uses This Project:** + +Some page layouts and styles in the `litemall-admin` module were inspired by this project. + +### 4. [biu](https://github.com/CaiBaoHong/biu) + +**Project Description:** + +An admin dashboard development scaffold built using vue-element-admin and Spring Boot, following a frontend-backend separation architecture. + +**How litemall Uses This Project:** + +The permission management functionality in litemall was inspired by this project. + +### 5. [vant--mobile-mall](https://github.com/qianzhaoy/vant--mobile-mall) + +**Project Description:** + +A mobile shopping mall application built using the Vant UI component library. + +**How litemall Uses This Project:** + +The `litemall-vue` module was developed based on vant--mobile-mall. + +## Recommended Projects + +### 1. [Flutter_Mall](https://github.com/youxinLu/mall) + +A Flutter-based open-source online shopping mall application. + +### 2. [Taro_Mall](https://github.com/jiechud/taro-mall) + +A multi-platform open-source shopping mall application. Its backend is based on litemall, while its frontend is developed using the Taro framework. + +## License + +[MIT License](https://github.com/linlinjava/litemall/blob/master/LICENSE) + +Copyright (c) 2018-present linlinjava \ No newline at end of file