Frontend Development 15 min read

Design and Implementation of a Component‑Based Special Activity Page Platform

This article describes the business background, pain points, and a component‑based solution for rapidly building and iterating promotional activity pages, covering system design, front‑end architecture, component library, visual editor, back‑end services, fast iteration practices, and future development plans.

Qunar Tech Salon
Qunar Tech Salon
Qunar Tech Salon
Design and Implementation of a Component‑Based Special Activity Page Platform

Business background : After product launch, operations rely on special‑discount activity pages to acquire, retain, and activate users, leading to frequent, highly customized page development that consumes development resources.

Pain points : Frequent, diverse activity requirements occupy developers for 2‑3 days per page; operations lack tools to maintain pages; developers face low reusability and high maintenance cost.

Solution : Build a powerful, easy‑to‑use special‑activity platform that enables product and operations teams to assemble pages from reusable components, reducing development effort and allowing rapid iteration.

Key solution aspects :

Page componentization – identify common blocks (header, navigation, product list, ads) and abstract them as components.

Configurable components – expose style and data properties so users can customize appearance and content.

Component library – store components in a library with a visual editor; provide business‑level components (navigation, list, sticky, carousel, video, etc.).

Visual editor – WYSIWYG interface with toolbar, editing area, and property panel for real‑time preview.

System design considerations :

Modular division to simplify problem solving.

Clean code organization for readability, maintainability, and extensibility.

Performance, stability, and security for high‑traffic events.

Front‑end architecture :

Layered structure includes View layer (rendering & interaction), Command layer (undo/redo), Control layer (API isolation), Component layer (component factory, registry, loader), Service layer (data fetching), and Model layer (state & cache).

Component file structure mandates required files (e.g., config.js for properties and propersForm.js for the property panel) and follows a strict convention.

Component lifecycle mimics React, providing hooks for developers to insert logic.

Property editing is driven by the configuration files, which the form generator translates into UI controls (e.g., color picker, media upload, Excel import) and finally renders as HTML in the property panel.

Page assembly process :

Data for a page is passed to an assembler, which resolves component instances via a component factory and library, loading missing components on demand from the server, caching them locally.

After rendering, each component requests its data source to populate content.

Dynamic component bundling :

When publishing, the server identifies required components, bundles them, generates versioned static assets, uploads to Swift storage, and distributes via CDN, enabling on‑demand loading and fast updates.

Back‑end architecture :

Node.js cluster managed by PM2, load‑balanced with Nginx, cached via Redis, static assets stored in Swift, data persisted in high‑availability MySQL‑PXC, monitoring/alerting via SMS/phone, logs managed by Log4js.

Rapid iteration :

After an initial usable version, feedback drives quick feature releases; the platform supports multi‑terminal adaptation (PC, touch, APP) by providing separate component sets and optional manual page builds.

Data binding is achieved through a custom "data‑source" form type, supporting direct product selection, Excel import, or custom API integration with field mapping.

Future plans :

PSD import to generate pages automatically.

AI‑assisted design suggestions.

Component hot‑publish and online development environment.

React Native implementation for APP and WeChat Mini‑Program support.

Overall, the platform reduces activity page creation time from 2‑3 days to a few hours, enabling 10‑20 pages per day and aligning development effort with product and operations needs.

automationfrontend architectureweb developmentVisual Editorcomponent-based
Qunar Tech Salon
Written by

Qunar Tech Salon

Qunar Tech Salon is a learning and exchange platform for Qunar engineers and industry peers. We share cutting-edge technology trends and topics, providing a free platform for mid-to-senior technical professionals to exchange and learn.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.