{"id":13995236,"url":"https://github.com/GettEngineering/Prism","last_synced_at":"2025-07-22T21:32:29.602Z","repository":{"id":43775184,"uuid":"178012534","full_name":"GettEngineering/Prism","owner":"GettEngineering","description":"Gett's Design System code generator. Use Zeplin Styleguides as your R\u0026D's Single Source of Truth.","archived":true,"fork":false,"pushed_at":"2022-02-21T09:27:52.000Z","size":12649,"stargazers_count":361,"open_issues_count":5,"forks_count":21,"subscribers_count":17,"default_branch":"main","last_synced_at":"2024-10-30T17:14:37.349Z","etag":null,"topics":["codegen","design","design-system","design-system-manager","design-systems","design-tools","designops","hacktoberfest","swift","tooling","zeplin"],"latest_commit_sha":null,"homepage":"https://prism.tools","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GettEngineering.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-27T14:34:37.000Z","updated_at":"2024-05-26T14:29:29.000Z","dependencies_parsed_at":"2022-09-06T21:10:21.166Z","dependency_job_id":null,"html_url":"https://github.com/GettEngineering/Prism","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GettEngineering%2FPrism","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GettEngineering%2FPrism/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GettEngineering%2FPrism/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GettEngineering%2FPrism/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GettEngineering","download_url":"https://codeload.github.com/GettEngineering/Prism/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227177838,"owners_count":17743177,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["codegen","design","design-system","design-system-manager","design-systems","design-tools","designops","hacktoberfest","swift","tooling","zeplin"],"created_at":"2024-08-09T14:03:19.044Z","updated_at":"2024-11-29T17:31:18.116Z","avatar_url":"https://github.com/GettEngineering.png","language":"Swift","readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"Assets/gh/logo.jpg\" alt=\"Prism: Design System Code Generator logo\" title=\"Prism: Design System Code Generator logo\" /\u003e\n\u003cbr /\u003e\n\u003ca href=\"https://actions-badge.atrox.dev/GettEngineering/Prism/goto\" target=\"_blank\" alt=\"Build Status\" title=\"Build Status\"\u003e\u003cimg src=\"https://github.com/GettEngineering/Prism/workflows/Prism/badge.svg?branch=main\" alt=\"Build Status\" title=\"Build Status\"\u003e\u003c/a\u003e\n\u003ca href=\"https://codecov.io/gh/GettEngineering/Prism\" target=\"_blank\" alt=\"Code Coverage for Prism on codecov\" title=\"Code Coverage for Prism on codecov\"\u003e\u003cimg src=\"https://codecov.io/gh/GettEngineering/Prism/branch/main/graph/badge.svg\" alt=\"Code Coverage for Prism on codecov\" title=\"Code Coverage for Prism on codecov\"/\u003e\u003c/a\u003e\n\u003cimg src=\"https://img.shields.io/badge/platform-macOS%20%7C%20Linux-%23989898\" /\u003e\n\u003ca href=\"https://github.com/apple/swift-package-manager\"\u003e\u003cimg src=\"https://img.shields.io/badge/SPM-compatible-brightgreen.svg\" alt=\"Swift Package Manager Support\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nPrism is a Design System code generator developed by the team at Gett 🚕.\n\nSynchronizing design teams with engineering teams is a huge challenge.\n\nAs teams scale, new growing pains start around how to properly align colors, text styles, spacing and other design details between teams, in a uniform way, from a single source of truth.\n\nPrism was built to solve this very problem! It takes either Zeplin project/styleguide or a set of Figma files as input, and generates any output code you want from these based on a set of templates in your project, resulting in cross-platform code that is always synchronized from a single source-of-truth (Your design files).\n\nPrism is especially useful when used in your CI/CD process to remove the friction of design handoff and review, and making sure all of your teams are properly synchronized in regards to naming, values, and more.\n\n## Getting Started\n\n### 📹 Videos\n\n* [A 60 seconds introduction to Prism](https://www.youtube.com/watch?v=MNcAAUji-YY)\n* [Design a Design System @ Swift Heroes, Italy](https://www.youtube.com/watch?v=UFyx7EtbcMU) (25 minutes)\n\n### 🌈 Getting Prism\n\nThere are five options to install prism: \n\n1. **Install with [Homebrew](https://brew.sh)**: `brew install GettEngineering/tap/prism`\n1. **Install using [Mint](https://github.com/yonaskolb/Mint)**: `mint install GettEngineering/Prism`\n1. **Build from source**: `make install`\n1. **Run directly with SPM**: `swift run prism generate` \n1. [**Running on Windows**](#running-on-windows-experimental) _(experimental)_\n\n\n### 🔑 Getting a Provider API Token\n\n#### Figma\n\nTo use Prism with Figma, you'll need to generate a Personal Access Token (JWT) to Figma's API by going to [https://www.figma.com](https://www.figma.com). Then, go the **Settings** section under your profile:\n\n![Finding the Settings section in Figma](Assets/gh/figma-pat1.png \"Finding the Settings section in Figma\")\n\nScroll to the bottom of the **Account** tab, find the **Personal access tokens** section, and create your new token:\n\n![Generating a Figma Personal Access Token](Assets/gh/figma-pat2.png \"Generating a Figma Personal Access Token\")\n\nYou'll need to expose this token to run the `prism` CLI tool. Make sure you have a `FIGMA_TOKEN` environment variable with your token configured. \n\nWhen running `prism` in a CI environemnt, we recommend adding `FIGMA_TOKEN` as an Environment Secret.\n\nWhen using `prism` locally or bootstrapping your project for the first time, you can simply run `export FIGMA_TOKEN='zeplin_personal_token'` before running `prism` locally.\n\n#### Zeplin\nTo use Prism with Zeplin, you'll need to generate a Personal Access Token (JWT) to Zeplin's API by going to [https://app.zeplin.io/profile/developer](https://app.zeplin.io/profile/developer) and click the **Create new token** button in the **Personal access tokens** section:\n\n![Generating a Zeplin Personal Access Token](Assets/gh/zeplin-pat.png \"Generating a Zeplin Personal Access Token\")\n\nYou'll need to expose this token to run the `prism` CLI tool. Make sure you have a `ZEPLIN_TOKEN` environment variable with your token configured. \n\nWhen running `prism` in a CI environemnt, we recommend adding `ZEPLIN_TOKEN` as an Environment Secret.\n\nWhen using `prism` locally or bootstrapping your project for the first time, you can simply run `export ZEPLIN_TOKEN='zeplin_personal_token'` before running `prism` locally.\n\n### 👢 Bootstrap Prism for your Project\n\nInside your project folder, run `prism init`. \n\nIt will guide you through selecting a Zeplin project/styleguide, or a set of Figma files as source along with other useful information for proper code generation. Once `prism init` is successful, you'll find a new `.prism` folder with a `config.yml` file outlining your preferences.\n\n### 🎨 Creating Templates\n\nPrism uses templates with the `.prism` suffix located in your project's `.prism` folder. These Prism templates are basically plain text files — Prism doesn't really care what format or language you use, it can make _any kind of output_ as long as you can express it in a Prism template file.\n\nPrism looks for something called [**Tokens**](Documentation/Tokens.md) inside your templates. These tokens follow the following format: `{{%token%}}`. You can find a couple of sample templates in the [Examples](https://github.com/gtforge/Prism/tree/main/Examples) folder.\n\nHere are two short example of generating colors code for iOS and Android using Prism templates.\n\n**Colors.swift.prism**:\n\n![Color.swift iOS Prism Template](Assets/gh/Colors-iOS.gif \"Color.swift iOS Prism Template\")\n\n**colors.xml.prism**:\n\n![Color.swift Android Prism Template](Assets/gh/Colors-Android.gif \"Color.swift Android Prism Template\")\n\n## Development\n\n* Run `make` or `make install` to build a release binary of the `prism` CLI tool and install it to **/usr/local/bin**.\n* Run `make build` to build a release binary of the `prism` CLI tool\n* Run `make project` to create an Xcode project and start working.\n* Run `make test` to run all tests.\n* Run `make clean` to clear the generated Xcode project.\n","funding_links":[],"categories":["📦 Legacy \u0026 Inactive Projects","Swift"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGettEngineering%2FPrism","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGettEngineering%2FPrism","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGettEngineering%2FPrism/lists"}