Dynaman is a Proof of Concept (PoC) project designed to demonstrate the architecture and implementation of unfixed, dynamic schemas—a core pattern found in modern NoCode/LowCode platforms.
Unlike traditional applications with hard-coded database models, Dynaman allows users to define data structures (Entities/Schemas) at runtime. The system dynamically generates validation logic and API endpoints to support these user-defined structures without requiring code changes or deployments.
The primary goal is to showcase how to handle User-Defined Requirements where the data shape is not known at compile time. This is achieved through:
- Metadata-Driven Architecture: Storing schema definitions (Metadata) separately from the actual data (Execution Data).
- Dynamic Pydantic Models: Constructing Python classes and validation rules on-the-fly based on stored metadata.
- Schemaless Storage: Utilizing MongoDB's flexibility to store variable content while enforcing strict application-level validation.
- Language: Python 3.13+
- Framework: FastAPI (Async web framework)
- Database Driver: Motor (Async MongoDB driver)
- Validation: Pydantic (Dynamic model creation)
- Architecture: Clean Architecture / Domain-Driven Design (DDD).
- Language: Python 3.13+
- Framework: FastAPI
- Security: JWT (JSON Web Tokens), Role-Based Access Control (RBAC)
- Containerization: Docker & Docker Compose
- Gateway: Nginx (Reverse Proxy)
- IaC: Terraform (Infrastructure as Code)
- Cloud Provider: AWS (ECS Fargate/EC2, ALB, ECR, CodePipeline)
- Framework: React (with Vite)
- Language: TypeScript
- Styling: Tailwind CSS
- UI Components: shadcn/ui
- State/Data: React Hooks, Axios
- Schema Editor: specific UI to define new Entities (e.g., "Product", "Employee") with custom fields.
- Supported Field Types:
- String, Number, Boolean
- Date (with validation)
- Reference (Link to other dynamic entities)
- Dynamic CRUD API: Automatically generated REST endpoints for every defined entity.
- Data Explorer: Generic data grid to view, search, edit, and delete records for any entity.
- Runtime Validation: Robust data integrity checks based on user-defined rules (Required fields, Data types).
- Microservices Architecture: Split system into
engine(Core),auth-service(Identity), anddynaman-ui. - API Gateway: Implemented Nginx reverse proxy to route traffic (
/api/v1/schemas→ engine metadata,/api/v1/data→ engine execution,/api/v1/auth→ auth-service). - Authentication & Security:
- Dedicated Auth Service handling Login and Token management.
- JWT (JSON Web Token) implementation for secure stateless auth.
- RBAC (Role-Based Access Control) with roles:
SYSTEM_ADMIN,USER_ADMIN,USER.
- Docker Integration: Full
docker-compose.ymlsetup for orchestrating services.
dynaman/
├── auth-service/ # [NEW] Authentication Microservice
│ ├── api/ # Auth Routes
│ ├── domain/ # User Entities & Security Logic
│ └── main.py # Auth Entry point
│
├── engine/ # Python Backend (Core)
│ ├── api/ # FastAPI Routers
│ ├── execution_context/ # Handling runtime Data Records
│ ├── metadata_context/ # Handling Schema definitions
│ └── main.py # Entry point
│
├── dynaman-ui/ # React Frontend
│ ├── src/
│ │ ├── components/ # UI Components
│ │ ├── pages/ # Application Views
│ │ └── context/ # [NEW] AuthContext
│
├── infrastructure/ # [NEW] Terraform & AWS Configuration
│ ├── terraform/ # IaC Definitions
│ └── README.md # Deployment Guide
│
├── docker-compose.yml # [NEW] Container Orchestration
└── nginx-gateway.conf # [NEW] API Gateway Config
- Python 3.13+
- Node.js 18+
- MongoDB (Running locally or via Docker)
- Navigate to
engine:cd engine - Create and activate virtual environment:
python -m venv .venv source .venv/bin/activate # or .venv\Scripts\activate on Windows
- Install dependencies:
pip install -r requirements.txt
- Run the server:
API will be available at
fastapi dev main.py
http://localhost:8000.
- Navigate to
dynaman-ui:cd dynaman-ui - Install dependencies:
npm install
- Start development server:
UI will be available at
npm run dev
http://localhost:5173.
This project is for educational and demonstration purposes.
This project was totally developed by GCA (Gemini Code Assist).