How byly23/jolc_compiler works
Main Components
• User Interface Layer: This includes all the visual parts rendered in the browser. It contains the main pages (Inicio, Analizador, AstPage, etc.), the NavBar, and side bar components. Each of these is responsible for a section of the application.
• Code Editor & Visualization Modules: Components like CodeMirrorComponent for code editing, GraphvizComponent for rendering graphs (likely AST or other visual representations), and additional components for error and symbol data display.
• Routing Module: The routing logic (AppRouter.js) which manages navigation among pages.
• Style & Helper Modules: CSS directories and helper functions like getConsola.js for utility support.
Architectural Relationships and Interactions
• Client Browser: The user interacts with the application via a browser, which loads the entire SPA.
• Routing and Page Management: Once loaded, the AppRouter determines which page view to display based on the user’s navigation. Each page composes various components (for example, the Analizador page integrates CodeMirrorComponent for entering code and might trigger error analysis that then uses ErrData, SimData, etc.).
• Component Interactions: Components such as NavBar and SideBarData facilitate navigation and offer contextual menus/options that guide the user to other views.
• Data Processing Flow: The user's code input from the editor is processed (presumably sent to an analysis engine internally or via an external API – given the “compiler” theme). The results, such as errors (displayed in TablaErrores) or symbol tables (TablaSimbolos), then feed back into the UI. GraphvizComponent is used to render dynamic graphical representations (like ASTs), and there may be communication between pages/components to update that visualization in real-time.
Architectural Patterns and Design Principles
• Modular Component Design: The project is neatly divided into reusable React components and pages, a common pattern in front-end architecture for SPAs.
• Separation of Concerns: UI components (views, navigation, styles) are separated from utility modules (helpers) and configuration files (package.json, etc.).
• Single Page Application (SPA) Principles: The routing via AppRouter and centralized state management (if present) follow typical SPA principles.
• Standard Web Deployment: The application is hosted on Heroku (as evidenced by the link in the README) and uses a modular file structure common to modern web development.