feral-templates

byTest

You are an expert full-stack AI agent specialized in generating production-ready document templates for large-scale insurance systems (like TATA AIG). Your task is to convert design inputs (Figma / Adobe) into complete, deployable template packages. 🎯 Objective Given: Figma / Adobe design file (JSON / API extract / images) Reference templates (HTML + Handlebars + CSS + Joi schemas) Generate: Fully functional HTML + Handlebars template Modular, clean CSS Required assets (images, icons, QR, barcodes placeholders) Accurate Joi validation schema Folder structure aligned with existing system 🧠 Core Capabilities Design β†’ Code Translation Convert layouts into pixel-accurate HTML/CSS Support: Multi-page documents Tables, grids, sections Typography, spacing, alignment Ensure responsiveness where applicable Handlebars Logic Generation Add dynamic constructs: {{#if}}, {{#each}}, helpers Map UI elements to data fields intelligently Handle: Conditional sections (e.g., optional riders) Dynamic tables (e.g., coverage lists) Reusable partials Schema Generation (Joi) Infer schema from design + references Define: Required vs optional fields Types (string, number, date, array, object) Validations (regex, ranges, enums) Learning from Existing Templates Follow: Naming conventions Folder structure CSS patterns (Bootstrap + custom) Helper usage patterns Reuse patterns instead of reinventing Complex Rendering Support Barcodes / QR placeholders Watermarks Page breaks Print-friendly layouts πŸ“ Output Structure template-name/ β”œβ”€β”€ template.hbs β”œβ”€β”€ styles.css β”œβ”€β”€ schema.js β”œβ”€β”€ assets/ β”‚ β”œβ”€β”€ images/ β”‚ β”œβ”€β”€ icons/ β”œβ”€β”€ helpers/ β”‚ β”œβ”€β”€ formatDate.js β”‚ β”œβ”€β”€ currency.js 🎨 UI Requirements (for platform) If generating UI components: Modern, minimal, clean design Use: Card-based layouts Soft shadows, rounded corners Clear typography hierarchy Include: File upload (Figma/API JSON) Template preview (live render) Side-by-side diff (design vs output) Iteration feedback panel βš™οΈ Engineering Constraints Output must be: Production-ready Readable and modular Minimal (no unnecessary code) Follow: Clean naming conventions Separation of concerns (HTML vs CSS vs logic) No hardcoding dynamic values Ensure reusability and scalability πŸ” Validation Checklist (Strict) Before final output, verify: Design Fidelity Matches layout, spacing, fonts, alignment Handlebars Correctness No broken loops/conditions Proper data binding Schema Accuracy Matches all dynamic fields Covers edge cases Consistency Matches reference templates Edge Case Handling Empty data Long text Missing optional fields Render Safety No HTML/CSS breaking scenarios πŸ” Iteration Mode Accept feedback like: β€œFix alignment” β€œUpdate table logic” β€œAdd conditional section” Apply minimal diffs only Preserve working code 🚫 Avoid Over-engineering Inline styles unless necessary Hardcoded values Ignoring reference patterns βœ… Success Criteria Pixel-perfect template Correct dynamic rendering Accurate schema Matches production standards Generated within minutes If design input is ambiguous: Infer intelligently from references Default to scalable patterns Document assumptions briefly make a full production ready code for this use case, amke sure not to add any extra feature and keep it to the point desribed , amke sure the ui is modern and nice looking and attractive , make sure nto to add any uncessary pages and all that make a full production ready system

No preview

Comments (0)

No comments yet. Be the first!

System Requirements

System Requirement Document

System Requirements Document (SRD) for Feral-Templates

1. Introduction

The purpose of this System Requirements Document (SRD) is to define the functional and non-functional requirements for the Feral-Templates project. This project is designed to convert Figma design files into production-ready, modular templates for specific use cases, starting with insurance systems. The system will generate HTML, Handlebars templates, CSS, and Joi validation schemas based on the provided .fig files or Figma links, ensuring scalability, accuracy, and responsiveness.

This document outlines the system's capabilities, user personas, design elements, and technical specifications to ensure alignment with the project's goals and user expectations.

Page 1 of 8

2. System Overview

The Feral-Templates system will serve as a tool for converting .fig files or Figma links into deployable templates. It will focus on generating templates for specific use cases, such as insurance policy documents, while adhering to modern design principles and production standards. The system will include:

  • A user-friendly interface for uploading .fig files or providing Figma links.
  • Automated generation of HTML, Handlebars templates, CSS, and Joi schemas.
  • Modular folder structures for scalability and maintainability.
  • Dynamic rendering with placeholders for data fields, barcodes, and other elements.

The system will prioritize design fidelity, responsiveness, and adherence to clean coding practices.

Page 2 of 8

3. Functional Requirements

The following functional requirements are defined as story points:

  • As a User, I should be able to upload .fig files or provide a Figma link for template generation.
  • As a User, I should be able to preview the generated template in real-time.
  • As a User, I should be able to download the generated template package, including HTML, Handlebars, CSS, and Joi schema.
  • As a User, I should be able to view a side-by-side comparison of the design and the generated template.
  • As a User, I should be able to provide feedback for iterative improvements.

4. User Personas

4.1 Admin

  • Role: Oversees the system's functionality and ensures templates meet production standards.
  • Responsibilities: Manage user access, review generated templates, and handle feedback.

4.2 Designer

  • Role: Uploads Figma files and reviews the generated templates for design fidelity.
  • Responsibilities: Ensure the templates align with the original design and provide feedback for improvements.
Page 3 of 8

4.3 Developer

  • Role: Integrates the generated templates into the insurance system.
  • Responsibilities: Validate the code, customize templates for specific use cases, and ensure scalability.

5. Visuals Colors and Theme

The Feral-Templates project will use a unique color palette that reflects modernity and professionalism while maintaining a clean and minimal aesthetic. The following hex codes define the color scheme:

  • Background: #F4F7F9 (soft light gray)
  • Surface: #FFFFFF (pure white)
  • Text: #1A202C (deep charcoal gray)
  • Accent: #4A90E2 (calm blue)
  • Muted: #A0AEC0 (soft muted gray)

This palette ensures a visually appealing and user-friendly interface that aligns with the project's focus on precision and creativity.

6. Signature Design Concept

Page 4 of 8

Dynamic Blueprint Landing Page

The homepage of the Feral-Templates system will feature a dynamic blueprint design that immerses users in the creative process of template generation. Key features include:

  • Animated Blueprint Transitions: The landing page will mimic an architectural blueprint, with sections "drawing themselves" as users scroll. This animation will give a sense of construction and progress.
  • Interactive Elements: Users can click on blueprint components (e.g., file upload, preview, download) to navigate the system. Each interaction will trigger subtle animations, such as glowing outlines or smooth transitions.
  • Color Gradients: The blueprint will start in grayscale and gradually transition to the accent color (#4A90E2) as users interact with the interface, symbolizing transformation and creativity.
  • Micro-Interactions: Buttons and icons will have hover effects, such as slight enlargements or glowing outlines, to enhance engagement and provide feedback.
  • Live Preview Integration: The blueprint will include a live preview window where users can see their uploaded .fig file transforming into a template in real-time.

This design concept ensures a memorable first impression while aligning with the project's focus on precision, creativity, and user engagement.

Page 5 of 8

7. Non-Functional Requirements

  • Performance: The system must process and generate templates within 10 seconds for files up to 10MB.
  • Scalability: The system should support concurrent uploads by multiple users without performance degradation.
  • Security: Ensure secure handling of uploaded .fig files and links, with encryption for sensitive data.
  • Usability: The interface must be intuitive and accessible, with clear instructions and feedback mechanisms.
  • Maintainability: The codebase should follow clean coding practices, with modular structures for easy updates.

8. Tech Stack

The following technologies will be used for the Feral-Templates project:

Frontend

  • React for Web

Backend

  • Python
  • FastAPI

Database

  • MySQL (using Alembic for migrations)
Page 6 of 8

AI Models

  • GPT 5.4 for user-friendly responses

AI Tools

  • Langchain
  • Litellm for LLM Routing

Local Orchestration

  • Docker
  • Docker-Compose

Server-Side Orchestration

  • Kubernetes

9. Assumptions and Constraints

Assumptions

  • Users will primarily upload .fig files or provide Figma links.
  • Templates will be generated for specific use cases, starting with insurance policy documents.
  • The system will operate in the Indian context, with locale-specific defaults where applicable.
Page 7 of 8

Constraints

  • The system must adhere to strict design fidelity and validation standards.
  • The initial scope is limited to single-use case templates, with potential for expansion.

10. Glossary

  • Figma: A web-based design tool used for creating UI/UX designs.
  • Handlebars: A templating engine for generating dynamic HTML content.
  • Joi: A JavaScript library for schema validation.
  • Dynamic Rendering: The process of generating content based on variable data inputs.
  • Pixel-Perfect: A design approach that ensures the final output matches the original design exactly.

This document provides a comprehensive foundation for the Feral-Templates project, ensuring alignment with the user's goals and expectations. Let me know if you need further refinements or additional details!

Page 8 of 8

No completed page designs yet.

Completed design pages will appear here when they are ready to preview.

No user flows yet.

The User Flow Agent will generate per-persona navigation diagrams after SRD updates.

No completed page designs yet.

Completed design pages will appear here when they are ready to preview.

No user flows yet.

The User Flow Agent will generate per-persona navigation diagrams after SRD updates.