How da-upm/participa works
Main Components
a) Frontend Layer:
• Views (Templates) Component
• EJS template structure
• Static assets (JS, CSS, images)
• Client-side Authentication Component
• Autoscript.js integration for client authentication
b) Backend Layer:
• Controller Layer
• Admin Controller
• Commitment Controller
• Proposal Controller
• Question Controller
• User Controller
• Views Controller
c) Model Layer:
• Data Models
• User
• Candidate
• Commitment
• Proposal
• Question
• Parameter
d) External Services:
• Email Service (indicated by email templates)
• Authentication Service
• PDF Generation Service (LaTeX integration)
Architecture Pattern
[Client Browser] ←→ [Views Layer (EJS Templates)]
• ↕
[Controllers Layer]
• ↕
[Models Layer] ←→ [Database]
Key Relationships to Highlight
• Flow from routes through controllers to models
• Template rendering process
• Demonstrate email notification system
• PDF generation workflow
• Authentication flow
Additional Elements
• Docker container boundaries (indicated by Dockerfile and docker-compose.yaml)
• OpenAPI integration (indicated by openapi.yaml)
• Demonstrate static asset serving
• Error handling flow
[Client Layer]
• ↓
[Application Container]
• [Web Server]
• [Template Engine]
• [Controllers]
• [Models]
• [Services]
• [Email Service]
• [PDF Service]
• [Auth Service]
Important Notes
• Use clear labels for all components
• Notes for important configurations or dependencies
• Relationship between different template fragments
• Flow of proposal management