Frappe Vue Ssr
Server-side rendering (SSR) for Vue.js Single File Components (SFCs) in Frappe apps.
- Author: netchampfaris
- Repository: https://github.com/netchampfaris/frappe_vue_ssr
- GitHub stars: 1
- Forks: 1
- License: MIT
- Category: Integrations
- Maintenance: Unmaintained
Install Frappe Vue Ssr
bench get-app https://github.com/netchampfaris/frappe_vue_ssr
Add the Frappe Gems badge to your README
Maintain Frappe Vue Ssr? Paste this into your README:
[](https://frappegems.com/gems/apps/netchampfaris/frappe_vue_ssr)
About Frappe Vue Ssr
# Frappe Vue SSR
Server-side rendering (SSR) for Vue.js Single File Components (SFCs) in Frappe apps.
> [!WARNING]
>
> This is a proof-of-concept of Vue SSR Rendering in Frappe apps. For production use, several improvements are needed:
>
> - **Pre-rendering** - Components are currently built on-demand during requests
> - **Shared bundling** - Each page creates separate bundles, causing duplication across multiple pages
> - **CSS optimization** - Styles are currently inlined instead of being extracted to separate files
## How SSR Rendering Works
This app implements a Vue SSR renderer that renders `www/.vue`, allowing you to create server-rendered Vue pages that hydrate on the client side.
### Architecture Overview
The SSR system has one main component:
**VueRenderer (Python)** - `vue_renderer.py` - The core SSR handler that internally calls a Node.js subprocess (`vue_ssr_renderer.js`) for Vue compilation and rendering
### SSR Workflow
### VueRenderer Implementation
#### VueRenderer (Python) - `vue_renderer.py`
**File Discovery**
- Searches through all installed Frappe apps
- Looks for `.vue` files in `/www` folders matching the URL path
- Example: `/vue-page` → searches for `vue-page.vue`
**Node.js Integration**
- Validates Node.js v22+ availability (required for Vue SSR)
- Calls Node.js subprocess with `vue_ssr_renderer.js`
- Passes component path and server data as arguments
**HTML Generation**
- Builds complete HTML page with SSR content
- Includes Vue hydration scripts and styles
- Handles client bundle serving via Frappe assets
#### Internal Node.js Subprocess - `vue_ssr_renderer.js`
**Component Validation**
- Validates Vue SFC structure (`
Click to view workflow diagram
```mermaid graph TD A[User requests /vue-page] --> B[VueRenderer finds vue-page.vue] B --> C[VueRenderer calls Node.js Renderer] C --> D[Node.js Renderer builds server + client bundles] D --> E[Server bundle renders to HTML] E --> F[Complete HTML page sent to browser] F --> G[Vue hydrates on client side] ```Related Integrations apps for Frappe & ERPNext
- Insights — Open Source Business Intelligence Tool
- Raven — Simple, open source team messaging platform
- Frappe Whatsapp — WhatsApp cloud integration for frappe
- Frappe Assistant Core — Infrastructure that connects LLMs to ERPNext. Frappe Assistant Core works with the Model Context Protocol (MCP) to expose ERPNext functionality to any compatible Language Model
- Biometric Attendance Sync Tool — A simple tool for syncing Biometric Attendance data with your ERPNext server
- Frappe React Sdk — React hooks for Frappe
- Frappe Js Sdk — TypeScript/JavaScript library for Frappe REST API
- Mcp — Frappe MCP allows Frappe apps to function as MCP servers