How nucleus-jena/tomsy works
Main Components
• Frontend Client: Represent the parts served to the end user. This includes the browser where the Vue.js components, pages, and related assets (all within app/javascript and app/assets) render the user interface.
• API Layer & Controllers: The Rails “controller” layer (especially the API controllers found under app/controllers/api) represents the service endpoints that handle RESTful requests and responses.
• Business Logic & Models: The Rails models (in app/models) hold the business semantics including process definitions, workflows, user management, and notifications.
• Real-time Communication: Action Cable channels (in app/channels) that enable live updates (e.g., for notifications or activity hubs).
• Workflow Engine Integration: External BPMN files (in the workflow folder) and initializers (like camunda.rb) indicate integration with Camunda for workflow management.
• Supporting Services and Libraries: This includes the authentication system (indirectly via Devise by the related views and controllers), external integrations through ElasticSearch (see config/initializers/elastic_search.rb), and error tracking (Sentry via sentry_raven.rb).
Out Interactions and Relationships
• Rails Backend’s internal flow: Controllers call business logic (services and interactors) and then interact with Models that communicate with the Database.
• That the Backend also leverages Action Cable connections for real-time updates back to the frontend.
• Demonstrate that the workflow subsystem (Camunda integration) feeds into the business logic via JSON/BPMN message exchanges or internal service calls.
• Optionally, include external services (like ElasticSearch, Tika for document handling, and Sentry for error monitoring) as ancillary components directly interfacing with the backend.
Important Architectural Patterns & Design Principles
• MVC Pattern: Illustrate clear separations between Views (Vue.js and Haml templates in app/views), Controllers (Rails controllers handling API requests), and Models (domain logic).
• Component-based Frontend: Note that the frontend uses a modular Vue.js structure (with components, controls, mixins, pages, and routing) ensuring flexibility.
• Service Integration: Emphasize the use of background jobs (see app/jobs) for asynchronous tasks like reindexing, workflow handling, and notifications.
• Modular Workflows: The workflow BPMN definitions signal that process management is abstracted into separate, maintainable workflows.