How apo5698/helli-grading works
Main Components
• Web Frontend: This is built with Rails views (ERB and Slim templates) and enhanced by modern JavaScript components (found in app/javascript). The existence of separate folders for “grading” (both v1 and v2) and other interactive components (forms, templates, etc.) indicates a rich, dynamic UI.
• API Layer: Under app/controllers/api, a dedicated set of controllers (for assignments, grade items, dependencies, etc.) reveals RESTful endpoints. This layer is likely used for communicating with the client-side JavaScript or external services.
• Backend (Rails MVC Core): The standard Rails folders (models, controllers, views, mailers) manage business logic. Models represent entities such as Assignment, Course, Participant, Submission, Rubric, and others that underpin the auto-grading logic.
• Background Tasks & Job Handling: Although not explicitly in a dedicated background jobs directory, files like Procfile and Rakefile along with specific tasks in .rake files and the Rails/config initializers signal that asynchronous job processing might be in play.
• Supporting Infrastructure: Configuration management (config/ directory with multiple initializer files, environment configurations, and webpack files), database migration scripts under db/migrate, and testing frameworks (RSpec, Cucumber) that ensure robustness.
Relationships and Interactions
• The browser client (UI) interacts with the Rails controllers via HTTP/HTTPS, submitting forms (e.g., assignment uploads, grading requests) and receiving rendered views or JSON responses.
• The API endpoints provide a layer through which the frontend and external services can interact with core resources (assignments, courses, submissions).
• The controllers interact with models for business logic execution, such as processing an assignment submission, calculating grades based on defined rubrics, or generating file outputs using the “helli” utility libraries.
• There is a clear MVC separation where models encapsulate data (courses, users, submissions), controllers handle incoming requests, and views render the results.
• Additional libraries (e.g., those related to Java (jdk.rb), open3t.rb, and those inside app/lib/helli) perform specialized tasks like code compilation, execution, and output verification which are central to the auto-grading functionality.
Architectural Patterns and Design Principles
• The application uses the standard MVC pattern provided by Rails.
• A modular design is evident, as the project splits functionalities between core assignment/course management and grading-specific logic.
• There’s a separation of concerns between UI (client-side components), API endpoints (dedicated controllers under app/controllers/api), and background/utility functions (residing in lib and specialized subdirectories).
Technologies and Frameworks
• Ruby on Rails (core framework) handling the MVC pattern.
• Webpacker for managing JavaScript bundles and components.
• RSpec and Cucumber for testing, which implies that tests are part of the overall architecture to ensure components interact correctly.
• Additional libraries for auto-grading tasks such as JDK integrations (app/lib/jdk.rb) and utilities for CSV handling and logging.
• ActionCable (under app/channels) suggests real-time features may be present for live updates or notifications.