How twinlogix/mondrian-framework works
Project type and purpose
• This is an open-source, TypeScript monorepo implementing the “Mondrian” backend framework.
• It provides a modular core (model, module), protocol adapters (REST via Fastify, GraphQL via Yoga), build-time tools (CLI, CI tools), AWS Lambda wrappers, and example+docs.
• Its purpose is to let developers declare type-safe data models and service functions, then automatically expose them as OpenAPI, GraphQL, Protobuf, Lambda, cron jobs, etc., without code generation.
File structure
• Top-level: configuration (ESLint, Prettier, Dockerfile, GitHub Actions), changelog manager, and high-level docs/assets.
• packages/ group:
• Core packages:
– @mondrian-framework/model (data typing/encode/decode)
– @mondrian-framework/module (function definition, dependency injection, security)
• Protocol adapters:
– @mondrian-framework/rest-fastify
– @mondrian-framework/graphql-yoga
– aws-lambda-rest, aws-lambda-sqs, aws-sqs, cron, direct
• Tooling:
– cli-commander, cli, ci-tools
– utils (shared helpers)
• Documentation and examples:
– example (template project with Prisma integration)
• Configuration and build orchestrator: Vite, tsconfig.json, package.json (workspace), Dockerfile for containerized spin-up, GitHub workflows for CI and docs deployment.
Key architectural insights from README
• Core design is “define model → define functions → build module → bind to transports → serve”.
• Emphasizes plugin-style architecture: providers for DI, automatic OpenAPI/GraphQL generation, security policies layered into function execution.
• Example shows integration with Prisma, Fastify, GraphQL Yoga, OpenTelemetry.