A project for generating HTML forms and related code from OpenAPI specifications using a custom OpenAPI generator.
Form Builder is a toolkit for automatically generating form-related code from OpenAPI specifications. It provides a streamlined workflow for creating consistent, validated forms across frontend and backend systems.
The project uses a custom OpenAPI generator to produce:
- TypeScript models
- Angular components and HTML templates
- Java backend code
A demo of the Form Builder project is available at Form Builder.
This approach ensures consistency between frontend and backend validation, reduces manual coding effort, and maintains a single source of truth in the OpenAPI specification.
The project consists of the following modules:
This module contains the OpenAPI specifications that define the data models and API endpoints. These specifications serve as the source of truth for generating code.
Key features:
- Structured YAML files defining API schemas, paths, and components
- Support for tenant and client management APIs
- Reusable components for common data structures
This module contains custom code generators that extend the standard OpenAPI generator functionality. These generators produce code tailored to the platform's needs.
Key features:
- Custom Spring code generator for backend Java code
- Custom TypeScript Angular generator for frontend components
- Support for Firestore document models
- Custom Mustache templates and lambdas for code generation
This module contains the Angular web application that provides a user interface for creating and managing forms.
Key features:
- Questionnaire Builder for creating and configuring custom forms
- Real-time form preview functionality
- Drag-and-drop interface for organizing questions
- Support for various question types and validation rules
- Conditional questions based on previous answers
The Questionnaire Builder interface includes:
To use this project, you'll need:
- Java 23
- Maven 3.x
- Node.js and npm (for Angular components)
mvn clean installTo generate code from the OpenAPI specifications, use the Maven build process or the OpenAPI Generator CLI with the custom generators.
This project is licensed under a proprietary license owned by Spectrayan. The code is provided for demonstration purposes only and cannot be replicated or used for any other purpose without explicit permission.
See the LICENSE file for full details.
For questions or support, contact bharatnj@outlook.com


