How dennis1088/diceware-web works
Main Components
a. Web Application Layer:
• Sinatra Web Server (indicated by app.rb and config.ru)
• Views Engine (ERB templating, shown by views/index.erb)
• Static Asset Handler (public directory)
b. Core Logic Layer:
• Diceware Gem (external dependency)
• Application Logic (app.rb)
c. Client-Side Layer:
• JavaScript Components (public/js)
• CSS Styling (public/css)
[Client Browser] → [Web Application Layer] → [Core Logic Layer]
Detailed Component Breakdown
Client Layer (Blue):
┌─────────────────────┐
• Client Browser │
• ┤
• HTML/ERB Views │
• CSS (main.css) │
• JavaScript │
• (main.js, │
• plugins.js) │
• ┘
Web Application Layer (Green):
┌─────────────────────┐
• Sinatra Server │
• ┤
• Routes (app.rb) │
• View Engine (ERB) │
• Static Assets │
• ┘
Core Logic Layer (Yellow):
┌─────────────────────┐
• Diceware Service │
• ┤
• Passphrase │
• Generation │
• Word List Access │
• ┘
Flow Indicators
• HTTP requests from client to server
• Data flow between components
• Dependencies between layers
Technical Details to Highlight
• Rack-based architecture (config.ru)
• Static file serving configuration
• Test suite integration (test directory)
• Asset organization (public directory structure)