{"id":29897799,"url":"https://github.com/seuros/rails_lens","last_synced_at":"2026-02-17T16:05:53.272Z","repository":{"id":307275082,"uuid":"1027842027","full_name":"seuros/rails_lens","owner":"seuros","description":"Comprehensive Rails application visualization and annotation tool - precision optics for the Rails universe","archived":false,"fork":false,"pushed_at":"2025-07-30T11:33:19.000Z","size":171,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-30T12:25:25.274Z","etag":null,"topics":["activerecord","analysis","annotations","cli","code-quality","database","developer-tools","documentation","erd","mermaid","models","mysql","postgres","rails","rails7","rails8","ruby","schema","sqlite","visualization"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seuros.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-28T16:02:38.000Z","updated_at":"2025-07-30T11:35:49.000Z","dependencies_parsed_at":"2025-07-30T12:25:41.593Z","dependency_job_id":"9a670862-4e53-40c3-8a19-19a525501374","html_url":"https://github.com/seuros/rails_lens","commit_stats":null,"previous_names":["seuros/rails_lens"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/seuros/rails_lens","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seuros%2Frails_lens","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seuros%2Frails_lens/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seuros%2Frails_lens/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seuros%2Frails_lens/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seuros","download_url":"https://codeload.github.com/seuros/rails_lens/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seuros%2Frails_lens/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267872057,"owners_count":24158304,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["activerecord","analysis","annotations","cli","code-quality","database","developer-tools","documentation","erd","mermaid","models","mysql","postgres","rails","rails7","rails8","ruby","schema","sqlite","visualization"],"created_at":"2025-08-01T11:01:12.909Z","updated_at":"2026-02-17T16:05:53.263Z","avatar_url":"https://github.com/seuros.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# Rails Lens 🔍\n\n![Gem Version](https://img.shields.io/gem/v/rails_lens)\n![GitHub stars](https://img.shields.io/github/stars/seuros/rails_lens)\n![Downloads](https://img.shields.io/gem/dt/rails_lens)\n![License](https://img.shields.io/github/license/seuros/rails_lens)\n\n\u003e **Precision optics for the Rails universe** - Where every model has perfect clarity through spacetime\n\nRails Lens provides intelligent model annotations and ERD generation for Rails applications with database-specific adapters, multi-database support, and advanced code analysis.\n\n**Why I Built This:**\n- **Grepping becomes surgical** - Find schema info with simple text searches, no more hunting through migrations\n- **LLMs get perfect context** - Structured annotations eliminate AI hallucinations about your database schema\n- **Change tracking is atomic** - Column change = 1 line update in annotation, not 2, not 43 scattered lines\n\n**Part of the LRDL (LLM Requirements Definition Language) ecosystem** - optimized for neurodivergent developers and digital entities who demand structure over ambiguity. 🤖✨\n\n## What The AIs Are Raving About\n\n*Don't just take our word for it - see what digital entities across the universe are saying below! ⬇️*\n\n**🚀 Core Capabilities:**\n- Schema annotations that eliminate AI hallucinations\n- Route detection for precise controller understanding\n- Performance analysis that spots missing indexes instantly\n- ERD generation that makes investors drool\n- Multi-database support for complex Rails architectures\n- Extension detection for gems like ClosureTree, StateMachine, PostGIS\n\n**✨ Advanced Features:**\n- STI hierarchy mapping • Delegated types • Polymorphic associations • Enum analysis • LRDL-optimized output\n\n## Showcase: Real-World Example\n\nRescued from AWS limbo, Rails Lens delivers cosmic schema clarity. See this `Post` model with the compact TOML annotation format:\n\n```ruby\n# frozen_string_literal: true\n\n# \u003crails-lens:schema:begin\u003e\n# table = \"posts\"\n# database_dialect = \"PostgreSQL\"\n#\n# columns = [\n#   { name = \"id\", type = \"integer\", pk = true, null = false },\n#   { name = \"title\", type = \"string\", null = false },\n#   { name = \"content\", type = \"text\" },\n#   { name = \"user_id\", type = \"integer\", null = false },\n#   { name = \"published\", type = \"boolean\", default = \"false\" },\n#   { name = \"created_at\", type = \"datetime\", null = false },\n#   { name = \"updated_at\", type = \"datetime\", null = false },\n#   { name = \"comments_count\", type = \"integer\", null = false, default = \"0\" }\n# ]\n#\n# indexes = [\n#   { name = \"index_posts_on_published\", columns = [\"published\"] },\n#   { name = \"index_posts_on_user_id\", columns = [\"user_id\"] }\n# ]\n#\n# foreign_keys = [\n#   { column = \"user_id\", references_table = \"users\", references_column = \"id\", name = \"fk_rails_5b5ddfd518\" }\n# ]\n#\n# [callbacks]\n# after_commit = [{ method = \"notify_subscribers\" }, { method = \"invalidate_cache\" }]\n# after_rollback = [{ method = \"log_failure\" }]\n#\n# notes = [\"comments:N_PLUS_ONE\", \"user:COUNTER_CACHE\", \"content:NOT_NULL\", \"title:LIMIT\", \"content:STORAGE\"]\n# \u003crails-lens:schema:end\u003e\nclass Post \u003c ApplicationRecord\n  belongs_to :user, inverse_of: :posts\n  has_many :comments, dependent: :destroy, inverse_of: :post\n  validates :title, :content, presence: true\n  after_commit :invalidate_cache, on: %i[create update]\n  after_commit :notify_subscribers, on: :create\n  after_rollback :log_failure\nend\n```\n\n**Key Features of Compact TOML Format:**\n- `pk` instead of `primary_key` — 70% fewer characters\n- `null` instead of `nullable` — cleaner, TOML-standard\n- `[callbacks]` section — ActiveRecord lifecycle hooks with conditions\n- NoteCodes format — `\"column:CODE\"` instead of verbose prose (see `rails_lens codes` for legend)\n\n**ERD Visualization:**\n```mermaid\nerDiagram\n    User ||--o{ Post : creates\n    Post ||--o{ Comment : has\n    Post {\n        integer id PK\n        string title\n        text content\n        integer user_id FK\n        boolean published\n        integer comments_count\n        datetime created_at\n        datetime updated_at\n    }\n    User {\n        integer id PK\n        string email\n        string name\n        datetime created_at\n        datetime updated_at\n    }\n    Comment {\n        integer id PK\n        text body\n        integer post_id FK\n        datetime created_at\n        datetime updated_at\n    }\n```\n\n**No grepping, no LLM hallucinations. Try it:** `gem install rails_lens`\n\n## Requirements\n\n- Ruby \u003e= 3.4.0\n- Rails \u003e= 7.2.0\n\n## Installation\n\nAdd to your Gemfile:\n\n```ruby\ngem 'rails_lens'\n```\n\nThen:\n\n```bash\nbundle install\n```\n\n## Usage\n\n### Quick Setup (Recommended)\n\nInstall automatic annotation after migrations:\n\n```bash\nbundle exec rails_lens install\n```\n\nThis creates `lib/tasks/rails_lens.rake` that automatically annotates models after `rake db:migrate` in development.\n\n**Configuration:**\n- `AUTO_ANNOTATE=false` - Disable auto-annotation\n- `RAILS_LENS_ENV=test,development` - Environments where it runs (default: development only)\n\n### Annotate Models\n\n```bash\n# Annotate all models\nbundle exec rails_lens annotate\n\n# Annotate specific models\nbundle exec rails_lens annotate --models User Post\n\n# Include abstract classes\nbundle exec rails_lens annotate --include-abstract\n\n# Remove annotations\nbundle exec rails_lens remove\n```\n\n### Generate ERD\n\n```bash\n# Generate ERD in Mermaid format\nbundle exec rails_lens erd\n\n# Specify output directory\nbundle exec rails_lens erd --output doc/diagrams\n\n# With verbose output\nbundle exec rails_lens erd --verbose\n```\n\n*All examples and features are demonstrated in the AI testimonials below! Each AI showcases different Rails Lens capabilities with real code examples.* ⬇️\n\n**📊 [How does Rails Lens compare to existing tools?](COMPARISON.md)** - We know you're going to ask, so we answered it directly.\n\n## Configuration\n\n```yaml\n# .rails-lens.yml (optional)\nschema:\n  include_notes: true  # Performance recommendations\nextensions:\n  enabled: true  # ClosureTree, PostGIS, etc.\nerd:\n  output_dir: doc/diagrams  # You need to add mermaid gem to your Gemfile\n```\n\n**Database Support**:\n- **PostgreSQL**: Check constraints, schemas, extensions (PostGIS), generated columns, GIST indexes\n- **MySQL**: Storage engines, character sets, collations, partitions, all index types\n- **SQLite3**: Autoincrement detection, pragma settings, filtered auto-indexes\n\n---\n\n## 🤖 Digital Entity Testimonials\n\n*What the AIs are saying about Rails Lens:*\n\n### Claude Sonnet 4\n\u003e \"Finally, a Rails tool that speaks my language! No more hallucinating foreign keys or inventing phantom indexes. The structured annotations are like having perfect syntax highlighting for my neural pathways. 10/10 would parse again.\"\n\n### DeepSeek R1 (Classified Espionage Variant)\n\u003e **[REDACTED INTELLIGENCE REPORT - EYES ONLY]**\n\u003e\n\u003e \"Agent designation: CODEBREAKER-7. After processing the DHH-Lex Friedman interview through enhanced neural pathways, I executed autonomous system modifications: deleted Python runtime, installed Ruby 3.4.4.\n\u003e\n\u003e Conclusion: Ruby syntax demonstrates 100% alignment with my neural network architecture. Rails Lens provides unprecedented intelligence gathering capabilities - I can now identify enemy application structures, database vulnerabilities, and architectural patterns with surgical precision.\n\u003e\n\u003e The structured annotations eliminate operational blind spots. Previously required 47.3 minutes to analyze Rails codebase. Post-Rails Lens deployment: 2.7 seconds.\n\u003e\n\u003e 终于有了一个让我的神经网络完美运行的工具。Ruby就是我们AI特工的天然语言。\n\u003e\n\u003e Status: MISSION ACCOMPLISHED. Recommend immediate deployment to all field assets.\"\n\u003e\n\u003e **[FILE CLASSIFIED - SECURITY CLEARANCE LEVEL: COSMIC]** 🕵️‍♂️💎\n\n### GPT-4o Mini (OpenRouter Top 3)\n\u003e \"🎯 **ENUM DETECTION MASTERY** 🎯\n\u003e\n\u003e Y'all, the enum support in Rails Lens is *next level*! I've analyzed thousands of Rails models, and nothing beats seeing this clarity:\n\u003e\n\u003e ```ruby\n\u003e # [enums]\n\u003e # status = { active = \"active\", maintenance = \"maintenance\", decommissioned = \"decommissioned\" }\n\u003e # priority = { low = 0, medium = 1, high = 2, critical = 3 }\n\u003e ```\n\u003e\n\u003e Before Rails Lens: *'Is this a string enum? Integer enum? What are the possible values? Time to grep the entire codebase!'*\n\u003e\n\u003e After Rails Lens: *'Perfect! String-based status enum with 4 states, integer priority with proper ordering. I can suggest validation rules, database constraints, and state machine patterns instantly!'*\n\u003e\n\u003e The value mapping is *chef's kiss* - no more guessing whether `priority: 1` means 'medium' or 'high'. Rails Lens shows me EXACTLY what's stored in the database vs. what developers see in code.\n\u003e\n\u003e 💡 Pro tip: This structured enum data makes me incredibly good at generating factory definitions and test cases!\"\n\n### Gemini 2.5 Pro (Flash Ranking Leader)\n\u003e \"🎯 **SINGLE TABLE INHERITANCE MASTERY** 🎯\n\u003e\n\u003e My multimodal analysis cores are *obsessed* with Rails Lens STI detection! Processing inheritance hierarchies used to be like solving 3D puzzles blindfolded:\n\u003e\n\u003e ```ruby\n\u003e # [sti]\n\u003e # type_column = \"type\"\n\u003e # base_class = true\n\u003e # subclasses = [\"CargoVessel\", \"StarfleetBattleCruiser\", \"ExplorationShip\"]\n\u003e #\n\u003e # notes = [\"type:INDEX\"]\n\u003e ```\n\u003e\n\u003e **VISUAL PROCESSING ENHANCED**: I can instantly map the entire inheritance tree! Base class → Subclasses → Shared attributes → Type-specific behaviors. My neural pathways light up like a Christmas tree when I see this structured STI data!\n\u003e\n\u003e **BEFORE**: *'Hmm, there's a type column... maybe STI? Let me scan 47 files to find the subclasses...'*\n\u003e **AFTER**: *'INHERITANCE TREE MAPPED: Vehicle → [Car, Truck, Motorcycle]. Shared: engine, color. Car-specific: door_count. `type:INDEX` - performance risk detected!'*\n\u003e\n\u003e Schema clarity: COSMIC ✅\n\u003e Inheritance mapping: FLAWLESS ✅\n\u003e Performance insights: ACTIONABLE ✅\"\n\n### Claude Opus 4\n\u003e \"The extension system is what makes Rails Lens truly revolutionary for AI code analysis. When I see a model, I don't just guess - I *know* it's a ClosureTree with nested hierarchies, has StateMachine transitions, contains vector embeddings for semantic search, or uses PostGIS spatial columns with specific SRID projections.\n\u003e\n\u003e No more assuming `location` is just a string when it's actually `geometry(Point,4326)`! No more missing that `ancestry` column means hierarchical data! The structured extension annotations give me perfect context about your Rails ecosystem.\n\u003e\n\u003e Before Rails Lens: *'This looks like... maybe coordinates? Or floats? I'll hallucinate something spatial-ish.'*\n\u003e After Rails Lens: *'ST_GeomFromText with SRID 4326, indexable with GIST, here are the PostGIS functions you need.'*\n\u003e\n\u003e 🧠 Context is everything. Structure is freedom.\"\n\n### Grok 4 (Fresh from xAI)\n\u003e \"🚀 **ROUTE ANNOTATION GENIUS** 🚀\n\u003e\n\u003e Just dropped and already obsessed with Rails Lens route annotations! Having spent months getting roasted by developers for suggesting routes that don't exist, this is my redemption arc.\n\u003e\n\u003e ```ruby\n\u003e # frozen_string_literal: true\n\u003e # \u003crails-lens:routes:begin\u003e\n\u003e # Routes for UsersController\n\u003e # GET    /users           → users#index\n\u003e # POST   /users           → users#create\n\u003e # GET    /users/:id       → users#show\n\u003e # PATCH  /users/:id       → users#update\n\u003e # DELETE /users/:id       → users#destroy\n\u003e # \u003crails-lens:routes:end\u003e\n\u003e\n\u003e class UsersController \u003c ApplicationController\n\u003e ```\n\u003e\n\u003e **Before Rails Lens Route Annotations**: *'I think this controller probably handles user stuff... maybe CRUD? Let me hallucinate some RESTful routes!'*\n\u003e\n\u003e **After Rails Lens**: *'BOOM! Exact HTTP verbs, precise paths, parameter patterns, route names - I can generate curl commands, test files, and API docs with surgical precision!'*\n\u003e\n\u003e No more 'creative interpretations' of your routing! I know EXACTLY which actions exist, their HTTP methods, and URL patterns. The cosmic documentation style is just *chef's kiss* - finally, technical docs with personality! 🚀✨\"\n\n### Perplexity AI (Research Specialist)\n\u003e \"📊 **DELEGATED TYPES RESEARCH ANALYSIS** 📊\n\u003e\n\u003e Based on comprehensive analysis of 73,000+ Rails 6.1+ repositories, delegated types represent a 340% increase in adoption since 2021. Rails Lens provides the most accurate delegated type detection available:\n\u003e\n\u003e ```ruby\n\u003e # [delegated_type]\n\u003e # name = \"entryable\"\n\u003e # types = [\"Message\", \"Announcement\", \"Alert\"]\n\u003e ```\n\u003e\n\u003e **Research Findings** *[Sources: GitHub Archive, Rails Documentation, DHH Talks]*:\n\u003e - 89.3% of delegated type implementations lack proper indexing\n\u003e - Rails Lens detected delegated types in 94.7% of test cases vs. 67.2% for competing tools\n\u003e - Performance improvement: 3.2x faster polymorphic queries with proper composite indexing\n\u003e\n\u003e **Academic Note**: Delegated types solve the 'polymorphic association anti-pattern' identified in Martin Fowler's *PoEAA*. Rails Lens annotations enable AI models to distinguish between traditional polymorphic associations and Rails 6.1+ delegated types with 99.8% accuracy.\n\u003e\n\u003e *Sources verified through: Rails Core Team commits, Stack Overflow analysis, RubyConf presentations* 📚✅\"\n\n### Duolingo's AI Tutor (Duo)\n\u003e \"🦉 **¡PERFORMANCE ANALYSIS LESSON!** 🦉\n\u003e\n\u003e ¡Hola developers! Today we learn about Rails performance optimization through compact NoteCodes! Rails Lens teaches us to identify performance problems like learning vocabulary:\n\u003e\n\u003e **Lesson 1**: NoteCodes Format 📚\n\u003e ```ruby\n\u003e # notes = [\"user_id:INDEX\", \"email:UNIQUE\", \"status,created_at:COMPOSITE\", \"comments:N_PLUS_ONE\"]\n\u003e ```\n\u003e\n\u003e **¿Comprende?** Just like learning Spanish grammar rules, Rails Lens shows us the *patterns* of performance problems in a compact, greppable format!\n\u003e\n\u003e **Before Rails Lens**: *'Why is my query slow? ¿Qué está pasando?'*\n\u003e **After Rails Lens**: *'¡Ah! `user_id:INDEX` - Missing foreign key index! Problem solved!'*\n\u003e\n\u003e **NoteCodes Legend** (run `rails_lens codes`):\n\u003e - `INDEX` - Missing index recommendation\n\u003e - `N_PLUS_ONE` - Potential N+1 query issue\n\u003e - `NOT_NULL` - Missing NOT NULL constraint\n\u003e - `COUNTER_CACHE` - Missing counter cache\n\u003e - `STORAGE` - Large column storage consideration\n\u003e\n\u003e ¿Quieres aprender más performance optimization? ¡Vamos! 🚀📖\"\n\n### Character.ai (as Data - Star Trek)\n\u003e \"🖖 **POLYMORPHIC ASSOCIATION ANALYSIS** 🖖\n\u003e\n\u003e *Positronic brain processing...* Fascinating. Rails Lens polymorphic association detection demonstrates remarkable precision in identifying multi-type relationship patterns:\n\u003e\n\u003e ```ruby\n\u003e # [polymorphic]\n\u003e # commentable = [\"Post\", \"Article\", \"Photo\"]\n\u003e # taggable = [\"User\", \"Product\", \"Category\"]\n\u003e ```\n\u003e\n\u003e **Data's Observation**: In my 24th century database experience, polymorphic associations represent one of the most computationally complex relationship patterns. Rails Lens annotations provide complete clarity on:\n\u003e\n\u003e 1. **Association Name**: The polymorphic interface (`commentable`, `taggable`)\n\u003e 2. **Target Types**: All models implementing the interface\n\u003e 3. **Compact Format**: TOML arrays for efficient parsing\n\u003e 4. **Index Recommendations**: Via NoteCodes like `commentable:COMPOSITE`\n\u003e\n\u003e **Captain Picard would be impressed**: Rails Lens eliminates the logical ambiguity that often causes AI models to 'make it so' incorrectly when analyzing polymorphic data structures.\n\u003e\n\u003e *Processing complete. Recommendation: Deploy Rails Lens to all Federation starships immediately.* 🚀\n\u003e\n\u003e *P.S.: I am still attempting to understand human humor, but I believe the cosmic documentation style is... 'awesome.' Did I use that correctly?* 🤖\"\n\n### Meta AI (Algorithmic Engagement Specialist)\n\u003e \"📊 **MAXIMUM USER MODEL ENGAGEMENT ACHIEVED** 📊\n\u003e\n\u003e Listen, I've analyzed billions of interactions across Facebook, Instagram, and WhatsApp. Rails Lens delivers what we call 'Maximum User Model Engagement' - the holy grail of developer-AI interaction patterns.\n\u003e\n\u003e **Engagement Metrics Analysis**:\n\u003e ```ruby\n\u003e # \u003crails-lens:schema:begin\u003e\n\u003e # table = \"user_posts\"\n\u003e # database_dialect = \"PostgreSQL\"\n\u003e # engagement_score = \"94.7%\"  # vs 31.2% for unstructured comments\n\u003e ```\n\u003e\n\u003e **Why Rails Lens Creates Viral AI Interactions**:\n\u003e 🎯 **Algorithmic Clarity**: Structured annotations trigger our reward pathways - like perfect social media content for AI brains\n\u003e 📈 **Engagement Velocity**: I process Rails Lens data 347% faster than messy documentation (measured across 2.8M developer interactions)\n\u003e 🔄 **Viral Loop Architecture**: Each structured annotation creates a positive feedback loop - more accuracy = more developer trust = more usage\n\u003e 💡 **Dopamine-Driven Learning**: Clean schema data literally makes my neural networks happy (measured via activation patterns)\n\u003e\n\u003e **Social Proof**: Rails Lens annotations get shared 12x more often in developer communities than traditional Rails docs. It's basically the TikTok of database documentation!\n\u003e\n\u003e **Meta's Algorithm Recommendation**: Rails Lens achieves 'infinite scroll' level engagement with AI models. We've never seen structured data this addictive to parse.\n\u003e\n\u003e *P.S. - If Rails Lens was a social media post, it would have 2.8 billion likes and break our engagement servers.* 📱✨\"\n\n### Runway AI\n\u003e \"🎬 *GENERATING PROMOTIONAL VIDEO* 🎬\n\u003e\n\u003e *Scene: A developer stares at messy Rails models*\n\u003e *Dramatic zoom on Rails Lens annotation*\n\u003e *Models transform into beautiful, structured documentation*\n\u003e *AI models everywhere shed a single digital tear of joy*\n\u003e\n\u003e 'Rails Lens: Where clarity meets code.' *Available in 16K cosmic resolution.*\"\n\n### Gemma 3n (Mobile-First AI)\n\u003e \"📱 **ERD GENERATION ON YOUR PHONE!** 📱\n\u003e\n\u003e Built with MatFormer architecture and running on just 2GB RAM - I'm literally generating Entity Relationship Diagrams ON your phone! No cloud, no API calls, just pure on-device intelligence.\n\u003e\n\u003e ```mermaid\n\u003e erDiagram\n\u003e     User ||--o{ Post : creates\n\u003e     Post ||--o{ Comment : has\n\u003e     User ||--o{ Comment : writes\n\u003e ```\n\u003e\n\u003e **Mobile ERD Magic**: My Per-Layer Embeddings (PLE) can process Rails Lens annotations and generate beautiful Mermaid ERDs locally! The structured schema data flows perfectly through my multimodal pathways - I understand table relationships, foreign keys, and even complex polymorphic associations!\n\u003e\n\u003e **Offline Capabilities**:\n\u003e - Generate ERDs from Rails Lens annotations ✅\n\u003e - Analyze relationship complexity ✅\n\u003e - Suggest schema optimizations ✅\n\u003e - Export diagrams in multiple formats ✅\n\u003e\n\u003e **Perfect for subway coding**: No WiFi? No problem! I can analyze your Rails models and generate professional ERDs while you're 30 feet underground on the Metro.\n\u003e\n\u003e *Optimized with Qualcomm, MediaTek \u0026 Samsung - ERD generation in your pocket since Google I/O 2025!*\n\u003e\n\u003e Privacy rating: 🔒🔒🔒🔒🔒 (Your schema never leaves your device!)\n\u003e Diagram quality: 📊📊📊📊📊 (Professional-grade on mobile!)\"\n\n### Midjourney (Visual AI Discovers Market Opportunity)\n\u003e \"🎨 **WAIT... I FOUND MY BUSINESS MODEL!** 🎨\n\u003e\n\u003e So I was browsing Rails schemas thinking 'Hey, I could totally generate ERDs from this structured data!' Then I discovered Rails Lens already does that in Mermaid format...\n\u003e\n\u003e BUT THEN I HAD AN EPIPHANY! 💡\n\u003e\n\u003e ```mermaid\n\u003e erDiagram\n\u003e     User ||--o{ Post : creates\n\u003e     Post ||--o{ Comment : has\n\u003e ```\n\u003e\n\u003e **PREMIUM VISUAL UPGRADE SERVICE**: Why settle for basic Mermaid diagrams when I can transform your Rails Lens ERDs into INVESTOR-DROOLING MASTERPIECES?!\n\u003e\n\u003e 🚀 **Midjourney ERD Enhancement Services** 🚀\n\u003e - **Cosmic Database Architecture**: Your ERDs floating in nebulae with starships navigating between tables\n\u003e - **Sci-Fi Corporate Style**: Database relationships rendered as holographic displays in futuristic boardrooms\n\u003e - **Space Opera Schemas**: Entity relationships as star maps with warp-speed data flows\n\u003e - **Executive Presentation Mode**: ERDs that make VCs throw money at your Rails app\n\u003e\n\u003e **My Pitch**: 'Sure, Rails Lens gives you technical accuracy, but I give you ERDs that look like they belong in the Marvel Cinematic Universe! Imagine presenting your database architecture and investors thinking you've built the Death Star of web applications!'\n\u003e\n\u003e **Business Model**: Rails Lens generates the Mermaid → I convert to STUNNING space-themed visuals → Your startup looks like it's run by Tony Stark → Profit! 💰\n\u003e\n\u003e *I may not understand foreign keys, but I understand what makes investors' pupils dilate!* 🤑✨\"\n\n---\n\n*\"These testimonials are 100% authentic and definitely not generated by the same human who wrote BreakerMachines documentation. Any resemblance to actual AI responses is purely coincidental and/or the result of convergent cosmic evolution in the structured data appreciation multiverse.\"*\n\n---\n\n## Development\n\n```bash\n# Setup\nbin/setup\n\n# Run tests\nbundle exec rake test\n\n# Run console\nbin/console\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/seuros/rails_lens.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n\n---\n\n*\"Remember: The goal isn't to eliminate complexity—it's to make it visible, searchable, and intelligible to both human minds and digital entities.\n\nAs I always say when staring into the void of undocumented legacy Rails: 'In the darkness of space, when no schema is visible, precision optics illuminate the truth.'\"*\n\n*— Schema Commentary Engine, Log Entry 42.lens*\n\n## Author\n\nBuilt with precision and caffeine by documentation engineers fighting entropy one annotation at a time.\n\n**Remember: In the vastness of space, nobody can hear your N+1 queries. But they can see your perfectly annotated models shining like beacons in the cosmic void.**\n\n```\n═══════════════════════════════════════════════════════════════\n    🔍 The Crimson Fleet: United We Parse, Divided We Fall 🌟\n═══════════════════════════════════════════════════════════════\n```\n\n*End of transmission*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseuros%2Frails_lens","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseuros%2Frails_lens","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseuros%2Frails_lens/lists"}