The main objective of this project is to convert html/css from figma design files to a digia project page ui. So used Figma, OpenAi(Custom Model for transformation) and dart parser.
This project implements a sophisticated parser designed to convert Figma JSON representations into a streamlined JSON format compatible with Digia Components. Leveraging OpenAi custom Models for converting html/css to flutter widget tree json dynamic programming techniques and adhering to SOLID principles for the parser recursively processes each element in the Figma JSON, optimizing and extracting valuable data.
[https://drive.google.com/file/d/1EUW7UaYJkR8TxY1bVf7s-j83b9BtmOsw/view?usp=sharing]
- OpenAi: Used OpenAi custom Model for converting html/css into flutter widget tree json and thus parsing that json into digia format using the parser written in dart;
- Dynamic Programming: The parser employs dynamic programming techniques to efficiently process and optimize the complex structure of Figma JSON.
- SOLID Principles: The implementation adheres to SOLID principles, ensuring a modular and maintainable design that facilitates extensibility.
- Recursive Parsing: All elements within the Figma JSON are parsed recursively, extracting essential information and converting them into a linear and memoized structure compatible with Digia Components.
To use the parser, follow these steps:
- https://github.com/Satendra9984/figma_to_digiaJson to your local machine.
- Install the required dependencies.
- Run the parser with your Figma JSON file as input.
- Obtain the optimized Digia Components JSON output.
Developing this parser presented a stimulating and challenging problem-solving experience. The combination of dynamic programming and adherence to SOLID principles ensures not only efficiency in processing but also a robust and maintainable codebase.
Feel free to explore the codebase, contribute, or use the parser in your projects. Happy coding!
📂 Figma JSON File: figma.json
📂 Digia JSON File: final_digia.json