• Stars
    star
    177
  • Rank 215,985 (Top 5 %)
  • Language
    TypeScript
  • Created almost 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🚀 Lightweight project that exposes an API for easily creating customizable forms with built-in validation based on a JSON Schema.

react-hook-form-jsonschema

Small project based on react-hook-form that exposes an API for easily creating customizable forms based on a JSON Schema with built-in validation.

react-hook-form-jsonschema is a React hooks library that manages all the stateful logic needed to make a functional form based on a JSON Schema. It returns a set of props that are meant to be called and their results destructured on the desired input field.

Try a live demo on CodeSandbox!

Supported JSON Schema keywords

Table of Contents

Simple Usage

Suppose you have a simple JSON Schema that stores a person's first name:

const personSchema = {
  $id: 'https://example.com/person.schema.json',
  $schema: 'http://json-schema.org/draft-07/schema#',
  title: 'Person',
  type: 'object',
  properties: {
    firstName: {
      type: 'string',
      description: "The person's first name.",
    },
  },
}

And suppose you want to create a form field for the firstName field, simply use the useInput() hook and render the form using react:

function FirstNameField(props) {
  const inputMethods = useInput('#/properties/firstName');

  return (
    <FormContext schema={personSchema}>
      <label {...inputMethods.getLabelProps()}>
        {inputMethods.name}
      </label>
      <input {...inputMethods.getInputProps()} />
    </FormContext>
  )
}

Installation

With npm:

npm install react-hook-form-jsonschema --save

Or with yarn:

yarn add react-hook-form-jsonschema

API

This is the API documentation, react-hook-form-jsonschema also re-exports all the react-hook-form types and the Controller component. All of the other functionalities are abstracted by this library.

Components API

FormContext component API

This component is the top-level component that creates the context with the schema and options all the hooks will need to be usable. So bear in mind that you need to define all the other components as children of FormContext.

props:

Required:
  • schema: JSON Schema object which will be passed down by context for the inputs to use it for validation and the structure of the form itself.
Optional:
  • customValidators: An object where each member has to be a funtion with the following format:
    • function(value: string, context: SubSchemaInfo) => CustomValidatorReturnValue
    • params:
      • value: Is the current value in the form input.
      • context: Is an object with the following fields:
        • JSONSchema: Is the sub schema of the current field
        • isRequired: Whether the current field is required or not
        • objectName: The name of the sub schema
        • invalidPointer: A boolean indicating whether the referenced field was found within the schema or not. If it is false it is because of an error in the schema.
        • pointer: JSON Pointer to sub schema that should be validated. The pointer is always in the form: #/properties/some/properties/data where # represents the root of the schema, and the properties/some/properties/data represents the tree of objects (from some to data) to get to the desired field, which in this case is data. Also see the definition of JSON Pointers on RFC 6901.
    • return value: Must be either a string that identifies the error or a true value indicating the validation was succesfull.
  • formProps: An object that is passed to the underlying <form> element. Accepts the same attributes as when declaring a <form> with React, except onSubmit.
  • validationMode: String to indicate when to validate the input, default is 'onSubmit'.
    • 'onBlur': Validate when an input field is blurred.
    • 'onChange': Validate when an input field value changes.
    • 'onSubmit': Validate when the submit is triggered.
  • revalidateMode: String to indicate when inputs with errors get re-validated, default is 'onChange'.
    • 'onblur': Validate when an input field is blurred.
    • 'onChange': Validate when an input field value changes.
    • 'onSubmit': Validate when the submit is triggered.
  • submitFocusError: Boolean, when true focus on the first field with error after submit validates, if there is any. Defaults to true.
  • onChange: Callback called when there's a change in the form. It passes the form data formatted by the provided JSON Schema.
  • onSubmit: If provided react-hook-form-jsonschema will call this function as the submit action, it passes an object with the following members:
    • data: The data that was provided as inputs to the form, correctly formatted as an instance of the JSON Schema provided.
    • event: A react event
    • methods: Provides access to the methods of react-hook-form useForm, from this you can extract, for example, the triggerValidation method to revalidate the form if an error occured while submitting.
  • noNativeValidate: Boolean, when true disables the default browser validation (notice that react-hook-form-jsonschema does NOT yet implement validation for URIs and email addresses).
  • defaultValues: An object that defines the form's default values.

