cosmic-templates

byumang suthar

Use Case 1: Automated HTML / Handlebars Template Generation from Design Files 1. Context We operate a large-scale document generation platform that produces insurance policy and customer communication documents across more than 20 lines of business. These include policy schedules, endorsements, renewals, cancellations, certificates, quotes, claim forms, and related artifacts. 2. Current Template Landscape Our platform consists of over 1,000 active document templates, each built using HTML with Handlebars templating, CSS, image assets, and input validation schemas. Templates vary significantly in complexity and are tightly coupled with product logic, branding, and regulatory requirements. 3. Technical Characteristics • Templating: HTML with Handlebars (conditionals, loops, helpers) • Styling: Template-specific CSS, shared Bootstrap styles, inline styles • Validation: Joi-based Node.js schemas per template • Complexity: Multi-page layouts, conditional sections, dynamic tables, barcodes, QR codes, watermarks 4. Current Challenges Template creation is a manual and time-intensive process. Each new template typically requires 2–5 days of developer effort. Ensuring pixel-perfect accuracy, maintaining consistency with existing patterns, and managing frequent design changes across hundreds of templates introduce significant operational overhead. 5. Desired AI Agent Capabilities We want to evaluate whether your AI agent can automatically generate production-ready templates from Figma or Adobe design files, including HTML, CSS, assets, and Joi schemas. The agent should learn from our existing templates, adhere to our coding and folder conventions, handle complex layouts, and support iterative feedback-driven refinement. 6. Evaluation Criteria Design fidelity, correctness of Handlebars logic, schema accuracy, learning from existing templates, iteration speed, edge-case handling, and ease of integration into our CI/CD pipeline. 7. Proof of Concept / Demo We can provide 3–5 sample designs and reference templates. We request your team to generate complete template folders and demonstrate accuracy, turnaround time, and iteration workflow.

Landing
Landing

Comments (0)

No comments yet. Be the first!

System Requirements

System Requirement Document
Page 1 of 6

System Requirements Document (SRD)

Project Name: cosmic-templates

1. Introduction

The cosmic-templates project aims to revolutionize the process of generating HTML/Handlebars templates for document generation by leveraging AI capabilities. This initiative is designed to address the challenges faced by large-scale document generation platforms, such as manual effort, time consumption, and maintaining design fidelity across hundreds of templates. By automating template creation from design files (e.g., Figma, Adobe), cosmic-templates will streamline workflows, enhance accuracy, and reduce operational overhead for businesses like Umang Suthar's organization in India.

This document outlines the system requirements for the cosmic-templates project, including functional and non-functional requirements, user personas, visual design concepts, and technical specifications.

Page 2 of 6

2. System Overview

The cosmic-templates system will serve as an AI-driven platform capable of automatically generating production-ready HTML/Handlebars templates from design files. It will learn from existing templates, adhere to coding conventions, and handle complex layouts, including conditional sections, dynamic tables, and regulatory requirements.

Key features include:

  • Automated conversion of Figma/Adobe designs into HTML, CSS, and Joi validation schemas.
  • Support for iterative feedback-driven refinement of templates.
  • Seamless integration into existing CI/CD pipelines.
  • High design fidelity and adherence to branding and regulatory standards.

The system will cater to multiple user personas, including developers, designers, and business stakeholders, ensuring a user-friendly and efficient workflow.

3. Functional Requirements

  • As a Developer, I should be able to upload Figma or Adobe design files to generate templates.
  • As a Developer, I should be able to review and refine generated templates iteratively.
  • As a Designer, I should be able to ensure design fidelity in the generated templates.
  • As a Business Stakeholder, I should be able to validate that templates meet regulatory and branding requirements.
  • As a Developer, I should be able to integrate the generated templates into the CI/CD pipeline seamlessly.
  • As a Developer, I should be able to customize Joi validation schemas for edge cases.
  • As a Designer, I should be able to preview templates in a browser for pixel-perfect accuracy.

4. User Personas

Page 3 of 6

1. Developer

  • Role: Responsible for integrating templates into the document generation platform.
  • Goals: Automate template creation, ensure correctness of logic, and streamline CI/CD integration.
  • Pain Points: Manual template creation is time-consuming and error-prone.

2. Designer

  • Role: Creates design files and ensures design fidelity in templates.
  • Goals: Maintain pixel-perfect accuracy and branding consistency.
  • Pain Points: Difficulty translating designs into code manually.

3. Business Stakeholder

  • Role: Ensures templates meet regulatory and branding standards.
  • Goals: Validate compliance and reduce operational overhead.
  • Pain Points: Frequent design changes and regulatory updates.

5. Visuals Colors and Theme

The cosmic-templates project will adopt a unique, futuristic color palette to reflect its cutting-edge AI-driven capabilities.

  • Background: #1A1A2E (Deep Space Blue)
  • Surface: #16213E (Midnight Navy)
  • Text: #EAEAEA (Soft White)
  • Accent: #FF6F61 (Cosmic Coral)
  • Muted Tones: #4E4E50 (Charcoal Gray)

This palette conveys a sense of innovation, professionalism, and clarity, aligning with the project's goals.

Page 4 of 6

6. Signature Design Concept

The cosmic-templates homepage will feature an interactive galaxy map where each star represents a feature or section of the platform.

Key Features:

  • Dynamic Galaxy Animation: The homepage will display a 3D galaxy with stars that users can hover over or click to explore features like "Upload Design Files," "Generated Templates," and "Feedback Iteration."
  • Interactive Micro-Interactions: Stars will pulse gently, and clicking on a star will zoom into a specific feature, accompanied by a smooth transition animation.
  • Color Shifts: The galaxy background will subtly shift colors based on the time of day, creating a living, immersive experience.
  • Floating Tooltips: Hovering over stars will display tooltips with brief descriptions of features.
  • Responsive Design: The galaxy map will adapt seamlessly to different screen sizes, ensuring a consistent experience across devices.

This bold and eccentric design will make the platform instantly fascinating and memorable, setting it apart from traditional enterprise tools.

7. Non-Functional Requirements

  • The system must process design files and generate templates within 5 minutes.
  • The system must support at least 1,000 concurrent users.
  • The system must ensure 99.9% uptime.
  • The system must comply with GDPR and other relevant data protection regulations.
  • The system must provide detailed error logs for debugging.

8. Tech Stack

Frontend

  • React for Web
Page 5 of 6

Backend

  • Python
  • FastAPI

Database

  • MySQL (with Alembic for migrations)

AI Models

  • GPT 5.4 for user-friendly responses
  • Claude 4.6 Opas for academic or coding work

AI Tools

  • Litellm for LLM Routing
  • Langchain

Local Orchestration

  • Docker
  • docker-compose

Server-Side Orchestration

  • Kubernetes
Page 6 of 6

9. Assumptions and Constraints

  • Design files will include sufficient metadata to infer conditional logic and validation schemas.
  • The system will primarily support Figma and Adobe design files.
  • Users will provide feedback iteratively to refine templates.
  • The system will operate in the IST (Indian Standard Time) timezone.

10. Glossary

  • Handlebars: A templating engine for generating HTML dynamically.
  • Joi: A JavaScript library for schema validation.
  • CI/CD: Continuous Integration/Continuous Deployment pipeline.
  • Figma/Adobe: Design tools used for creating UI/UX designs.
  • Pixel-Perfect Accuracy: Ensuring the generated template matches the design exactly.
Landing design preview
Landing: Explore Features
Login: Sign In
Dashboard: View Reports
Templates: Browse Library
Template: Review Compliance
Template: Approve Template
Reports: Track Usage