How mradmacher/paleolog works
Main Architectural Components
a) Web Layer (Frontend)
• JavaScript client-side applications (catalog, counting, project, species)
• ERB view templates system
• API endpoints
b) Application Core (Backend)
• In the middle
• Main domain entities and services
• Authorization system
c) Data Layer
• At the bottom
• SQLite database connection
• Repository pattern implementation
Component Relationships
a) Client-Server Communication
• REST API routes between frontend and backend
• Authentication flow
• View template rendering paths
b) Domain Logic Flow
• Repositories to core entities
• Authorization checks
• Report generation flow
Specific Implementation Details
Key architectural elements:
a) Frontend Components:
• JavaScript Apps (catalog_app, counting_app, project_app, etc.)
• View Templates (/web/views/)
• API Clients (/web/js/requests.js)
b) Backend Services:
• Authorizer
• Report Generator
• Counting Summary
• Density Information
c) Repository Layer:
• Project Repository
• Species Repository
• Counting Repository
• Occurrence Repository
• Sample Repository
• Section Repository
Specific Architectural Patterns to Highlight
• Repository Pattern: Show clear separation between domain logic and data access
• MVC Pattern: Demonstrate the separation of views, controllers (web handlers), and models
• REST API Architecture: Show the API endpoint organization
• Authentication Flow: Highlight security boundaries
Technical Stack Elements
• Ruby (Web Framework)
• SQLite Database
• JavaScript (Frontend)
• ERB Templates
• Docker Container
Business Logic Layer (Lib)
• Core Entities
• Services
• Report Generation
Data Access Layer (Repository)
• Data Access Objects
• Query Operations
• Database Interactions
Important Notes:
• Keep the paleontological domain context visible in the component naming
• Clear boundaries between authenticated and public areas
• Where Docker containerization fits in the architecture
• Test coverage boundaries