Functions API

getDataFromPointer(pointer, data)

Description

Gets a specific member of data given a pointer.

Parameters

  • pointer: JSON Pointer to the desired sub schema that will be rendered.
  • data: An object, as the one passed as parameter to the onSubmit function.

Return

Returns the data indicated by the pointer inside an instance of a JSON Schema the object. Or undefined if the pointer is not found.

Example

// Suppose you have a schema with the following format:
const schema = {
  type: 'object',
  properties: {
    address: {
      type: 'object',
      properties: {
        name: { type: 'string' }
      }
    }
  }
}

// A valid instance of this schema is this:
const data = {
  address: {
    name: "Foo"
  }
}

// And suppose you have a pointer to a sub schema only:
const pointer = '#/properties/address/properties/name'

// Use this function to get the data from the instance of the schema(data) that
// coincides with the sub schema the pointer points to.
const result = getDataFromPointer(pointer, data) // returns "Foo"

Hooks API

The following are the common fields returned in the object from every use'SomeInputType' hook:

  • type: The type of the input, as defined in InputTypes:
    • generic: the default type, a non specialized type, only contains the common fields
    • radio: Type used for <input type='radio' \>
    • select: Type used for <select>
    • input: Type used for generic <input \>
    • textArea: Type used for <textarea>
    • checkbox: Type used for <input type='checkbox' \>
  • pointer: JSON Pointer to sub schema that should be validated. The pointer is always in the form: #/properties/some/properties/data where # represents the root of the schema, and the properties/some/properties/data represents the tree of objects (from some to data) to get to the desired field, which in this case is data. Also see the definition of JSON Pointers on RFC 6901.
  • name: The last object/data field name in the tree. In the case of the JSONSchema pointer #/properties/child/properties/here the name value will be here.
  • isRequired: indicates whether the field is required or not.
  • validator: is the object passed to react-hook-form to validate the form. See the react-hook-form for more information
  • formContext: If you want to access internal react-hook-form context use this
  • getError(): Returns an ErrorMessage, which has the following format:
    • {message: ErrorTypes, expected: ErrorMessageValues}
    • ErrorTypes, is an enum, with the following keys:
      • required: the field is required to be filled. Value is __form_error_required__.
      • maxLength: maximum length of string input was surpassed. Value is __form_error_maxLength__.
      • minLength: minimum length of string input was not met. Value is __form_error_minLength__.
      • maxValue: maximum value of number input was surpassed. Value is __form_error_maxValue__.
      • minValue: minimum value of number input was not met. Value is __form_error_minValue__.
      • pattern: the pattern or type defined in the schema was not met. Value is __form_error_pattern__.
      • notInteger: the input was expected to be an integer but is not. Value is __form_error_notInteger__.
      • notFloat: the input was expected to be a float but is not. Value is __form_error_notFloat__.
      • multipleOf: the number is not a multiple of the number defined in the schema. Value is __form_error_multipleOf__.
      • notInEnum: the input does not match any of the expected values defined in the enum option in the schema. Value is __form_error_notInEnum__.
      • undefinedError: the error type could not be defined. Value is __form_error_undefinedError__.
    • ErrorMessageValues, is the expected value to be met, it will be true for required, and the minimum value expected for minValue for example.
  • getObject(): Returns the data field in the schema that this input refers to

Please notice that in all of the following examples it is assumed the components are already children of a FormContext component

useCheckbox(pointer)

Description

Use this hook to build a single or multiple checkbox field in your form.

Parameters:

  • pointer: JSON Pointer to the desired sub schema that will be rendered.

Return:

Returns an object with the following fields, besides the common one's:

  • isSingle: indicates whether there is just a single option inside the checkbox
  • getItems(): use this to get which values should be listed inside the radio input fields. This function derives the items by the defined type and properties inside the JSON Schema and returns all the required items to comply with the definition.
  • getItemInputProps(index): use this with the spread operator inside an <input> tag and get the benefit of the validator, id field, name and an associated label with it for the item in the specified index from getItems()
  • getItemLabelProps(index): the label props related to the input at the specified index from getItems()

