How fineyh/lowcodeplatform works
Main Components
• Frontend Application:
– Editor Module: This is the central canvas where users drag, arrange, and preview components (look at src/components/EditCanvas and src/components/ShowCanvas).
– Component List Module: Representing the left panel with a list of available components (found in src/components/ComponentList).
– Config Menu Module: The right panel dedicated to editing component properties (in src/components/ConfigMenu).
– Toolbar Module: Contains various shortcut actions (undo/redo, delete, export, AI generation, etc.), as described in the README.
– AI Generation Module: Integrates with a large language model to generate or transform code based on user input (visible in the usage manual screenshots).
– Views & Routing: Pages like HomePage, PreviewPage, and NotFound defined in src/views and orchestrated by src/router.
– Global Styles & Utilities: Shared assets (CSS/SCSS in assets and configurations) and utility functions (in src/utils) support the app’s look and interactive behavior.
– State Management: Using Pinia (see src/store) to manage the state, including canvas, elements, and publish status.
• Backend (Mock Server):
– JSON Server: The server folder includes a db.json and package.json, which provide the mock API endpoints required by the front-end for data persistence and retrieval.
Out the Relationships and Interactions
• The Frontend client interacts with the JSON server via HTTP calls (using APIs in src/http) to retrieve and update page data.
• The editor, component list, and config menu are integrated within the main application layout — typically linked via a routing or a top-level container (App.vue).
• The state management system (Pinia) ties in with the UI components to persist user actions (for drag-and-drop actions, property updates, and tool operations).
• Utility functions (e.g., throttle, deepcopy, useDragger) support front-end interactions and workflow throughout the modules.
• The AI Generation module feeds back into the editor by transforming user inputs into code that instantly renders on the canvas.
Architectural Patterns and Design Principles
• Component-Based Design: Clear separation of concerns is visible through distinct Vue or TSX components for different UI parts.
• MVC/MVVM-like Structure: The Views (with .vue files) and the state in Pinia loosely map to model and view-model layers, enabling reactive UI updates.
• Separation of Frontend and Backend: Although using a JSON server, the design keeps the client logic and mock backend independent, preparing the codebase for a potential real backend.
Relevant Technologies and Frameworks
• Vue.js, possibly with support for TSX components.
• Pinia for state management.
• Vite as the build tool (vite.config.ts).
• JSON Server as the mock backend.
• CSS/SCSS for styling along with local script patches (such as canvas2image.js).