How I Turned an Open‑Source Java E‑Commerce Kit into a 5‑Figure Side Business in 25 Days
In this detailed case study I describe how I discovered the CRMEB Java e‑commerce project on GitHub, cloned and evaluated its features, customized product, order, and payment modules for a mother‑and‑baby shop, tackled environment setup, performance tuning, and deployment, and ultimately delivered a fully functional marketplace that boosted my freelance income fivefold.
Project Overview
Initial requirement: a small‑program e‑commerce store for a mother‑and‑baby shop, quoted 120 K RMB for one‑month delivery.
Complexity of a Java e‑commerce system
Product management with multiple specifications, stock deduction, categories, brands, tags.
Order lifecycle (payment, shipment, refunds, timeout handling).
WeChat payment integration (parameter configuration, callback verification, refund API, reconciliation files).
Open‑source foundation
Search for “Java e‑commerce” on GitHub revealed the CRMEB project (Apache‑2.0). It already implements product management, order processing, payment, membership points and marketing activities.
Getting the source
git clone https://github.com/crmeb/crmeb_java.gitEnvironment preparation (Week 1)
Key issues and fixes:
Maven download slowness – added Alibaba Cloud mirror in settings.xml:
<mirror>
<id>aliyunmaven</id>
<mirrorOf>*</mirrorOf>
<name>Alibaba Cloud Public Repository</name>
<url>https://maven.aliyun.com/repository/public</url>
</mirror>Redis connection failure – started a Redis container:
docker run -d --name redis -p 6379:6379 redis:latestDatabase charset – created schema with utf8mb4:
CREATE DATABASE crmeb_java DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;Requirement analysis (Week 2)
Checklist after client discussion:
✅ Product display – covered.
✅ Shopping cart & checkout – covered.
✅ WeChat payment – covered.
✅ Membership points – covered.
🔧 Age‑range filter – new field.
🔧 Safety certification label – new field.
🔧 Mother‑and‑baby UI theme – custom styling.
🔧 Bulk import of existing product data – script required.
Core development (Week 3)
Database schema extension
ALTER TABLE eb_store_product
ADD COLUMN age_range VARCHAR(50) COMMENT 'Applicable age range',
ADD COLUMN safety_cert VARCHAR(200) COMMENT 'Safety certification',
ADD INDEX idx_age_show_del (age_range, is_show, is_del),
ADD INDEX idx_category_show (cate_id, is_show);Backend API for age filtering
@Service
public class StoreProductServiceImpl extends ServiceImpl<StoreProductMapper, StoreProduct> implements StoreProductService {
public PageInfo<StoreProduct> getProductsByAge(String ageRange, Integer page, Integer size) {
LambdaQueryWrapper<StoreProduct> wrapper = new LambdaQueryWrapper<>();
wrapper.eq(StoreProduct::getAgeRange, ageRange);
wrapper.eq(StoreProduct::getIsShow, true);
wrapper.orderByDesc(StoreProduct::getCreateTime);
Page<StoreProduct> pageInfo = new Page<>(page, size);
Page<StoreProduct> result = baseMapper.selectPage(pageInfo, wrapper);
return CommonPage.restPage(result);
}
}Frontend theme adaptation
// Mother‑and‑baby theme colors
$primary-color: #ff6b9d; // pink
$secondary-color: #ffc1e0; // light pink
$accent-color: #ffeb3b; // yellow
.el-button--primary { background-color: $primary-color; border-color: $primary-color; }
.el-menu--horizontal .el-menu-item.is-active { border-bottom-color: $primary-color; color: $primary-color; }Age‑filter component (Vue)
<template>
<div class="age-filter">
<span class="filter-label">Applicable Age:</span>
<el-radio-group v-model="selectedAge" @change="handleAgeChange">
<el-radio-button label="">All</el-radio-button>
<el-radio-button label="0-6 months">0‑6 months</el-radio-button>
<el-radio-button label="6-12 months">6‑12 months</el-radio-button>
<el-radio-button label="1-3 years">1‑3 years</el-radio-button>
<el-radio-button label="3-6 years">3‑6 years</el-radio-button>
</el-radio-group>
</div>
</template>
<script>
export default {
data() { return { selectedAge: '' }; },
methods: { handleAgeChange(age) { this.$emit('age-change', age); } }
}
</script>Excel bulk‑import service (Apache POI)
@Service
public class ProductImportService {
@Autowired
private StoreProductService productService;
public void importFromExcel(MultipartFile file) throws Exception {
Workbook workbook = WorkbookFactory.create(file.getInputStream());
Sheet sheet = workbook.getSheetAt(0);
List<StoreProduct> products = new ArrayList<>();
for (int i = 1; i <= sheet.getLastRowNum(); i++) {
Row row = sheet.getRow(i);
if (row == null) continue;
StoreProduct p = new StoreProduct();
p.setStoreName(getCellValue(row.getCell(0)));
p.setStoreInfo(getCellValue(row.getCell(1)));
p.setPrice(new BigDecimal(getCellValue(row.getCell(2))));
p.setStock(Integer.valueOf(getCellValue(row.getCell(3))));
p.setAgeRange(getCellValue(row.getCell(4)));
p.setSafetyCert(getCellValue(row.getCell(5)));
p.setIsShow(true);
p.setIsDel(false);
p.setCreateTime(new Date());
products.add(p);
}
productService.saveBatch(products);
workbook.close();
}
private String getCellValue(Cell cell) {
if (cell == null) return "";
cell.setCellType(CellType.STRING);
return cell.getStringCellValue().trim();
}
}Import handling required null‑checks, type conversion for price fields and placeholder images for missing product pictures.
Testing & optimization (Week 4)
Functional test flow:
Product browsing → age filter → detail view.
Add to cart → checkout → WeChat sandbox payment.
Backend order → ship → complete.
Performance tuning – added indexes to speed up product list queries:
ALTER TABLE eb_store_product ADD INDEX idx_age_show_del (age_range, is_show, is_del);
ALTER TABLE eb_store_product ADD INDEX idx_category_show (cate_id, is_show);Client acceptance identified minor UI issues (image loading latency, default filter value, age display on product cards) that were resolved.
Deployment
Target environment: Alibaba Cloud ECS (2 vCPU, 4 GB RAM), MySQL 5.7, Redis 1 GB, CDN for static assets.
#!/bin/bash
# Backend deployment
cd /home/crmeb
git pull origin master
mvn clean package -Dmaven.test.skip=true
sudo systemctl restart crmeb-admin
# Frontend deployment
cd /home/crmeb-admin-web
npm run build
sudo cp -r dist/* /var/www/html/Project timeline
Week 1 – project familiarization and environment setup (7 days).
Week 2 – requirement analysis and technical selection (7 days).
Week 3 – core development (7 days).
Week 4 – testing, optimization and launch (4 days).
Estimated effort for a ground‑up implementation: 2–3 months. Leveraging CRMEB reduced total effort to 25 days.
Key takeaways
Open‑source projects can dramatically cut development time and cost.
Adapt existing functionality instead of rewriting from scratch.
Maintain detailed requirement documents, staged payments and a 20 % time buffer to mitigate risks.
Resources
GitHub repository: https://github.com/crmeb/crmeb_java
Java Web Project
Focused on Java backend technologies, trending internet tech, and the latest industry developments. The platform serves over 200,000 Java developers, inviting you to learn and exchange ideas together. Check the menu for Java learning resources.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