Example:

function InputField(props) {
  const inputMethods = useCheckbox(props.pointer)

  return (
    <React.Fragment>
      {inputMethods.getItems().map((value, index) => {
        return (
          <label {...inputMethods.getItemLabelProps(index)} key={`${value}${index}`}>
            {inputMethods.isSingle ? inputMethods.getObject().title : value}
            <input {...inputMethods.getItemInputProps(index)} />
          </label>
        )
      })}
      {inputMethods.getError() && <p>This is an error!</p>}
    </React.Fragment>
  )
}

useHidden(pointer)

Description

Use this hook to build a hidden field in the form, the user will not be able to change it or see it, but it will be there when submitted.

Parameters:

  • pointer: JSON Pointer to the desired sub schema that will be rendered.

Return:

Returns an object with the following fields, besides the common one's:

  • getLabelProps(): use this with the spread operator inside a <label> tag and get the benefit of having all the important fields of the label filled in for you and the associated input (the for property) with it.
  • getInputProps(): use this with the spread operator inside an <input> tag and get the benefit of the validator, id field, name and an associated label with it

Example:

function HiddenField(props) {
  const inputMethods = useHidden('#/properties/Foo');

  return (
    <React.Fragment>
      <label {...inputMethods.getLabelProps()}>
        {inputMethods.name}
      </label>
      <input {...inputMethods.getInputProps()} />
    </React.Fragment>
  )
}

useInput(pointer)

Description

Use this hook to build a generic input field in your form, with validation based on the type of input the JSON Schema requires.

Parameters:

  • pointer: JSON Pointer to the desired sub schema that will be rendered.

Return:

Returns an object with the following fields, besides the common one's:

  • getLabelProps(): use this with the spread operator inside a <label> tag and get the benefit of having all the important fields of the label filled in for you and the associated input (the for property) with it.
  • getInputProps(): use this with the spread operator inside an <input> tag and get the benefit of the validator, id field, name and an associated label with it.

Example:

function InputField(props) {
  const inputMethods = useInput('#/properties/Foo');

  return (
    <React.Fragment>
      <label {...inputMethods.getLabelProps()}>
        {inputMethods.name}
      </label>
      <input {...inputMethods.getInputProps()} />
    </React.Fragment>
  )
}

useObject(pointer, UISchema)

Description

This hook works a little differently than the others. useObject returns an array of which each of its elements corresponds to the return type of one of the other hooks.

Parameters:

  • pointer: JSON Pointer to the desired sub schema that will be rendered.
  • UISchema (Optional): This UISchema is a modified schema type, relative to the sub schema passed in the pointer prop, the format of the UISchema is the following:
const UISchema = {
  /*
   *  This is the type that will be used to choose what type of input will be
   *  used to build the specified field. Please note that the type of a node
   *  that is an object will be ignored, as there would make no sense to render
   *  an object without it's children inside a form.
   */
  type: UITypes,
  properties: {
    // Note that the definition is recursive
    child1NameHere: UISchema,
    child2NameHere: UISchema,
    // ...
    childXNameHere: UISchema,
  },
}
  • The UITypes is an enum with the following values:
    • default: input will have a default type based on what react-hook-form-jsonschema thinks is better.
    • radio: input will be of the radio type, just as returned by the useRadio hook
    • select: input will be of the select type, just as returned by the useSelect hook
    • input: input will be of the input type, just as returned by the useInput hook
    • hidden: input will be of the hidden type, just as returned by the useHidden hook
    • password: input will be of the password type, just as returned by the usePassword hook
    • textArea: input will be of the textarea type, just as returned by the useTextArea hook
    • checkbox: input will be of the checkbox type, just as returned by the useCheckbox hook

Return:

Returns an array, with each element being the return of a different call to a hook for each child of the object that was passed in the pointer.

Example:

