Developing Decoupled Frontend for 1C-Bitrix
We develop decoupled frontend for 1C-Bitrix: physically separate the interface from the CMS while preserving manageability and enabling gradual migration. We solve the problem where a standard Bitrix template hits a performance ceiling, yet a full redesign is too risky and costly. The decoupled approach gives you a modern UX (React/Vue, SPA, SSR) without stopping your business — we only replace critical pages, leaving the admin panel and SEO pages on the CMS.
Why Decoupled, Not Headless?
Headless means the entire site relies on an API and the CMS is merely a backend. That requires a complete architectural overhaul. Decoupled is the golden middle: you choose which pages to serve via SPA and which to keep on Bitrix templates. For example, the product catalog can be a React application, while content pages are still generated by the CMS. Comparison:
| Parameter | Traditional (Bitrix template) | Decoupled | Headless |
|---|---|---|---|
| UI performance | Average (php render) | High (SPA) | High (SPA) |
| Implementation complexity | Low | Medium | High |
| Implementation speed | Instant | 2-4 weeks per component | 2+ months |
| SEO compatibility | Full | Partial (need SSR) | SSR mandatory |
| Risks | Low | Low (gradual) | High |
Decoupled frontend is 30% faster to implement compared to headless, yet delivers 90% of the interface performance gain. Plus, you retain existing Bitrix modules and business logic — no need to rewrite infoblocks, agents, or events.
How to Synchronize the Cart Between Bitrix and React?
The most common pain point in decoupled is the cart. The header icon (Bitrix template) must display the actual item count added via the React catalog. The solution is an Event Bus accessible in both worlds:
// shared/eventBus.js — accessible in both Bitrix part and React
window.BitrixEventBus = {
listeners: {},
emit(event, data) {
(this.listeners[event] || []).forEach(cb => cb(data));
},
on(event, callback) {
(this.listeners[event] ||= []).push(callback);
}
};
// In a React component when adding to cart:
window.BitrixEventBus.emit('cart:updated', { count: newCount });
// In the Bitrix template (header):
window.BitrixEventBus.on('cart:updated', ({ count }) => {
document.querySelector('.cart-counter').textContent = count;
});
This same pattern applies to syncing favorites, notifications, and any other global states. For more on the Bitrix24 REST API, see the official documentation.
The "Island" Pattern — Partial Frontend Integration
Instead of completely separating the frontend, you embed React components into an existing Bitrix template via mount points:
// In the Bitrix catalog component template
$catalogData = json_encode($arResult['ITEMS']);
?>
<div id="react-catalog"
data-items="<?= htmlspecialchars($catalogData) ?>"
data-currency="RUB">
</div>
<script src="/local/js/dist/catalog.bundle.js"></script>
<script>
window.BitrixCatalog && window.BitrixCatalog.mount(
document.getElementById('react-catalog'),
<?= $catalogData ?>
);
</script>
// catalog.bundle.js — built independently with Webpack/Vite
import { createRoot } from 'react-dom/client';
import { CatalogApp } from './CatalogApp';
window.BitrixCatalog = {
mount(container, initialData) {
const root = createRoot(container);
root.render(<CatalogApp initialData={initialData} />);
}
};
This approach lets you develop a React frontend with a full toolchain (TypeScript, hot reload, tests) without touching the rest of the Bitrix site.
Example: Product Catalog on React
Suppose you need to replace the standard Bitrix catalog component with an SPA that offers instant filtering. We create an API endpoint that returns products in JSON. The React application fetches the data and renders on the client. The server side stays on Bitrix — infoblocks, prices, stock. This reduces page load time by 40–60% and increases conversion by 15–25%.
Build Configuration (Vite)
// vite.config.js for decoupled Bitrix components
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig({
plugins: [react()],
build: {
outDir: '../public/local/js/dist',
lib: {
entry: './src/index.tsx',
name: 'BitrixComponents',
formats: ['iife'],
fileName: 'components',
},
rollupOptions: {
external: [],
},
},
server: {
cors: true,
port: 3000,
proxy: {
'/api': {
target: 'http://site.local',
changeOrigin: true,
}
}
},
});
In development mode, the Vite dev server runs on localhost:3000 and the Bitrix site on site.local. API requests from the dev server are proxied through Vite proxy. After building, the bundle is automatically synced with the server.
Component Implementation Timeline Comparison
| Component | Timeline (weeks) | Complexity |
|---|---|---|
| Catalog | 3–4 | Medium |
| Cart | 2–3 | Low |
| User account | 4–6 | High |
| Checkout | 2–3 | Medium |
What Is Included in the Work
- Audit of the current Bitrix site architecture and identification of candidates for decoupling
- Development of an API layer (REST/GraphQL) between Bitrix and the new frontend
- Implementation of 2–3 components using the "island" pattern (catalog, cart, user account)
- Setup of CI/CD for automatic frontend building and deployment
- Integration of an Event Bus for state synchronization
- Documentation on mount points and API
- Performance testing (before/after measurements)
Work Process
- Analysis — we study the existing site, load, and bottlenecks. Determine which pages to replace first.
- Design — choose the stack (React/Vue), design the API, architect components.
- Implementation — write code in parallel with your team. Weekly demos.
- Testing — load testing, regression on Bitrix functionality.
- Deployment — roll out gradually, monitor errors. 24-hour rollback capability.
Technical requirements for the server side
- PHP 8.1+ - MySQL 8.0+ - mod_rewrite module for REST API - Configured tagged caching - CORS allowed for the frontend domain - Required PHP extensions per official Bitrix recommendationsEstimated Timelines
From 2 weeks for a single component to 2 months for a full turnkey migration. The cost is determined individually after an audit — get in touch, and we will evaluate your project.
Typical Mistakes in Decoupled
- Fully copying the design into React — you lose performance due to unnecessary re-renders.
- Missing bundle versioning — the browser caches old scripts. Use hashes:
catalog.a1b2c3.js. - Syncing state via HTTP instead of Event Bus — unnecessary delays.
- Forgetting SEO: if the SPA does not serve HTML, search engines will not see the pages. Use SSR or prerendering.
- Not setting up a proxy for development — the frontend cannot access the Bitrix API.
We have 10+ years of experience with Bitrix, 1C-Bitrix certifications, and over 50 successful projects. We provide a contractual guarantee on all work. Order an audit of your project — we will choose the optimal decoupled architecture. Get a consultation on implementation today.







