Skip to content
Sandip1230Public

About

An AI-augmented dynamic form engine that uses an LLM to parse unstructured text and automatically pre-fill complex, schema-driven React interfaces.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

                                     Forma AI:  AI-Augmented Dynamic Form Engine

📖 Overview

Forma AI tackles the challenge of managing massive, branching forms in large organizations like Insurance and Healthcare. Building these dynamically in React and managing the complex validation state in MongoDB is notoriously difficult, and adding AI to interpret unstructured user input makes it exponentially harder.

This project modernizes legacy data entry by creating a seamless, AI-augmented user experience.

🚀 Use Case

Instead of filling out dozens of strict dropdowns, users can file complex insurance claims using natural language, such as typing a paragraph about an incident. The system's backend LLM parses this unstructured text and automatically pre-fills the structured React form fields.

Based on a complex JSON schema stored in MongoDB, the React UI dynamically reveals only the remaining, necessary questions, drastically reducing form friction.

💻 Tech Stack & Key Modules

This application utilizes a highly scalable architecture for managing unstructured data and complex business rules:

  • Frontend (React & React Hook Form): A Dynamic Form Renderer capable of generating complex, nested UIs dynamically entirely from a backend JSON schema.

  • State Management (Redux / Zustand): Manages the complex, deeply nested state of the form as the user interacts with it.

  • Backend & AI Pipeline (Node.js & LangChain): An LLM Extraction API uses an LLM (like GPT-4o or a local model) to parse unstructured user text and map it to the strict JSON schema required by the form.

  • Database (MongoDB): A Schema Store stores the rules, validation logic, and branching paths for hundreds of different form types.

Technical Highlights

  • Advanced React Patterns: Heavy use of custom hooks, complex state management, and Dynamic UI generation.

  • Beyond CRUD: Utilizes AI pipelines for unstructured data parsing.

  • Scalable Node.js: Structures Express APIs using enterprise patterns rather than monolithic, tightly coupled routes.

  • Complex Data Modeling: Designs MongoDB schemas that handle deeply nested JSON trees, proving NoSQL mastery.

                                                Setup
    

1. Navigate to the project root

Wherever you cloned the repo — it should contain server.js, models/, routes/, and client/ directly.

2. Backend setup (first time only, or after adding new dependencies)

  • npm install
  • Create a .env file (see .env.example) with real values — MongoDB connection string, JWT_SECRET, GOOGLE_API_KEY, Gmail SMTP credentials for OTP emails, etc.
  • If you're pointing at a local MongoDB instead of Atlas, make sure it's running (Compass, the Windows service, or mongod — whichever you set up).

3. Seed the demo form (only needed once, or after you change the schema)

  • npm run seed:demo
  • Should print Seeded form: claim-demo.

4. Start the backend

  • npm run dev
  • Watch for MongoDB connected and Forma AI server listening on port 5000.

5. In a second terminal, start the frontend

6. Open it

Quick Review

  • PORT=5000
  • FRONTEND_ORIGIN=http://localhost:5173
  • MONGODB_URI=mongodb://127.0.0.1:27017/forma-ai
  • GOOGLE_API_KEY=your-gemini-api-key

Thank You

About

An AI-augmented dynamic form engine that uses an LLM to parse unstructured text and automatically pre-fill complex, schema-driven React interfaces.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages