Skip to content

bharatnj/form-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Form Builder

A project for generating HTML forms and related code from OpenAPI specifications using a custom OpenAPI generator.

Overview

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

Demo

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.

Project Structure

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:

A list of questions organized by groups A form for adding and editing questions A real-time preview of the form

Getting Started

To use this project, you'll need:

  • Java 23
  • Maven 3.x
  • Node.js and npm (for Angular components)

Building the Project

mvn clean install

Generating Code

To generate code from the OpenAPI specifications, use the Maven build process or the OpenAPI Generator CLI with the custom generators.

License

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.

Contact

For questions or support, contact bharatnj@outlook.com

About

Form builder using Custom OpenAPI Generator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors