How prosamik/prosamik-server works
Main Components
a. External Layer:
• Client Applications (showing incoming HTTP requests)
• GitHub Authentication Service
• Static File Storage
• PostgreSQL Database
b. Application Core Layers:
Router Layer
• API Routes
• Admin Routes
• Blog Routes
• Newsletter Routes
• Project Routes
• Analytics Routes
Middleware Layer
• Authentication Middleware
• Rate Limiter
• General Middleware
Handler Layer
• Blog Handlers
• Project Handlers
• Newsletter Handlers
• Analytics Handlers
• Admin Handlers
• Feedback Handlers
• Markdown Handlers
Service Layer
• Authentication Services (JWT & GitHub)
• Markdown Parser Service
• Markdown Fetcher Service
Repository Layer
• Blog Repository
• Project Repository
• Newsletter Repository
• Analytics Repository
Component Relationships
• External clients → Router Layer
• Router Layer → Middleware Layer
• Middleware Layer → Handler Layer
• Handler Layer → Service Layer
• Handler Layer → Repository Layer
• Repository Layer → PostgreSQL Database
• Authentication Services → GitHub External Service
Technical Details to Highlight
• JWT Authentication flow
• GitHub OAuth integration
• Rate limiting mechanism
• Markdown processing pipeline
• Database interaction patterns
• Template rendering system
Additional Elements
• Version/environment configuration flow
• Error handling patterns
• Monitoring/logging points
• Public vs. private APIs
• Presentation layer (handlers)
• Business logic (services)
• Data access (repositories)
• External interfaces (auth, database)