const personSchema = {
  title: 'Person',
  type: 'object',
  properties: {
    firstName: {
      type: 'string',
      description: "The person's first name.",
    },
    lastName: {
      type: 'string',
      description: "The person's last name.",
    },
    birthYear: {
      description: "The person's birth year.",
      type: 'integer',
      minimum: 1930,
      maximum: 2010,
    },
  },
}

function SpecializedObject(props) {
  switch (props.baseObject.type) {
    case InputTypes.input: {
      return (
        <React.Fragment>
          <label {...props.baseObject.getLabelProps()}>
            {props.baseObject.name}
          </label>
          <input {...props.baseObject.getInputProps()} />
        </React.Fragment>
      )
    }
    case InputTypes.radio: {
      return (
        <React.Fragment>
          <label {...props.baseObject.getLabelProps()}>
            {props.baseObject.name}
          </label>
          {props.baseObject.getItems().map((value, index) => {
            return (
              <label
                {...props.baseObject.getItemLabelProps(index)}
                key={`${value}${index}`}
              >
                {value}
                <input {...props.baseObject.getItemInputProps(index)} />
              </label>
            )
          })}
        </React.Fragment>
      )
    }
    case InputTypes.select: {
      return (
        <React.Fragment>
          <label {...props.baseObject.getLabelProps()}>
            {props.baseObject.name}
          </label>
          <select {...props.baseObject.getSelectProps()}>
            {props.baseObject.getItems().map((value, index) => {
              return (
                <option
                  {...props.baseObject.getItemOptionProps(index)}
                  key={`${value}${index}`}
                >
                  {value}
                </option>
              )
            })}
          </select>
        </React.Fragment>
      )
    }
  }
  return <React.Fragment></React.Fragment>
}

function ObjectRenderer(props) {
  const inputMethods = useObject({ pointer: props.pointer, UISchema: props.UISchema })

  const objectForm = []

  // Note that we also add error checking here and show a message in case there
  // is one. Remember that you can also check for the type of error returned
  // anb give a more specialized warning to the user.
  for (const obj of inputMethods) {
    objectForm.push(
      <div key={`${obj.type}${obj.pointer}`}>
        <SpecializedObject baseObject={obj} />
        {obj.getError() && <p>This is an error!</p>}
      </div>
    )
  }

  return <React.Fragment>{objectForm}</React.Fragment>
}

function RenderMyJSONSchema() {
  // Notice that even though only one child was specified, all the children of
  // the root object are rendered, using the choosen default for each field.
  const UISchema = {
    type: UITypes.default,
    properties: {
      birthYear: {
        type: UITypes.select,
      },
    },
  }

  return (
    <FormContext schema={personSchema}>
      <ObjectRenderer pointer="#" UISchema={UISchema} />
    </FormContext>
  )
}

This is the result of this example:

useObject Example

usePassword(pointer)

Description

Use this hook to build a password input field in your form, with validation based on the type of input the JSON Schema requires.

Parameters:

  • pointer: JSON Pointer to the desired sub schema that will be rendered.

Return:

Returns an object with the following fields, besides the common one's:

  • getLabelProps(): use this with the spread operator inside a <label> tag and get the benefit of having all the important fields of the label filled in for you and the associated input (the for property) with it.
  • getInputProps(): use this with the spread operator inside an <input> tag and get the benefit of the validator, id field, name and an associated label with it

Example:

function PasswordField(props) {
  const inputMethods = usePassword('#/properties/Foo');

  return (
    <React.Fragment>
      <label {...inputMethods.getLabelProps()}>
        {inputMethods.name}
      </label>
      <input {...inputMethods.getInputProps()} />
    </React.Fragment>
  )
}

useRadio(pointer)

Description

Use this hook to build a radio field in your form.

Parameters:

  • pointer: JSON Pointer to the desired sub schema that will be rendered.

Return:

Returns an object with the following fields, besides the common one's:

  • getItems(): use this to get which values should be listed inside the radio input fields. This function derives the items by the defined type and properties inside the JSON Schema and returns all the required items to comply with the definition.
  • getItemInputProps(index): use this with the spread operator inside an <input> tag and get the benefit of the validator, id field, name and an associated label with it for the item in the specified index from getItems()
  • getItemLabelProps(index): the label props related to the input at the specified index from getItems()

Example:

