{"id":16182383,"url":"https://github.com/drawveloper/vex","last_synced_at":"2025-04-07T12:28:30.517Z","repository":{"id":119630725,"uuid":"423641505","full_name":"drawveloper/vex","owner":"drawveloper","description":"VTEX Extension Platform","archived":false,"fork":false,"pushed_at":"2021-11-30T14:57:20.000Z","size":1425,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T15:16:53.775Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drawveloper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-01T23:03:16.000Z","updated_at":"2023-03-09T02:14:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"5202dfbe-b44d-48de-a424-c17128ac073e","html_url":"https://github.com/drawveloper/vex","commit_stats":null,"previous_names":["drawveloper/vex"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drawveloper%2Fvex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drawveloper%2Fvex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drawveloper%2Fvex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drawveloper%2Fvex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drawveloper","download_url":"https://codeload.github.com/drawveloper/vex/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247651803,"owners_count":20973505,"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":[],"created_at":"2024-10-10T06:30:57.921Z","updated_at":"2025-04-07T12:28:30.494Z","avatar_url":"https://github.com/drawveloper.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vex - the VTEX Extension platform\n\n`vex` is an open-source software development framework for defining a commerce platform in code and provisioning it on managed multi-cloud infrastructure. `vex` enables you to:\n\n- Manage and configure all your sales channels, from web storefronts, mobile apps, live commerce and conversational commerce to in-store solutions;\n- Instantly connect to a deep network of suppliers and sellers, accessing millions of products and services with a few lines of code;\n- Curate your offers, managing products, prices and promotions in multiple channels, at scale;\n- Configure and provision fulfillment nodes, transportation partners and your entire logistics operation through code;\n- Create apps that are highly reliable, scalable and cost-effective in the cloud without worrying about the underlying infrastructure.\n\nThe `vex` toolset allows teams to **compose and deploy** a **complete, end-to-end** `Enterprise Commerce Platform` to the VTEX edge cloud within minutes instead of months. End-to-end means `vex` orchestrates not only the frontend, digital experiences layer, but also all backend services and infrastructure required to operate a modern, unified commerce platform scalably and reliably.\n\n# What is vex for?\n\n`vex` allows VTEX users to:\n\n1. *Compose* **apps** from the VTEX ecosystem into your private cloud commerce **platform** and get a _first version to production_ quickly;\n2. *Evolve* your platform by managing your apps, publishing **releases** and creating **flags** to test new **configurations** for specific **audiences** through a **single control panel**.\n3. *Build* new apps that run on the serverless VTEX **global edge** infrastructure at **low cost** and create new capabilites for any `vex` platform, share or sell them in the `commerce exchange`;\n\n*Compose, Evolve, Build*\n\nWith `vex`, you start fast by choosing a `platform template`, which is a collection of pre-configured apps specifically designed for an industry and region, e.g. `fashion-europe`, `b2c-brazil`, `marketplace-latam`, and customizing it to **compose** the platform that fits your business needs. \n\nThe `vex admin` is the **single control panel** where you can **monitor** your platform performance and **control** how apps behave by managing their **configuration**. Then, you can deploy changes safely with `Progressive Releases` and create new `Flags`. Every deploy is a separate **release**, so you can always see the _exact list of changes_ that occurred and **rollback quickly**, if needed. \n\n`Flags` let you experiment with choosing some specific configuration for specific **audiences**. Observe the outcomes to decide whether to make those changes available for your entire audience. Or, you can simply group some changes under a flag and schedule it for a specific time (like `black-friday-2021`). After you're done, simply archive the flag. \n\nFor developers, `Apps` let you **build what matters** leveraging our global serverless edge infrastructure. That means apps scale to demand automatically and are served close to your users, guaranteeing faster responses. You can focus on writing `deno` functions that react to platform events (like new order), or to platform public routes (exposing APIs in your domain). \n\n## What is a \"platform\"? \n\nA **Platform** is a combination of configured **apps** which can be deployed to the VTEX infrastructure. It is represented as a list of TypeScript files in a git repository. Each `.ts` file represents an **installed app** in this platform, and contain this app's configuration. \n\nThese files are the default configuration for the current release. When running, apps in the platform can be configured on a web **admin**. Changes to configuration may be *committed* into a new platform **release**, which can become a **deploy preview** under a new URL, or can be deployed directly to production (being merged to main). **Flags** are declared _as part of_ a release, like the configuration of any other app. First, you release a new flag, then you activate it and add an audience.\n\nEvery platform receives a subdomain at `https://\u003cplatform\u003e.vtex.land`. This points to the `main` branch of the repo at `https://github.com/vtex-platforms/\u003cplatform\u003e`. A platform may be locally built and run in your computer. When deployed to VTEX, it leverages our global edge infrastructure that scales quickly to any amount of demand. \n\n## What is a \"release\" and a \"flag\"?\n\nA **Release** is a snapshot of a platform desired configuration. When deployed, it receives traffic progressively while checking for errors or worsening outcomes from installed apps. If degradation is detected, traffic is reverted to a previous release. \n\nFlags are used to dynamically change apps configurations without requiring a platform deploy. They allow you test new configuration to a subset of your **audience** before releasing to the broad public. You may even gate some functionality for some specific region or browser type. A release may contain definitions for new **flags**, which may then be managed in the admin for that release.\n\n## What is an \"app\"?\n\nAn **App** is any type of _deployable_ and _configurable_ code which delivers some value to a **Platform**, and which produces some type of **Outcome.** For example, a web storefront might be an app which would have a `FastStore repository` as its configuration, and `Revenue` and `Conversion Rate` as its outcomes.\n\n## What is \"configuration\"?\n\n**Configuration** is a _strongly typed_ set of data that alters the behaviour of a given **app**. Apps define their **configuration spec**. At runtime, apps receive the appropriate configuration for the current request, considering the audiences triggered and the flags currently active in this platform. This allow users to try out multiple combinations of behaviour, quickly, with production traffic, by managing flags and their audiences.\n\n## What do apps do?\n\nApps run on our global serverless function infrastructure and might react to (or emit) platform-controlled `events`, respond to requests on internet-facing `routes`, or run at scheduled times. By declaring a spec for **configuration**, apps allow platform users to change their behaviour dynamically. \n\nUsers buy and install apps which create the right level of abstraction for them to solve a business challenge, packaging expertise in software. For them, `vex` allows easily composing multiple apps and evolving their configuration according to the observed **Outcomes**.\n\n## What is an \"integration\"?\n\n**Integrations** are a specific type of app, which use `vex` serverless functions to exchange tokens with external API's and subsequently remotely control their configuration and behavior or otherwise generate side-effects and observe their consequences. \n\nIntegrations may offer limited control to  Flags or Releases, depending on the capacities of the external API. An external API might integrate `vex` itself as a remote configuration manager in order to fully leverage of flags and releases. At the very least, integrations can always produce side-effects by calling APIs and responding to external hooks by defining public endpoints.\n\n\n## Examples\n\nSome examples of repositories implementing apps and platforms:\n\n- [vtex-apps/std](https://github.com/vtex-apps/std) - the standard library for vex, implementing all core services.\n- [vtex-apps/webops](https://github.com/vtex-apps/webops) - the VTEX end-to-end frontend platform.\n- [vtex-platforms/fashioneurope](https://github.com/vtex-platforms/fashioneurope) - an example platform with a storefront.\n\n# Using vex as a developer\n\nFor developers, `vex` allows **apps** to declare the **configuration** they accept both at **build-time** and at **run-time**, as well as the **infrastructure** they require to run. Apps may also declare the **resources** they own and manage, as well as the **policies** they require to access other apps' resources.\n\nAn **app** is declared as a collection of **configurations for other apps** or for **core services**, represented as a list of TypeScript files at the root of the repository. A **platform** is simply a higher-order app: the top level collection of configurations that you deploy. This allows complex platform setups to be expressed as type-safe code and verified by a continuous integration and deployment pipeline, just like the building blocks that compose them. \n\n`vex` is a tool to deal with such `configuration repositories`. It allows you to `create` a new app or platform choosing from an array of starters, and to `install` new dependencies (which creates a default configuration file for that app). Finally, one may `build` the current configuration and then `serve` the admin, \n\nIn production, `vex` functions dynamically receive up-to-date configuration changes throughout a global edge platform so that configuration changes take effect in seconds, not hours.\n\nLet's see which core services you can leverage to create your first app.\n\n## Core services\n\n### Platform Service\n`platform.ts`\n\nAllows you to declare a platform composed by the set of apps declared in the same directory.\n\n```\nimport { Platform } from \"https://vtex.land/std/platform.ts\"\n\nexport default new Platform({\n    account: 'fashioneurope'\n})\n``` \n\n### App Service\n`app.ts`\n\nAllows you to declare this directory as an app, which may be installed to platforms and receive configuration at build time and run time.\n```\nimport { App } from \"https://vtex.land/std/app.ts\"\n\nexport default new App({\n    account: 'fashioneurope'\n})\n```\n\n- `vex-deploy` — deploys Deno scripts to a global edge network. This is the low-level building block in order to have side-effects, like running some code reacting to a platform event or an HTTP route in the public domain.\n- `vex-auth` — allows definition and extension of resources, policies, and all other access, authentication and authorization methods for a service (Analog to AWS IAM).\n- `vex-flag` — allows definition of Experiments, which may then be used across other configuration files to dynamically alter the behavior of running services by using the web Experiment admin.\n- `vex-admin` — allows extension of the Admin web and CLI by implementing specific components for one or more configuration fields, or to completely override the admin UI as a first-class Next application. \n- `vex-monitor` — allows definition of Outcomes with metrics and alarms for the running service.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrawveloper%2Fvex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrawveloper%2Fvex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrawveloper%2Fvex/lists"}