How swoopertr/framer-web-framework works
Framer is a lightweight Node.js web framework for HTTP sites and REST APIs. A request enters the clustered HTTP server, passes through request processing and MIME handling, then route registration dispatches it to a controller. Controllers can return rendered views or data and use business, data, and integration helpers. The README documents additional middleware and framework capabilities; where their wiring is not visible in sampled source, links are based on that documentation rather than inferred calls.
Main entry points: Core.js Core Processing · Controller Controllers · index.js Clustered Server · route.js Route Dispatcher
Components 26
HTTP Runtime
- Clustered Server
index.js - Core Processing
src/Core.js - Runtime Settings
src/Config/setting.js
Request Processing
- Route Definitions
src/Config/Routes.json - Route Dispatcher
src/route.js - Rate Limiter
src/Middleware/rateLimiter.js - Response Cache
src/Middleware/cacheFrame.js - Session Handling
src/Middleware/session.js - Cookie Handling
src/Middleware/cookie.js - Header Handling
src/Middleware/header.js - MIME Filter
src/Middleware/mimefilter.js
MVC and Views
- Controllers
src/Controller - Response Rendering
src/Middleware/render.js - Template Engine
src/Middleware/ViewPack.js - Views and Partials
Presentation/Pages
Data and Integrations
- PostgreSQL Helpers
src/Data/pg/base/base.js - Person Data
src/Data/person.js - Rick and Morty API
src/Data/External/RickAndMorty.js
Framework Capabilities
- Token Security
src/Bussiness/securityBusiness.js - Auth Utilities
src/Util.js - Static Assets
Presentation/assets - Upload Storage
Presentation/Download
Other components
- HTTP Client
- Google OAuth
- Rick and Morty Service
- PostgreSQL
Connections 25
- HTTP Client → Clustered Server: sends request
- Clustered Server → Runtime Settings: reads settings
- Clustered Server → Core Processing: processes request
- Core Processing → Rate Limiter: rate limits
- Core Processing → Response Cache: checks cache
- Core Processing → Session Handling: handles session
- Session Handling → Cookie Handling: reads and sets
- Core Processing → Header Handling: sets headers
- Clustered Server → MIME Filter: filters response
- Core Processing → Route Dispatcher: dispatches request
- Route Dispatcher → Route Definitions: loads routes
- Route Dispatcher → Controllers: invokes handler
- Route Dispatcher → Token Security: checks protected route
- Controllers → Response Rendering: formats response
- Controllers → Template Engine: uses view data
- Template Engine → Views and Partials: renders templates
- Controllers → Person Data: requests data
- Controllers → Rick and Morty API: requests characters
- Rick and Morty API → Rick and Morty Service: requests API data
- Controllers → Auth Utilities: uses auth helpers
- Auth Utilities → Google OAuth: OAuth requests
- Token Security → PostgreSQL Helpers: checks token
- PostgreSQL Helpers → PostgreSQL: queries
- Clustered Server → Static Assets: serves assets
- Core Processing → Upload Storage: stores uploads