function InputField(props) {
  const inputMethods = useRadio('#/properties/Foo');

  return (
    <React.Fragment>
      {inputMethods.getItems().map((value, index) => {
        return (
          <label {...inputMethods.getItemLabelProps(index)} key={`${value}${index}`}>
            {value}
            <input {...inputMethods.getItemInputProps(index)} />
          </label>
        )
      })}
      {inputMethods.getError() && <p>This is an error!</p>}
    </React.Fragment>
  )
}

useSelect(pointer)

Description

Use this hook to build a select field in your form.

Parameters:

  • pointer: JSON Pointer to the desired sub schema that will be rendered.

Return:

Returns an object with the following fields, besides the common one's:

  • getLabelProps(): use this with the spread operator inside a <label> tag and get the benefit of having all the important fields of the label filled in for you and the associated select (the for property) with it.
  • getItems(): use this to get all the values that are possible to be in the radio buttons
  • getItemOptionProps(index): use this with the spread operator inside an <option> tag and get the benefit of the validator, id field and name for the item in the specified index from getItems()
  • getSelectProps(): use this with the spread operator inside a <select> tag to get validation and register it with the react-hook-form-jsonschema.

Example:

function InputField(props) {
  const inputMethods = useSelect('#/properties/Foo');

  return (
    <React.Fragment>
      <label {...inputMethods.getLabelProps()}>{inputMethods.name}</label>
      <select {...inputMethods.getSelectProps()}>
        {inputMethods.getItems().map((value, index) => {
          return (
            <option
              {...inputMethods.getItemOptionProps(index)}
              key={`${value}${index}`}
            >
              {value}
            </option>
          )
        })}
      </select>
      {inputMethods.getError() && <p>This is an error!</p>}
    </React.Fragment>
  )
}

useTextArea(pointer)

Description

Use this hook to build a textarea field in the form.

Parameters:

  • pointer: JSON Pointer to the desired sub schema that will be rendered.

Return:

Returns an object with the following fields, besides the common one's:

  • getLabelProps(): use this with the spread operator inside a <label> tag and get the benefit of having all the important fields of the label filled in for you and the associated input (the for property) with it.
  • getTextAreaProps(): use this with the spread operator inside an <textarea> tag and get the benefit of the validator, id field, name and an associated label with it

Example:

function HiddenField(props) {
  const inputMethods = useTextArea('#/properties/Foo');

  return (
    <React.Fragment>
      <label {...inputMethods.getLabelProps()}>
        {inputMethods.name}
      </label>
      <textarea {...inputMethods.getTextAreaProps()} />
    </React.Fragment>
  )
}

Supported JSON Schema keywords

  • multipleOf
  • maximum
  • exclusiveMaximum
  • minimum
  • exclusiveMinimum
  • maxLength
  • minLength
  • pattern
  • items (does not support an array of schemas)
  • maxItems (for this one and minItems they are missing specific error messages)
  • minItems
  • required
  • enum
  • type (does not support array of types)
  • properties
  • $id
  • $ref

Does not support fetching a JSON Schema from an URI (as per the draft this is optional).

