Idol Shopping Network (ISN) Server Documentation
Complete clean-room PHP & SQLite backend emulator for the defunct Idol Shopping Network React Native mobile application (Hermes Bytecode Engine).
Project Overview
Idol Shopping Network (ISN) was a Philippine social e-commerce platform launched in 2021 featuring celebrity endorsements and nationwide cash-on-delivery services. The mobile application was built using React Native compiled into Hermes bytecode.
When the original production infrastructure went offline, the mobile client ceased functioning. This open-source server emulator was engineered to reconstruct all expected REST API contracts, property structures, and SQLite schemas, bringing the app back to life for software preservation, research, and offline interoperability.
System Architecture
The server is designed with a lightweight, zero-dependency architecture:
| Layer | Technology | Purpose |
|---|---|---|
| Runtime | PHP 8.2+ / 8.4 (PHP-FPM) | High-speed native routing with zero external framework dependencies. |
| Database | SQLite 3 (WAL Mode) | High concurrency, ACID transactions, and zero daemon overhead. |
| Web Server | Nginx | FastCGI process gateway, reverse proxy, and static asset streaming. |
| Authentication | Argon2id + Salt + Pepper | Memory-hard cryptographic security for admin and client users. |
| Client Target | React Native (Hermes v84) | Consumes standardized JSON REST endpoints (`/v1/*`). |
Installation & Setup
Deploying your own ISN server takes less than 60 seconds.
1. Clone Repository
git clone https://github.com/ColtonSilvaonKnoxKontor/Idol-Shopping-Network-Server.git
cd Idol-Shopping-Network-Server2. Configure Environment
cp .ske.example .ske
chmod 600 .ske3. Run Automated CLI Installer
php setup.php4. Start Built-in Development Server
php -S 0.0.0.0:8000 index.phpConfiguration (.ske)
All secret keys, pepper values, and database paths are loaded from the private .ske (Silva Keys & Environment) configuration file.
# ISN Server Configuration
APP_NAME="Idol Shopping Network Server Emulator"
APP_ENV=production
APP_URL=https://isn.silvasystems.online
# Cryptographic Pepper for Password Hashing
SECURITY_PEPPER="YOUR_CUSTOM_SECRET_PEPPER_HERE"
# Admin Authentication
ADMIN_DEFAULT_PASSWORD=your_secure_admin_password_here
ADMIN_PASSWORD_FILE=
# SQLite Storage Path
DB_PATH=/path/to/your/database.sqliteDatabase Engine & WAL Mode
The emulator connects via PHP PDO and configures Write-Ahead Logging (WAL) mode on every request:
PRAGMA journal_mode = WAL;
PRAGMA synchronous = NORMAL;
PRAGMA foreign_keys = ON;Database Tables
| Table Name | Key Columns | Description |
|---|---|---|
users |
id, username, email, password_hash, role, token |
Registered buyers, merchants, and administrators. |
categories |
id, name, icon_url, image_url, is_active |
Primary marketplace categories. |
sub_categories |
id, category_id, name, icon, image_url |
Subcategory hierarchy linked to categories. |
products |
id, category_id, sub_category_id, name, price, stock, is_idol_mall |
Marketplace items and varieties. |
ads |
id, title, image_url, is_active |
Homepage promotional carousel banners. |
orders |
id, order_number, user_id, total_amount, status, payment_method |
Customer checkout orders. |
Products & Catalog API
Returns the paginated product list for the mobile app home screen.
| Parameter | Type | Description |
|---|---|---|
| category_id | integer | Optional category filter ID. |
| sub_category_id | integer | Optional subcategory filter ID. |
| search | string | Optional keyword search. |
{
"success": true,
"status": 200,
"data": {
"current_page": 1,
"data": [
{
"id": 1,
"name": "ISN Wireless Noise-Cancelling Headphones Pro",
"price": 1299.00,
"discount_price": 999.00,
"is_idol_mall": 1,
"latest_variety": { "price": 1299.00, "discounted": 999.00 }
}
]
}
}Categories & Subcategories API
Returns all active categories and nested subcategory mappings.
{
"success": true,
"status": 200,
"length": 7,
"data": [
{
"id": 1,
"name": "Electronics & Gadgets",
"image_url": "https://...",
"sub_categories": [
{ "id": 1, "name": "Smartphones & Audio" }
]
}
]
}Authentication API
Authenticates a user and issues a Bearer authentication token.
{
"username": "buyer",
"password": "password123"
}Buyer & Cart API
Retrieves user shopping cart items, subtotal, and shipping fee calculation.
Adds a product variety and quantity to the user cart.
Security & Threat Defense
The emulator includes built-in protection against automated vulnerability scanners:
- Dotfile & Key Isolation: Direct requests to
.ske,.env,.git, ordatabase.sqliteare blocked withHTTP 403 Forbidden. - Directory Traversal Shield: Intercepts
../and LFI attempts. - Protected Admin Endpoint: Admin dashboard uses Argon2id with memory-hard hashing and private server-side pepper verification.
- Registered User Directory: Dedicated portal at
/admin/users.phpto manage buyer/seller accounts, inspect in-house OTP logs, reset credentials, and generate instant demo profiles.
Custom Error Handlers
The platform features dedicated error handlers modeled after the Wayback Machine archive and featuring our custom Anime Cat Girl Mascot:
| Error Code | Endpoint | Mascot Representation |
|---|---|---|
| 403 Forbidden | /error/403.php | Anime Cat Girl Security Officer holding STOP sign. |
| 404 Not Found | /error/404.php | Anime Cat Girl Shopping Assistant searching in delivery boxes. |
| 500 Server Error | /error/500.php | System Maintenance Mascot. |
Planned Development
Upcoming features and architecture enhancements designed to complete the full software preservation and emulation experience for the Idol Shopping Network platform:
1. In-House Self-Contained OTP Emulation Engine
Because official telecom carrier SMS gateways (Globe, Smart, Semaphore, Twilio) require paid subscriptions, external credentials, and active internet connectivity, the server emulator will feature a 100% self-contained, in-house OTP engine:
| Feature / Mechanism | Implementation Details | Status |
|---|---|---|
| Dynamic 6-Digit Generator | Generates standard pseudo-random 6-digit numeric codes with 10-minute validity saved in SQLite. | Live (v1.1.0) |
| Universal Sandbox Code (`123456`) | Master bypass verification code enabling instant automated testing across all phone numbers. | Live (v1.1.0) |
| Payload Transparency | The generated code is returned directly in the JSON response ("otp": "227178") for developer inspection. |
Live (v1.1.0) |
| Virtual Credential Generator | Generates realistic Philippine telco numbers (Globe, Smart, DITO) with preloaded wallet funds via /v1/auth/quick_demo. |
Live (v1.1.0) |
CREATE TABLE IF NOT EXISTS otp_verifications (
id INTEGER PRIMARY KEY AUTOINCREMENT,
phone TEXT NOT NULL,
otp_code TEXT NOT NULL,
is_verified INTEGER DEFAULT 0,
expires_at DATETIME NOT NULL,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);2. In-House Customer Support & Live Chat System
Replaced defunct proprietary Intercom SaaS dependencies with a 100% self-hosted, in-house messaging architecture powered by SQLite and real-time polling:
| Endpoint | Method | Description |
|---|---|---|
/v1/chat/start | POST | Initializes or fetches the active support ticket and triggers greeting from Mascot Assistant. |
/v1/chat/messages | GET | Fetches conversation history for ticket with auto-read status updates. |
/v1/chat/send | POST | Sends customer message or admin reply with intelligent automated FAQ assistance. |
/v1/chat/status | POST | Updates ticket status (open, in_progress, resolved). |
/admin/support.php | GET | Two-panel Administrator Live Support Desk for managing customer inquiries. |
/chat | GET | Responsive, mobile-friendly customer chat client featuring the Anime Mascot Assistant. |
3. Full Merchant Order & Fulfillment Lifecycle
Expanding the seller control plane to simulate real-time tracking updates, shipping waybill generation, and status progression from pending → preparing → shipped → delivered.
3. Interactive WebSocket Push Emulation
Replicating real-time order status toast notifications on the React Native mobile client using standard server-sent events (SSE) or local WebSocket streams.