How omurilo/shareless works
Main Components Identification
a) Web Layer
• Located in /web directory
• Handles HTML templates and user interface
• Entry point through web/main.go
b) API Layer
• Located in /api directory
• Handles REST endpoints for secret sharing
• Contains handler logic for share operations
c) Core Components
• Located in /internal and /pkg directories
• Database operations (Redis integration)
• Cipher operations for encryption/decryption
• HTTP server implementation
[Client Layer]
• ▼
[Load Balancer/Reverse Proxy (Optional)]
• ▼
[Web Server Layer]
• Template Engine
• Static Assets
• ▼
[API Layer]
• Share Handler
• Shared Handler
• ▼
[Core Services]
• Cipher Service
• Database Service
• ▼
[Data Store]
• Redis
Component Relationships
• Client → Web Server: HTTP/HTTPS requests
• Web Server → API Layer: Internal routing
• API Layer → Core Services: Business logic calls
• Core Services → Redis: Data persistence
• Cipher Service ←→ Share/Shared Handlers: Encryption/Decryption operations
Additional Elements
a) Security Layer:
• Encryption/decryption flow
• Token validation process
• Temporary storage mechanism
b) Data Flow:
• Secret submission path
• Secret retrieval path
• Expiration handling
Technical Details to Highlight
• Redis integration for temporary storage
• Token-based access control
• Configurable expiration mechanism
• Template-based web interface
Specific Implementation Notes
• The separation between web and API layers
• The central role of the cipher package
• The stateless nature of the application
• The temporary storage mechanism in Redis
Maintain clear boundaries between
• Presentation layer (web templates)
• Application layer (API handlers)
• Business logic layer (internal packages)
• Data layer (Redis)
Security flows
• Secret encryption/decryption paths
• Token generation and validation
• Expiration mechanism
Scalability potential
• Stateless design
• Redis as a centralized store
• Container-based deployment
Monitoring points
• Health checks
• Metrics collection
• Logging interfaces