TODO/Next Steps

  • Improve array type support(and it's validation).
  • Implement dependencies keyword for dynamic formularies.
  • Implement allOf, anyOf, oneOf and not for more liberty in creating form schemas.
  • Implement built-in validation of format keyword for all possible formats.
  • Maybe? Implement new input types for each, or similar, formats, like an useDate for format date-time
  • Implement default values.
  • Implement const keyword.
  • Warn user that there is an error in the schema if any of the keywords fails to validate against the expected type and format.

Useful resources

More Repositories

1

faststore

Digital commerce toolkit for frontend developers
TypeScript
185
star
2

styleguide

The VTEX Design System and React component library.
JavaScript
164
star
3

vtex.js

VTEX SDK for JavaScript
CoffeeScript
114
star
4

openapi-schemas

OpenAPI 3.0 JSON schemas. Files are automatically synced to the VTEX Developer Portal.
JavaScript
102
star
5

node-vtex-api

VTEX IO API Client for Node
TypeScript
75
star
6

speed

VTEX Store development tools - reverse proxy, compilation, minification, optimization and more!
CoffeeScript
61
star
7

toolbelt

CLI for creating and managing VTEX apps
TypeScript
59
star
8

front.phone

front.phone is a Javascript library that identifies, validates and formats phone numbers.
CoffeeScript
58
star
9

releasy

CLI tool to release node applications with tag and auto semver bump
JavaScript
55
star
10

typescript

VTEX's TypeScript tools, style guide and best practices
JavaScript
54
star
11

test-tools

Add tests to your VTEX IO app in an instant 🚀
TypeScript
51
star
12

becoming-a-driver

VTEX's Engineering Individual Contributors Career Track
Smarty
50
star
13

react-csv-parse

Import data from a csv file to your app and your api.
JavaScript
43
star
14

country-iso-3-to-2

Convert a country code ISO 3166-1 Alpha 3 to ISO 3166-1 Alpha 2
JavaScript
33
star
15

vtex-emails

Email framework for developing transactional email templates for VTEX E-commerces
Handlebars
33
star
16

front.portal-plugins

Portal front end plugins
CoffeeScript
32
star
17

country-iso-2-to-3

Convert a country code ISO 3166-1 Alpha-2 to ISO 3166-1 Alpha-3
JavaScript
30
star
18

dotfiles

Mac OSX Developer Setup
Shell
28
star
19

io-clients

TypeScript
27
star
20

address-form

A React component that renders VTEX's address forms
TypeScript
24
star
21

react-jsonschema-table

React component for generating a Table using JSON Schema specification
JavaScript
21
star
22

msk

Small library to mask strings
JavaScript
21
star
23

shoreline

VTEX Design System for back-office experiences. Currently available for internal usage at VTEX.
TypeScript
20
star
24

vtex-courses

TypeScript
20
star
25

splunkevents-js

Javascript lib to create Splunk Logs via HTTP
TypeScript
19
star
26

development-guidelines

Development Guidelines
17
star
27

vtex-tachyons

Functional CSS for humans — customized by the VTEX team
HTML
17
star
28

tortin

Tortin is a responsive theme for GitHub Pages with color options
CSS
16
star
29

github-pull-request-script

This script automates the process of creating pull requests with specific changes in multiple repositories.
TypeScript
15
star
30

exercise-tdd-javascript

Problem-solving with Test Driven Development and Javascript
JavaScript
14
star
31

speedbag

The no-nonsense front end boilerplate
HTML
14
star
32

intl-equalizer

👯‍♂️
JavaScript
11
star
33

andromedocs

andromedocs provides simple yet flexible tools for documenting Design Systems.
TypeScript
10
star
34

micro

A full-lifecycle meta-framework for fast web apps.
TypeScript
9
star
35

front.messages

jQuery and Bootstrap based messages plugin
CoffeeScript
9
star
36

findhelp

A simple and hackable lib to create modular CLI's
JavaScript
9
star
37

action-sonarqube

A Github action that runs the SonarScanner and adds SonarQube Issues as annotations in your pull requests.
TypeScript
9
star
38

ng-currency-mask

CoffeeScript
9
star
39

danger-plugin-keepachangelog

Makes changes to CHANGELOG consistent with keepachangelog standard
TypeScript
8
star
40

grunt-vtex

A Grunt convention-over-configuration meta-project
CoffeeScript
8
star
41

payment-mocker

A boilerplate to develop and test a Payment Method to VTEX Smart Checkout
CSS
8
star
42

action-toolbelt

This action deploys, cache for faster deploy, and do a login on VTEX Toolbet tool to automate CI/CD pipelines on GitHub
Shell
8
star
43

mkp-app-template

TypeScript
7
star
44

front.utils

VTEX Underscore extensions
CoffeeScript
7
star
45

FeedConsumerCSharp

A consumer boilerplate to VTEX Feed v3
C#
7
star
46

tachyons-generator

Generate a custom Tachyons build from a json configuration
JavaScript
6
star
47

action-io-app-test

Github action to run tests in VTEX IO Apps
JavaScript
6
star
48

show-time

a simple countdown timer powered by vtex-io
JavaScript
6
star
49

cron.js

JavaScript
6
star
50

workshop-react-native

Workshop to teach React Native by doing a Todo App
JavaScript
6
star
51

front.libs

Shared front end libs
CoffeeScript
6
star
52

profile-form

React component for managing user profiles
JavaScript
6
star
53

action-toolbelt-login

Perform login with VTEX Toolbelt using App Key/Token
TypeScript
6
star
54

danger

A opinionated danger.js configurable rule set and a companion github action
JavaScript
6
star
55

hyper-cas

hyper-cas is a Content-Addressable Storage aimed at JAMStack websites.
Go
6
star
56

admin-ui-example

Admin app example for the admin v4 with the admin-ui design system
TypeScript
5
star
57

ux-writing

UX Writing guidelines
JavaScript
5
star
58

formula-vtex

Site da Hackaton da VTEX
HTML
5
star
59

action-lint

Github action to optionally lint a project
JavaScript
5
star
60

delivery-packages

Small library to separate items in packages
JavaScript
5
star
61

vtex-copy-cart-example

This is an example of how to copy a cart and send it to inStore as checkout
JavaScript
5
star
62

pickup-points-modal

JavaScript
5
star
63

generator-vtex

Create a VTEX app
JavaScript
4
star
64

angular-google-analytics

Google Analytics wrapper for Angular
JavaScript
4
star
65

lens

VTEX Development Tools as Chrome Extension
CoffeeScript
4
star
66

estimate-calculator

Small library to calculate and compare SLAs' shippingEstimate
JavaScript
3
star
67

academy

Site público do programa de estágio da VTEX - http://academy.vtex.com
HTML
3
star
68

faststore-vtex-integrations

CSS
3
star
69

lean-shipping-calculator

JavaScript
3
star
70

react-tree-path

React decorator to uniquely identify components in a render tree.
JavaScript
3
star
71

render-extension-loader

JavaScript lib to fetch and render a Render extension point in a given DOM element
TypeScript
3
star
72

intl-container

A React component for loading i18n translations and intl locale data
JavaScript
3
star
73

interviews-mock-api

Mock API to server Interviews data
2
star
74

version-map

An easy-to-use package for manipulating version maps in S3.
CoffeeScript
2
star
75

react-address-book

Address book front end component made with React, Webpack and CommonJS
JavaScript
2
star
76

css-handles

TypeScript
2
star
77

api.protocol

Shell
2
star
78

checkout-ui-payment-guide

Guia de integração de meios pagamentos com a UI do Smart Checkout
HTML
2
star
79

act

A git-based configuration management and evolution tool
TypeScript
2
star
80

go-io

Collection of general-purpose packages for writing scalable go services.
Go
2
star
81

php-connector

Attempt to set up a REST API that passes the PPP tests
PHP
2
star
82

angular-intercom

Intercom wrapper for Angular
JavaScript
2
star
83

angular-locale

CoffeeScript
2
star
84

electron-cappta-debug

A simple repo for testing cappta checkout on VTEX
JavaScript
2
star
85

grunt-defaults

Grunt config mixins
CoffeeScript
2
star
86

pino-splunk-events

TypeScript
1
star
87

i18n-iso

Flexible, future proof and easy to use localization library based on the ISO language set standards
TypeScript
1
star
88

admin-assembly-options

TypeScript
1
star
89

vtex-ng-pagination

angular pagination module
JavaScript
1
star
90

eslint-config-vtex-react

JavaScript
1
star
91

search-tests

JavaScript
1
star
92

tsconfig

1
star
93

cli-plugin-support

TypeScript
1
star
94

cli-plugin-edition

TypeScript
1
star
95

git-tag-match

Check if the git tag matches package.json version
JavaScript
1
star
96

academy-guide

Guia de como estruturar e executar um VTEX Academy
1
star
97

camp

VTEX guides for on-boarding new engineers.
1
star
98

vtex.github.io

Organization GitHub page for VTEX
HTML
1
star
99

action-internal-docs

GitHub Action to automatically publish your documentation to VTEX Tech Docs
TypeScript
1
star
100

cli-plugin-submit

TypeScript
1
star