CASE STUDY / 14MINI
Alenbot: SMM Automation System
A Node.js automation tool for social media reseller (SMM) services, handling order tracking, automatic status checks and data sync.
- Built by
- Aral Çiftgül
- Type
- Experiment
- Technologies
- Node.js, SQLite3, Puppeteer, Axios, Winston
01 / 01SCREENS FROM THE PROJECT
/01
The challenge
Tracking the status of thousands of orders placed through SMM panels by hand was difficult, and up-to-date data was needed without hitting API limits.
/02
The approach
A hybrid system that stores orders locally in an SQLite database, checks API statuses in a background loop and scrapes data with Puppeteer when needed.
/03
It’s in the details.
5 features- 01Advanced order and status tracking loop
- 02Persistent data management with SQLite3
- 03Smart Puppeteer-based scraping
- 04Detailed logging and error tracking with Winston
- 05Easy management through a CLI
</>
Inside the code.
async function checkOrdersLoop() {
const activeOrders = await db.getActiveOrders();
if (activeOrders.length === 0) return;
const orderIds = activeOrders.map(o => o.order_id).join(',');
const result = await apiRequest('status', { orders: orderIds });
if (result) {
for (const order of activeOrders) {
const statusInfo = result[order.order_id];
if (statusInfo && statusInfo.status !== order.status) {
await db.updateOrderStatus(order.order_id, statusInfo);
}
}
}
}Order tracking was fully automated, and dependence on the API was reduced through smart caching.