How mroth/unindexed works
Main components
• Application Server – represented by files like index.js (the main entry point), config.js, helpers.js, and comments.js. This is where the primary web logic, routing, and request handling reside.
• View Layer – the “views” directory contains ECT template files (alive.ect, dead.ect, and a CSS template) that render what the visitor sees.
• In-Memory Data Store – Redis is used to temporarily store content (as indicated by the README’s explanation on memory-only content storage and disabled backups).
• Content Loading Module – the load_content.js script is responsible for importing content from an encrypted file (from an external partition) into the in‑memory store at startup.
• Automated Scripts – additional scripts (query.js, reset.js, stats.js) likely serve as background tasks:
• query.js probably continuously checks Google search results.
• reset.js might reinitialize or wipe data (for testing or recovery).
• stats.js could be used for gathering runtime or usage statistics.
• Deployment & Environment Configuration – the project is designed to run on platforms like Heroku (as seen with notes for generating random hostnames, Heroku add-ons for Redis, scheduled tasks, etc.).
Relationships and Interactions
• The Application Server handles incoming HTTP requests (from visitors) and renders views using the ECT templates.
• The server interacts with Redis to load and retrieve ephemeral content including user-contributed comments.
• A dedicated background process (or scheduled task) running the query.js script monitors Google search results. When an index is detected, it triggers a deletion process that clears the Redis contents and effectively “kills” the site.
• The content-loading process ensures that initial website content is loaded from a secure, encrypted source and that it is only available in volatile memory.
• External monitoring might interact with a /status endpoint to verify the site’s health.
Architectural Patterns and Design Principles
• Ephemeral Storage & Stateless Content: The architecture is built around temporary in‑memory data storage (using Redis) without persistent backups.
• Decoupled Background Tasks: Maintenance tasks (automatic indexing detection, content reset, statistics collection) are handled by separate scripts, suggesting a decoupled design from the main request/response cycle.
• Deployment Environment Segregation: The README suggests environment variables and scheduled scripts to orchestrate behavior, showing a separation between application logic and operational/DevOps configurations.
• Security & Privacy: The use of an encrypted partition for loading initial content and immediate data purging aligns with principles of data minimization and security.