How eduardosasso/bullish works
Main Components
• Core Application (bullish.rb): This is the entry point that orchestrates the execution of the newsletter generation process.
• Editions Module (editions folder): Contains different newsletter “editions” (morning, afternoon, free, widgets) that determine how content is laid out.
• Service Modules (services folder): A series of Ruby service classes that fetch, process, and transform various types of data (e.g., crypto data, stock futures, indexes, news feeds, and email generation). Notice there’s also a dedicated subfolder for news, implying a specialized process.
• Web Assets and Presentation (site folder): Hosts static site files, CSS, JavaScript, blog posts, and landing page content. This layer is used to display information about Bullish▲ online and support subscription, error pages, and legal pages.
• CI/CD & Deployment Components: With a .github/workflows folder (using GitHub Actions) and netlify.toml, the project integrates continuous integration and deployment, using Netlify to serve the site.
• Testing Infrastructure (test folder): Encompasses unit tests for editions, services, and templates ensuring the various components work as expected.
Detail the Relationships and Data Flow
• The Core Application (bullish.rb) acts as the central controller that:
• Invokes the specific edition (e.g., morning or afternoon) from the Editions module.
• For each edition, leverages various service modules that fetch data (e.g., crypto, futures, sector, trending, etc.).
• Uses the Templating components to integrate the data into HTML email formats.
• Possibly triggers the email service (email.rb) in the services folder to distribute the newsletter.
• The Site folder is responsible for static content that supports the overall brand (including blog posts and landing pages), which may be automatically deployed via Netlify.
• The CI/CD workflow utilizes GitHub Actions to run tests (from the test folder) and build the app, while deployment is managed by Netlify.
• Surround it with interconnected modules:
• To its left: Editions and Services (as sources of data and processing).
• To its right: Templates, which lead into two outputs: the Email Newsletter (via email service) and the Static Web Site.
• At the top/bottom: CI/CD constructs (GitHub Actions, Testing) and Deployment (Netlify) that influence the entire system.