How krzysztofmarciniak/mrs-funding-software works
Main Components
a) Frontend Layer:
• Static content delivery (HTML/CSS)
• Theme management system
• View templates (located in src/views)
• No JavaScript (as highlighted in features)
b) Backend Layer:
• Rust-based web server
• Controller layer (src/controllers)
• Middleware components (CSRF protection)
• Route handling (src/routes.rs)
c) Data Layer:
• SQLite database
• Database interface (src/db.rs)
d) Infrastructure:
• Nginx reverse proxy with WAF
• Docker containerization
• Environment configuration
┌─────────────────────────────────────────────┐
• Client Layer │
• ┘
• ↓
┌─────────────────────────────────────────────┐
• Nginx Reverse Proxy │
• (with ModSecurity WAF) │
• ┘
• ↓
┌─────────────────────────────────────────────┐
• Rust Application │
• ┬─────────────────────┐
• View Layer │ Controller Layer │
• (Templates) │ (Route Handlers) │
• ┴─────────────────────┤
• Middleware (CSRF) │
• ┤
• Database Interface │
• ┘
• ↓
┌─────────────────────────────────────────────┐
• SQLite Database │
• ┘
Important Flows to Highlight
a) Authentication Flow:
• Login controller (src/controllers/login.rs)
• CSRF protection (src/middleware/csrf.rs)
• Session management
b) Campaign Management Flow:
• Campaign creation/management (src/controllers/campaigns.rs)
• Dashboard interactions (src/controllers/dashboard.rs)
c) Theme Management Flow:
• Theme selection (src/views/themes/theme_manager.rs)
• CSS delivery system
Additional Details
• View blocks (footer, header, head)
• Theme management
• Controller interactions
• Route mapping