Code Monkey home page Code Monkey logo

ory / elements Goto Github PK

View Code? Open in Web Editor NEW
84.0 9.0 42.0 18.62 MB

Ory Elements is a component library that makes building login, registration and account pages for Ory a breeze. Check out the components library on Chromatic https://www.chromatic.com/library?appId=63b58e306cfd32348fa48d50

Home Page: https://ory.sh

License: Apache License 2.0

JavaScript 2.51% HTML 0.09% TypeScript 94.93% Makefile 0.35% CSS 0.26% MDX 1.40% Shell 0.46%
component-library ory identity login registration express preact react user-profile hacktoberfest

elements's Introduction

Ory Elements - A component library for login, registration and account pages.

Ory Elements

Ory Elements is a component library that makes building login, registration and account pages for Ory a breeze.

  • Reduces time to add complex auth flows to your customer experience, including multi-factor authentication and account recovery
  • Themeable and modular - use only what you need from it
  • Works with the React ecosystem (NextJS, React SPA, Preact SPA)
  • Works with the Express based ecosystem
  • Dynamically adapts the user interface to your Ory identity schema, sign-in and flow configuration

Ory Elements supports integrating with:

  • React
  • Preact
  • Express.js (experimental)

Ory Elements stands apart from the SDK and your application data layer. This is intentional so that you still have control over how you would like to interact with Ory in your application. How you manage your application state is all up to you. Below is a simple diagram of how Ory Elements fits into your application.

Ory Elements

Getting Started

Install Ory Elements into your existing React / Preact or Express.js application. You can find example apps here

React

npm install @ory/elements --save

Preact

npm install @ory/elements-preact --save

Express.js

npm install @ory/elements-markup --save

Example Apps

Dive into Ory Elements with our react and preact SPA example applications, located in the examples/ directory.

To run the example application you will need a couple of things:

  1. An Ory Network (free) account
  2. The Ory CLI (tunnel)

Clone this repository and set up the React example.

git clone [email protected]:ory/elements
npm run initialize
npm run build:clean
cd examples/react-spa
export VITE_ORY_SDK_URL=http://localhost:4000
npm run dev -- --port 3000

Now run the Ory CLI tunnel.

ory tunnel http://localhost:3000 --project <project-slug> --dev

The tunnel will now mirror the Ory APIs under http://localhost:4000 which we have explicitly told our React app to use through the VITE_ORY_SDK_URL export.

Now you can see Ory Elements in action by opening http://localhost:3000 in your browser!

Internalization (i18n)

Ory Elements supports translations out-of-the-box with the IntlProvider. The IntlProvider is required by Ory Elements and maps American English as the default language.

import { ThemeProvider } from "@ory/elements"

const RootComponent = () => {
  return (
    <ThemeProvider>
      <IntlProvider>// children</IntlProvider>
    </ThemeProvider>
  )
}

To switch the language the UI should use, you can pass in the language code through the locale prop.

import { ThemeProvider } from "@ory/elements"

const RootComponent = () => {
  return (
    <ThemeProvider>
      <IntlProvider locale="nl" defaultLocale="en">
        // children
      </IntlProvider>
    </ThemeProvider>
  )
}

The IntlProvider has the ability to accept custom translations through a CustomLanguageFormats type. You can specify to the <IntlProvider> that you would like to use a CustomTranslations instead of the SupportedLanguages (default) type which will require providing the customTranslations prop.

More information on the Ory messages can be found in the docs

When providing a translation, you can merge an existing supported locale from Ory Elements so that you do not need to provide all keys for the entire tranlsation file :)

For example, I want to adjust the English translation to say Email instead of ID when a Login card is shown. So I provide the key-value pair "identities.messages.1070004": "Email". Another unsupported language such as af (Afrikaans) is also added only for one entry "identities.messages.1070004": "E-posadres". We merge the supported en locale from Ory Elements so that we don't need to provide all key-value pairs.

import {
  ThemeProvider,
  IntlProvider,
  CustomTranslations,
  locales,
} from "@ory/elements"

const RootComponent = () => {
  const myCustomTranslations: CustomLanguageFormats = {
    ...locales,
    en: {
      ...locales.en,
      "identities.messages.1070004": "Email",
    },
    af: {
      // fallback to English on other labels
      ...locales.en,
      "identities.messages.1070004": "E-posadres",
    },
  }

  return (
    <ThemeProvider>
      <IntlProvider<CustomTranslations>
        customTranslations={myCustomTranslations}
        locale="af"
        defaultLocale="en"
      >
        // children
      </IntlProvider>
    </ThemeProvider>
  )
}

It is of course also possible to provide the IntlProvider directly from the react-intl library to format messages and provide translations. The default translations of Ory Elements are located in the src/locales directory.

import { IntlProvider } from "react-intl"
import { locales } from "@ory/elements"

const customMessages = {
  ...locales,
  de: {
    ...locales.de,
    "login.title": "Login",
  },
}

const Main = () => {
  return (
    <IntlProvider locale={customMessageLocale} messages={customMessages}>
      <Router>
        <Route path="/" component={Dashboard} />
        {/* ... */}
      </Router>
    </IntlProvider>
  )
}

End-to-end Testing with Playwright

Ory Elements provides an end-to-end library based on Playwright. This library can be used to test your application's login, registration, recovery, verification and settings pages with Ory Elements or with your own custom components.

It also provides a set of functions that can mock the Ory APIs and provide fixtures mocking the Ory API responses. This is perfect for testing your application's logic without having to run it against an Ory Network project, making it really fast and easy to implement.

This is a great way for running on your CI/CD pipeline to catch any regressions that may have been introduced.

Read more about the Ory Elements E2E library.

Breaking Changes

v0.1.0-beta.1

All components have to be wrapped in a <IntlProvider /> component. Either use the default one from Ory Elements, or provide your custom messages through the <IntlProvider /> from react-intl.

Before v0.0.1-beta.1

Before v0.0.1-beta.1, Ory Elements exposed a singular style.css file which contained all the required fonts and icons necessary to work out of the box. This was convenient for elements to work out of the box, but caused the bundle size to be larger than necessary, especially for applications that only use a few components or their own icons and fonts.

The new version of Ory Elements now only exposes the CSS for the components in the style.css file, and the rest of the CSS are optional and can be imported individually.

// Ory Elements
// optional global css reset
import "@ory/elements/assets/normalize.css"
// optional fontawesome icons
import "@ory/elements/assets/fa-brands.min.css"
import "@ory/elements/assets/fa-solid.min.css"
import "@ory/elements/assets/fontawesome.min.css"

// optional fonts
import "@ory/elements/assets/inter-font.css"
import "@ory/elements/assets/jetbrains-mono-font.css"

// required styles for Ory Elements
import "@ory/elements/style.css"

Quickstart: Storybook

Explore the Ory Elements via Storybook!

Clone this repository and run:

npm run initialize
npm run build
# or `npm run build:clean` to ensure no packages have cached versions
npm run storybook

Contributing

Write a new component inside the src/react-components directory with its corresponding CSS in src/theme. Check it out by writing a new story for the component in the src/stories folder.

Add a test to verify the component works correctly by creating a new file next to the component file with the same name and an added *.spec.ts extension. All E2E and component tests are written in Playwright.

Example Apps

To contribute an example application, please add it to the examples/ folder. To ensure the example works correctly within the Lerna build system, add the elements package to the example package.json with an asterisk * as the version.

Below is an example of how you should add the package.

...
"devDependencies": {
"@ory/elements": "*"
}
...

Default Translations

Ory Elements comes with default translations for a few language, like Spanish and German. The language files are located in the src/locales directory. The English messages are extracted from this codebase and merged with Kratos messages. To update them, run npm run generate-locales. They need to be updated every time new messages are added to Elements or Kratos. All other languages are derived from the English messages. The IntlProvider from Ory Elements loads the default translations.

Understanding Ory Elements

Bundling System

Ory Elements uses Lerna to bundle each package in the Ory Elements mono-repository. This also helps with package management and build caching. Lerna also publishes the code to the public npm registry for us.

Lerna also use Nx to build the packages in parallel.

Strongly typed CSS using Vanilla-Extract

Vanilla-Extract is used to strongly type the CSS, a type of CSS-in-JS library which generates a static CSS file for us when the library is built. This means we can manage our CSS and reduce a lot of typing, since it can generate the CSS classes for us.

Here is an example of vanilla-extract in action!

export const dividerStyle = recipe({
  base: {
    display: "block",
    textAlign: "center",
    overflow: "hidden",
    boxSizing: "border-box",
    border: 0,
    borderTop: `${pxToRem(4)} solid`,
    borderColor: oryTheme.border.def,
    width: pxToRem(64),
  },
  variants: {
    sizes: {
      fullWidth: {
        width: "100%",
      },
    },
  },
})

Generated JS function.

var dividerStyle = createRuntimeFn({
  defaultClassName: "_3ldkmt0",
  variantClassNames: { sizes: { fullWidth: "_3ldkmt1" } },
  defaultVariants: {},
  compoundVariants: [],
})

And the CSS.

gO .\_3ldkmt0 {
  display: block;
  text-align: center;
  overflow: hidden;
  box-sizing: border-box;
  border: 0;
  border-top: 0.25rem solid;
  border-color: var(--ory-theme-border-def);
  width: 4rem;
}

.\_3ldkmt1 {
  width: 100%;
}

Overriding Styles

Vanilla-Extract also provides us theme variables which we can give static names. This means we can overwrite them inside the project consuming the library!

:root {
  --ory-theme-font-family: Inter;
  --ory-theme-font-style: normal;
  --ory-theme-accent-def: #3d53f5;
  --ory-theme-accent-muted: #6475f7;
  --ory-theme-accent-emphasis: #3142c4;
  --ory-theme-accent-disabled: #e0e0e0;
  --ory-theme-accent-subtle: #eceefe;
  --ory-theme-foreground-def: #171717;
  --ory-theme-foreground-muted: #616161;
  --ory-theme-foreground-subtle: #9e9e9e;
  --ory-theme-foreground-disabled: #bdbdbd;
  --ory-theme-foreground-on-dark: #ffffff;
  --ory-theme-foreground-on-accent: #ffffff;
  --ory-theme-foreground-on-disabled: #e0e0e0;
  --ory-theme-background-surface: #ffffff;
  --ory-theme-background-canvas: #fcfcfc;
  --ory-theme-error-def: #9c0f2e;
  --ory-theme-error-subtle: #fce8ec;
  --ory-theme-error-muted: #e95c7b;
  --ory-theme-error-emphasis: #df1642;
  --ory-theme-success-emphasis: #18a957;
  --ory-theme-border-def: #e0e0e0;
  --ory-theme-text-def: #ffffff;
  --ory-theme-text-disabled: #757575;
  --ory-theme-input-background: #ffffff;
  --ory-theme-input-disabled: #e0e0e0;
  --ory-theme-input-placeholder: #9e9e9e;
  --ory-theme-input-text: #424242;
}

Inside our components we provide the <ThemeProvider /> which exposes the themeOverrides property so that you can implement your own theme.

// Ory Elements
// optional global css reset
import "@ory/elements-preact/assets/normalize.css"
// optional fontawesome icons
import "@ory/elements-preact/assets/fa-brands.min.css"
import "@ory/elements-preact/assets/fa-solid.min.css"
import "@ory/elements-preact/assets/fontawesome.min.css"

// optional fonts
import "@ory/elements-preact/assets/inter-font.css"
import "@ory/elements-preact/assets/jetbrains-mono-font.css"

// required styles for Ory Elements
import "@ory/elements-preact/style.css"

const Main = () => {
  return (
    <ThemeProvider themeOverrides={customTheme}>
      <Router>
        <Route path="/" component={Dashboard} />
        <Route path="/login" component={Login} />
        <Route path="/signup" component={Register} />
        <Route path="/verification" component={Verification} />
        <Route path="/recovery" component={Recovery} />
        <Route path="/settings" component={Settings} />
      </Router>
    </ThemeProvider>
  )
}

Theme CSS in Express.js

For Express.js the library also exports a helper function which registers all the CSS the library produces.

import express, { Application } from "express"
import { assignInlineVars } from "@vanilla-extract/dynamic"
import { oryTheme, Theme } from "../theme"

export const RegisterOryElementsExpress = (app: Application, theme: Theme) => {
  app.use("/theme.css", (req, res) => {
    res.header("Content-Type", "text/css")
    res.send(
      `body {${assignInlineVars(oryTheme, {
        ...oryTheme,
        ...theme,
      }).toString()}}`,
    )
  })
  app.use("/", express.static("node_modules/@ory/elements/dist"))
}

Which exposes all the relevant CSS files for us which we just import in our HTML page:

<link rel="stylesheet" href="style.css" /> // the default theme variables
<link rel="stylesheet" href="theme.css" /> // the overidden theme variables

Rendering components

We can then reference a component through handlebars' helper functions that return pure HTML.

{{{card}}}

{{{typography "Welcome!" "headline37" "foregroundDefault"}}}
// Render the data using a view (e.g. Jade Template):
res.render("login", {
  ...flow,
  typography: (text: string, size: any, color: any) =>
    Typography({
      children: text,
      type: "regular",
      size,
      color,
    }),
  card: UserAuthCard({
    title: !(flow.refresh || flow.requested_aal === "aal2")
      ? "Sign In"
      : "Two-Factor Authentication",
    flow: flow as SelfServiceFlow,
    flowType: "login",
    cardImage: "ory-logo.svg",
    additionalProps: {
      forgotPasswordURL: "recovery",
      signupURL: initRegistrationUrl,
      logoutURL: logoutUrl,
    },
  }),
})

Component System

Ory Elements solely relies on React components since they are easy to write and provides support to a large React based ecosystem. The project then bundles these components to their respective needs. An example is bundling for Preact which you can find in the packages' folder. It uses the React components directly in this case, but bundles it specifically for Preact support.

Each component relies on some CSS styles, which are located in the theme directory. To understand how this works, please refer to the CSS System

Express.js systems

Express.js is an edge-case which requires the React components to be wrapped by the ReactDOMServer to produce static HTML. This essentially does server-side rendering of the components and removes any client-side JavaScript. Each component needs to be wrapped by ComponentWrapper which essentially uses ReactDOMServer. The elements-markup package then bundles the React library with it so that the React code lives with the component library. The exported function takes the component props and context. The context is used for context providers, such as the IntlProvider from react-intl.

Here is an example of exporting the UserAuthCard.

import {
  UserAuthCard as userAuthCard,
  UserAuthCardProps,
} from "../react-components"
import { ComponentWrapper, Context } from "./component-wrapper"

export const UserAuthCard = (
  props: UserAuthCardProps,
  context: Context = {},
) => {
  return ComponentWrapper(userAuthCard, props, context)
}

export type { UserAuthCardProps } from "../react-components"

Asset System

Assets are bundled into a singular style.css file under each packages' dist/ folder. Anything placed inside the assets folder will be bundled. They can also be directly imported by the React components to be used and are sometimes required by a component. An example is the Social Button Component.

Versioning and Publishing

Ory Elements uses a fully automatic release publishing pipeline. All that is necessary is to create a new release on GitHub, after which the workflow runs all the necessary steps to release the modules to the NPM registry.

Using local Ory SDKs

Most of the time, new features to this repository need some work in the corresponding Ory products to work. To make the development cycle more productive, it's possible to generate the SDK from a local OpenAPI / Swagger spec file.

export KRATOS_DIR=/path/to/kratos # point this variable to the root of your local Kratos clone

make build-sdk

This copies the current OpenAPI spec from the local Kratos repository to the current Elements directory (./contrib/sdk/api.json).

After that, it generates the Typescript SDK according to the spec and copies it to the node_modules directory. This overrides the currently installed module!

Now you can use the updated SDK without publishing to NPM first.

Testing @ory/elements changes locally

To test local changes in @ory/elements in a local Ory examples repository, you can point NPM to use a local directory instead of a remote package from the registry.

This requires to first build @ory/elements:

# In your cloned elements directory
npm run build # or more specialized `npm run build:react, etc.`

Make sure, that the build passed without errors!

After that, you can set the path to elements in the package.json of your project:

npm i /path/to/elements/packages/markup

# or for preact
# npm i /path/to/elements/packages/preact

# or for react
# npm i /path/to/elements/packages/react

Make sure to not commit these changes, as they will break on CI or on other machines that have a different setup.

elements's People

Contributors

1xtr avatar aeneasr avatar ahmedrowaihi avatar benehiko avatar cbiglemon avatar dasprid avatar francesconi avatar gabecurran avatar gustavovalverde avatar hperl avatar jfcurran avatar jonas-jonas avatar jorgeepc avatar kevgo avatar kmherrmann avatar lbbo avatar matthiastz avatar maximilianhagelstam avatar misamu avatar mszekiel avatar olofholmlund avatar omarhachach avatar ory-bot avatar ricardo-osorio-santos avatar veteran29 avatar vinckr avatar zepatrik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

elements's Issues

Settings: showing string enums as a drop-down list

Preflight checklist

Describe your problem

String enums use a text input in the settings page.

Describe your ideal solution

It'd be convenient to select a value from the list for enums. Now it's entered as a text.

Workarounds or alternatives

Version

v0.11.0

Additional Context

No response

Host Ory Elements Storybook

Preflight checklist

Describe your problem

We don't have an interactive visualization of how Ory Elements looks like

Describe your ideal solution

Host Storybook to visually show the components

Workarounds or alternatives

None

Version

latest

Additional Context

No response

Recovery flow broken

Preflight checklist

Describe the bug

On the Recovery flow, once you enter the code, it breaks the app.

image

The reason is that it receives a 422 about a redirect which is not handled.

image

Bug 2:
After this, if the user clicks the Submit again, the app goes in an infinite redirect/reload bug. It's quite hard to stop it, easiest way is to close the browser tab altogether.

Reproducing the bug

Run official Next.js example.
Try to complete the Recovery flow, enter Code.

Version

master

I'm using Ory Network + ory tunnel as in the official example.

Version releases break `npm ci` in dependents

Preflight checklist

Describe the bug

Version release to NPM currently break ci pipelines across Ory's repos with an npm error. Not sure what causes it, but we need to fix that :)

Reproducing the bug

  1. Release a new ory/elements version to the npm registry
  2. start a ci run in the network repo
  3. See the world burn (see the error)

Relevant log output

#12 sha256:17cb8e5d3f03427013d0ae990dbb92f47e22ac4a3e7bcd0087c8baa08e83e07b
#12 2.875 npm notice 
#12 2.875 npm notice New minor version of npm available! 8.11.0 -> 8.19.2
#12 2.875 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v8.19.2>
#12 2.875 npm notice Run `npm install -g [email protected]` to update!
#12 2.875 npm notice 
#12 2.875 npm ERR! code EUSAGE
#12 2.878 npm ERR! 
#12 2.878 npm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
#12 2.878 npm ERR! 
#12 2.879 npm ERR! Invalid: lock file's @ory/[email protected] does not satisfy @ory/[email protected]
#12 2.879 npm ERR! 
#12 2.879 npm ERR! Clean install a project
#12 2.879 npm ERR! 
#12 2.879 npm ERR! Usage:
#12 2.879 npm ERR! npm ci
#12 2.880 npm ERR! 
#12 2.880 npm ERR! Options:
#12 2.880 npm ERR! [--no-audit] [--foreground-scripts] [--ignore-scripts]
#12 2.880 npm ERR! [--script-shell <script-shell>]
#12 2.880 npm ERR! 
#12 2.880 npm ERR! aliases: clean-install, ic, install-clean, isntall-clean
#12 2.880 npm ERR! 
#12 2.880 npm ERR! Run "npm help ci" for more info
#12 2.883 
#12 2.883 npm ERR! A complete log of this run can be found in:
#12 2.883 npm ERR!     /root/.npm/_logs/2022-11-03T18_23_01_384Z-debug-0.log

Relevant configuration

No response

Version

master

On which operating system are you observing this issue?

No response

In which environment are you deploying?

No response

Additional Context

No response

Provide way to use client-side router for additionalProps links

Preflight checklist

Describe your problem

Having the additonalProps links be an <a> tag forces a full refresh each time. This is a UX problem, as we want to utilize our client-side router.

Describe your ideal solution

I imagine a way to either pass the component itself to the ThemeProvider. I.e. having the Provider accept a linkComponent:

export type ThemeProviderProps = {
  theme?: "light" | "dark"
  themeOverrides?: Partial<Theme>
  children?: React.ReactNode
  LinkComponent?: React.ElementType
}

This only has the issue of having the differing navigation libraries not having the same support certain features (children for links, having href vs to as the link prop etc.), so I am not in favor of this way. (Although, this could be omitted by defining your own component which wraps your link component)

Two more idiomatic solutions would have having either the ThemeProvider or UserAuthCard itself accept a constructor like so:

interface LinkProps {
    children: React.ReactNode
    link: string
    icon?: React.ReactNode
    props?: object
}

export type RegistrationSectionAdditionalProps = {
  loginURL?: string | (props: LinkProps) => JSX.Element
}

This way any component can be used, with a string just using a <a> tag.

The other idiomatic solution would be to accept an onClickHandler which could then use the navigation library's navigation functionality:

export type RegistrationSectionAdditionalProps = {
  loginURL?: string | (link: string) => void
}

Workarounds or alternatives

None

Version

v0.0.1-alpha.27

Additional Context

I'm available to help with this feature.

bug: Buttons are transparent with just core CSS styles

Preflight checklist

Describe the bug

By default with just the required CSS styles, the button on UserAuthCard has a transparent background. This makes it invisible.

image

Reproducing the bug

Set up '@ory/elements' with just the core styles (only import @ory/elements/style.css as defined in the docs). Create a Login variant of the UserAuthCard. The button should be visible, and it is not.

Relevant log output

No response

Relevant configuration

No response

Version

0.0.1-beta.3

On which operating system are you observing this issue?

None

In which environment are you deploying?

None

Additional Context

No response

Double eye icons in MS Edge

Preflight checklist

Ory Network Project

https://github.com/ory/elements

Describe the bug

You get overlapping eye icons on the password.

Screenshot 2023-10-23 at 13 12 53

Reproducing the bug

Go to password in the Ory Account Experience.

Relevant log output

No response

Relevant configuration

No response

Version

latest

On which operating system are you observing this issue?

macOS

In which environment are you deploying?

Ory Network

Additional Context

::-ms-reveal {
    display: none;
}

It just needs the above setting see MS docs.

Custom Ordering rules

Preflight checklist

Describe your problem

Currently the UserAuthCard only provides a hard-coded order of fields. e.g. the OIDC flows are always at the top and password flow fields below.

We should provide a way to have custom ordering on this.

For more information see this discussions https://github.com/orgs/ory/discussions/44

Describe your ideal solution

Have an object determining the ordering or a function to export the ordering to the client importing the library.

Workarounds or alternatives

None

Version

v0.0.1-alpha.28

Additional Context

No response

iOS 12 Support.

Preflight checklist

Describe the bug

Ory Elements doesn't work on iOS 12.

Reproducing the bug

It is easy to reproduce on a simulator or real devices.

Relevant log output

No response

Relevant configuration

No response

Version

v0.0.1-beta.3

On which operating system are you observing this issue?

None

In which environment are you deploying?

None

Additional Context

No response

feat: fields should automatically trim whitespaces around values (e.g. OTP)

Preflight checklist

Describe your problem

When I double clicked and CTRL+C-ed the OTP from my mail, it copied a whitespace in front of it and I didn't notice, only after the form told me, the OTP was wrong.

Describe your ideal solution

Maybe there is an easy way to trim the value of some fields, where it makes sense. This is minor priority, but very convenient. :)

Workarounds or alternatives

Don't know if there are any workarounds right now - probably only implementing this whole library on your own?

Version

v0.0.1-alpha.27

Additional Context

No response

UserSettingsCard does not submit on enter keypress for 'password' method

Preflight checklist

Ory Network Project

No response

Describe the bug

UserSettingsCard does not submit on enter keypress for 'password' method but works when pressing 'save' in next.js.

Reproducing the bug

Use UserSettingsCard to change the users password, type new password then press enter. Notice the form doesn't submit. Press save, notice form submits correctly.

Relevant log output

none

Relevant configuration

No response

Version

0.1.0-beta.14

On which operating system are you observing this issue?

macOS

In which environment are you deploying?

production

Additional Context

No response

React and Preact example does not handle error code 422

Preflight checklist

Describe the bug

On flows that could result in an error with status code 422 we would want to redirect the user to that page or at least use some of the url data such as the flow id to retrieve the necessary data to complete the flow.

Example:

  1. Login flow is initialized
  2. User wants to login through webauthn
  3. API returns back an error with code 422 and a redirect_url
  4. React / Preact needs to redirect the user to the url / or catch the new flow id and get the new flow data in the background.
  5. User is presented a followup form with the correct data
  6. Submit login

Another place where this exists is Registration and Settings page with passwordless and oidc.

Reproducing the bug

Try link an oidc provider in the account settings page.

Additional Context

We have some functions covering this already:

Translations don't work for registration traits

Preflight checklist

Ory Network Project

No response

Describe your problem

The translations don't work well with registration traits due to the dynamic nature of the trait titles. This data is set by the Identity schema and requires that the implementer somehow replace the titles before they are used by the Ory Elements UserAuthCard. See this discussion on the topic #118 (reply in thread)

Describe your ideal solution

However, considering that we support translations now, it might make sense to add keys related to the traits per language. For example

{
  "identities.messages.1010001": "Sign in",
  "identities.messages.1010002": "Sign in with {provider}",
  "traits.email": "Email",
  "traits.phone": "Mobile Number"
}

Workarounds or alternatives

One could replace the JSON data for these specific traits in the language you would like them to display in. But this requires implementing your own strategy outside of the translation layer of Ory Elements, which isn't ideal.

Version

0.1.0-beta-10

Additional Context

No response

Next example doesn't build

Preflight checklist

Describe the bug

build throws the following errors:

  • @ory/client missing
  • axios missing
  • and a TS error:
./pages/login.tsx:104:21 at setFlow(err.response?.data)
Type error: Argument of type 'unknown' is not assignable to parameter of type 'SetStateAction<LoginFlow | null>'.

There might be more TS errors, it stops at the first one.

Reproducing the bug

run build

Relevant log output

No response

Relevant configuration

No response

Version

master

On which operating system are you observing this issue?

None

In which environment are you deploying?

None

Additional Context

No response

Email verification redirect option on certain errors

Preflight checklist

Ory Network Project

No response

Describe your problem

When receiving errors on email verification code like The code was already used. Please request another code. or when logging in Account not active yet. Did you forget to verify your email address?, I'd expect there to be a link to resend the confirmation code, or something. It would prove to be much nicer UX and a DX since the developer doesn't have to implement it himself. (which can be a bit difficult to fit in since the whole card is managed by @ory/elements

screenshot of the auth error

Describe your ideal solution

There would be a link or a button to resend the verification email when the error specifies that that is necessary

Workarounds or alternatives

Manually implement it somehow

Version

@ory/elements: 0.1.0-beta.16

Additional Context

No response

InputFields should allow autocomplete

Preflight checklist

Describe the bug

Autocomplete is not entering the user password correctly

Reproducing the bug

Try an autocomplete with the login form, the password field will be populated by the username.

The bug exists due to https://github.com/ory/elements/blob/main/src/react-components/ory/helpers/node.tsx#L207-L211

Relevant log output

No response

Relevant configuration

No response

Version

latest

On which operating system are you observing this issue?

No response

In which environment are you deploying?

Ory Cloud

Additional Context

https://ory-community.slack.com/archives/C010F7Z4XM1/p1668693452475839

Translation / Add support for custom translations in @ory/elements-markup

Preflight checklist

Ory Network Project

No response

Describe your problem

We're deploying self-hosted Ory Kratos, to speed up the project we've used the node self-serve UI from Ory.
During the implementation we've found out that unlike to its React counterpart you can't pass customTranslations to @ory/elements-markup components.

Describe your ideal solution

Addition of customTranslations parameter to elements-markup component-wrapper intl provider.

Workarounds or alternatives

I don't see other viable alternative.

Version

0.1.0-beta.11

Additional Context

No response

Unable to start Storybook

Preflight checklist

Describe the bug

I get an error when running Storybook on a fresh install

Reproducing the bug

  1. Clone repo
  2. npm i
  3. npm run storybook

Results in:

Bildschirmfoto 2022-10-05 um 17 08 06

Relevant log output

โ„น ๏ฝขwdm๏ฝฃ: Compiled successfully.
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚                                                                                          โ”‚
โ”‚   Storybook 6.5.10 for React started                                                     โ”‚
โ”‚   5.86 s for manager and 2.45 s for preview                                              โ”‚
โ”‚                                                                                          โ”‚
โ”‚    Local:            http://localhost:6006/                                              โ”‚
โ”‚    On your network:  http://192.168.2.183:6006/                                          โ”‚
โ”‚                                                                                          โ”‚
โ”‚   A new version (6.5.12) is available!                                                   โ”‚
โ”‚                                                                                          โ”‚
โ”‚   Upgrade now: npx storybook@latest upgrade                                              โ”‚
โ”‚                                                                                          โ”‚
โ”‚   Read full changelog: https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md   โ”‚
โ”‚                                                                                          โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ
5:06:08 PM [vite] โœจ new dependencies optimized: @storybook/react/dist/esm/client/docs/config, @storybook/react/dist/esm/client/preview/config, @storybook/addon-links/preview.js, @storybook/addon-docs/preview.js, @storybook/addon-actions/preview.js, ...and 4 more
5:06:08 PM [vite] โœจ optimized dependencies changed. reloading
5:06:09 PM [vite] Internal server error: Failed to resolve entry for package "@ory/elements". The package may have incorrect main/module/exports specified in its package.json.
  Plugin: vite:import-analysis
  File: /Users/foobar/workspace/js/elements/.storybook/preview.tsx
      at packageEntryFailure (file:///Users/foobar/workspace/js/elements/node_modules/vite/dist/node/chunks/dep-0fc8e132.js:34705:11)
      at resolvePackageEntry (file:///Users/foobar/workspace/js/elements/node_modules/vite/dist/node/chunks/dep-0fc8e132.js:34702:5)
      at tryNodeResolve (file:///Users/foobar/workspace/js/elements/node_modules/vite/dist/node/chunks/dep-0fc8e132.js:34452:20)
      at Context.resolveId (file:///Users/foobar/workspace/js/elements/node_modules/vite/dist/node/chunks/dep-0fc8e132.js:34254:28)
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at async Object.resolveId (file:///Users/foobar/workspace/js/elements/node_modules/vite/dist/node/chunks/dep-0fc8e132.js:35511:32)
      at async TransformContext.resolve (file:///Users/foobar/workspace/js/elements/node_modules/vite/dist/node/chunks/dep-0fc8e132.js:35276:23)
      at async normalizeUrl (file:///Users/foobar/workspace/js/elements/node_modules/vite/dist/node/chunks/dep-0fc8e132.js:40249:34)
      at async TransformContext.transform (file:///Users/foobar/workspace/js/elements/node_modules/vite/dist/node/chunks/dep-0fc8e132.js:40389:47)

Relevant configuration

No response

Version

master

% node --version
v16.15.1

On which operating system are you observing this issue?

No response

In which environment are you deploying?

No response

Additional Context

No response

NextJS example

Preflight checklist

Describe your problem

We need an example of NextJS using Ory Elements. This will then later be included in to the Ory Docs.

@GabeCurran

Describe your ideal solution

Create a NextJS example using Ory Elements for:

  • Login
  • Registration
  • Verification
  • Recovery
  • Settings

A lot of the code used within the React SPA example should be transferable with some specific NextJS steps.

Please do remember that Login and Registration has the following complex flows:

  • Social Sign in
  • Two-Factor authentication
  • Passwordless

I don't think we should have a problem implementing them, but there might be an edge case the library does not support for NextJS specifically.

Workarounds or alternatives

None

Version

latest

Additional Context

No response

Translation / i18n support

Preflight checklist

Describe your problem

Currently, text can't be translated. It's hardcoded in React components.

Describe your ideal solution

Add support for i18n / translation so we can translate / change any text in components.

Workarounds or alternatives

None

Version

latest

Additional Context

No response

Add chromatic URL to github page

Preflight checklist

Describe your problem

Could not find hosted storybook

Describe your ideal solution

Add https://63b58e306cfd32348fa48d50-gcoxqogaiv.chromatic.com to https://ory.github.io/elements/ and readme

Workarounds or alternatives

Version

Additional Context

No response

Ory Account Experience - Login - Show/hide password button toggled via tabbing

Preflight checklist

Ory Network Project

https://account.toolsfortana.com

Describe the bug

Input your password, tab to the "Sign in" button, and when you tab over the show/hide eye icon, it triggers a click on it, revealing your password.

password_revealed

Reproducing the bug

See description.

Bug can be reproduced here: https://account.toolsfortana.com/ui/login

Relevant log output

No response

Relevant configuration

No response

Version

Ory Network

On which operating system are you observing this issue?

Ory Network

In which environment are you deploying?

Ory Network

Additional Context

No response

Toggle switch to show the user's password when on the UserSettingsCard

Preflight checklist

Describe your problem

My feature request is not related to a problem or issue. This request concerns the SettingsFlow. The concern is that once the user has submitted the password reset code, we take them to the UserSetting card within the auth flow. At this point, they can enter their new password. However, there is no way to confirm they have entered their desired value. If an incorrect value is entered, they are forced to go through the password reset process for a second time.

Describe your ideal solution

Our ideal solution is a toggle switch that shows the entered value in the password field as clear text. I'll paste in a mockup our Project Manager and Lead Designer created in Zeplin that illustrates our request.

image

Workarounds or alternatives

An alternative would be a password confirmation box. I.e., a second password input field that confirms the characters match the value in the first password input field.

Version

v0.0.1-beta.7

Additional Context

I have no additional context at this time.

Thank you

Label ID instead of Email

Preflight checklist

Describe the bug

I'm using the Email & Password identity schema. The rendered element shows ID, even though I have configured "Email" for title in the schema.

 "title": "Email",

screenshot:

image

Reproducing the bug

Run the official example with Email & Password ID schema.

Relevant log output

No response

Relevant configuration

No response

Version

latest release

On which operating system are you observing this issue?

macOS

In which environment are you deploying?

Binary

Additional Context

No response

Mark field as invalid in built-in UI when custom validation from webhook failed

Preflight checklist

Ory Network Project

https://strange-dhawan-7s0r5y1fu3.projects.oryapis.com

Describe your problem

We have set up a flow-interrupting webhook which returns 403 status code when our custom check for one of the registration fields fails. We return the payload as in this example: https://www.ory.sh/docs/guides/integrate-with-ory-cloud-through-webhooks#flow-interrupting-webhooks, but with โ€œerrorโ€ type.

As a result the error message is shown below the validated field (field is provided in our response as instance_ptr), but the field itself is shown as still valid (it is green instead of red).

Describe your ideal solution

Provide additional field in webhook error payload (like valid: false) and use it to set valid state of the input.
Also field can be always considered invalid if a message with the "error" type is returned for it.

Workarounds or alternatives

Have not found any.

Version

Ory Network

Additional Context

https://ory-community.slack.com/archives/C02MR4DEEGH/p1698307141585029

Current behaviour:
Screenshot 2023-10-26 at 13 59 02

Recovery flow: email address stays filled in the code field

Preflight checklist

Describe the bug

After sending the email in the recovery flow, the email stays filled in the UI, in the code field.

I think people would be quite confused about this, not realising that they need to delete the email address first and then copy-paste the code.

Reproducing the bug

Run the next.js example, do the recovery.

Version

master

Publish ory elements to Chromatic

Preflight checklist

Describe your problem

Developing React components based on Figma can sometimes take a while and the design might not match up with the implementation. For quick feedback we could link the components to Chromatic and have it integrated inside Figma.

Describe your ideal solution

We can integrate Figma with our Ory Themes repository through Chromatic
https://www.figma.com/community/plugin/1056265616080331589/Storybook-Connect

We need to build and publish the themes repository to Chromatic through the CI
https://www.chromatic.com/docs/custom-ci-provider

Workarounds or alternatives

None.

Version

latest

Additional Context

No response

NPM version is always ahead of github tag

Preflight checklist

Describe the bug

Lerna is bumping the version from the given git tag here https://github.com/ory/elements/blob/main/.github/workflows/release.yml#L23

We should prevent lerna from bumping to a new version from this git tag and instead just use the GH tag version.

Reproducing the bug

  1. Create a new GH realease e.g. v0.0-alpha.25
  2. The github action will run which does a release to npm
  3. The npm version will be one above on v0.0-alpha.26

Relevant log output

No response

Relevant configuration

No response

Version

latest

On which operating system are you observing this issue?

No response

In which environment are you deploying?

No response

Additional Context

No response

Infinite reload loops

Preflight checklist

Describe the bug

The default part in HandleError can cause infinite reload loops.

default:
// The flow could not be fetched due to e.g. network or server issues. Let's reload the page!
// This will trigger the useEffect hook again and we will try to fetch the flow again.
return Promise.resolve(router.reload())

I recommend changing it to the one before, where we only reload the path.

Reproducing the bug

Next.js example, go to recovery flow, manually delete the csrf cookie, reload.

Relevant log output

No response

Relevant configuration

No response

Version

master

On which operating system are you observing this issue?

None

In which environment are you deploying?

None

Additional Context

No response

Document code and usage per package

Preflight checklist

Describe your problem

We need generated code docs (tsdocs) and readme's per package.

Describe your ideal solution

Document the components and ory components

Workarounds or alternatives

None

Version

latest

Additional Context

No response

Reduce total CSS used in Ory Elements

Preflight checklist

Describe your problem

Ory Elements have a lot of CSS required to work out of the box.
The list is:

  • Font Awesome (brands)
  • Inter fonts

Describe your ideal solution

We could reduce the total CSS required by stripping the files from unnecessary icons and fonts which we do not use.

Workarounds or alternatives

None.

Version

v0.0.1-beta.1

Additional Context

No response

TypeError: null attempting to click Submit button using Safari - iOS 15.3

Preflight checklist

Describe the bug

TypeError: null is not an object (evaluating 'y.name') is what is shown in the Developer Tools console, found in Safari. One must use Safari's developer tools to see the error outputs from an Xcode simulator.

image

Reproducing the bug

  • Install Ory Element's React SPA example. I used the instructions from README.md file
  • Fire up Vite via npm run dev -- --port 3000 and Ory Tunnel via ory tunnel http://localhost:3000 --project <project-slug> --dev
  • Install a simulator with iOS 15.3 or 15.2 via Xcode
  • Push the logical home button so that you can go to the Safari browser
  • Navigate to http://127.0.0.1:3000
  • At this point, I advise having your Mac's Safari open so you can see the log output for your simulator
  • Press Submit on the sample login form

Relevant log output

[Error] TypeError: null is not an object (evaluating 'y.name')
	onSubmit (index.mjs:1791)
	callCallback2 (react-dom_client.js:3674)
	dispatchEvent
	invokeGuardedCallbackDev (react-dom_client.js:3699)
	invokeGuardedCallback (react-dom_client.js:3733)
	invokeGuardedCallbackAndCatchFirstError (react-dom_client.js:3736)
	executeDispatch (react-dom_client.js:7016)
	processDispatchQueueItemsInOrder (react-dom_client.js:7036)
	processDispatchQueue (react-dom_client.js:7045)
	dispatchEventsForPlugins (react-dom_client.js:7053)
	batchedUpdates$1 (react-dom_client.js:18909)
	batchedUpdates (react-dom_client.js:3579)
	dispatchEventForPluginEventSystem (react-dom_client.js:7176)
	dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay (react-dom_client.js:5478)
	dispatchEvent (react-dom_client.js:5472:93)
	dispatchDiscreteEvent (react-dom_client.js:5449)
	dispatchDiscreteEvent

Relevant configuration

Do not sign into Ory after entering the `ory tunnel` command. Everything else was done as prescribed via the README instructions.

Version

v0.0.1-beta.7

On which operating system are you observing this issue?

macOS

In which environment are you deploying?

Ory Cloud

Additional Context

Please take a look at CanIUse. There you can see that there is a bug with the SubmitEvent API: submitter functionality starting on iOS 15.3.

My coworker found the problematic code resides in the following file:
src/react-components/ory/helpers/user-auth-form.tsx, ~line 83

Thank you

Add support to tick 'privacy policy/terms read' with link

Preflight checklist

Describe your problem

If you have a user registering on your site you want to make sure they read and understood the terms and read the privacy policy. So I am missing a way to specify a link to either of them and have the elements create a checkbox with some text? :)
Maybe I have to build my own UI then, but I like the seamless integration with Ory Elements and the components, so I would prefer a "native" solution.
It can also be a legal issue.

Describe your ideal solution

Props to specify the link for privacy policy and terms and conditions.

additionalProps: {
  privacyPolicyURL: "privacy",
  termsURL: "terms.pdf",
},

Workarounds or alternatives

Building my own UI...

Version

v0.0.1-alpha.27

Additional Context

Is it possible to save that information in Ory then? Can I create a schema for kratos that holds the "y" for "readPrivacyPolicy" or something? It is for legal reasons.

E2E Tests against Ory Network

Preflight checklist

Describe your problem

All of the Ory specific components need to be validated against Ory Network under each use case:

  • SPA
  • Server Side
  • Native

Describe your ideal solution

An e2e test runner similar to that of ory docs. This would however need to be using the ory tunnel instead of the proxy.

Basic general tests or test helpers with test selectors and mock data should also be kept within the elements-test package so that it can be versioned and used in other parts of the software as well as externally (users testing their apps).

Workarounds or alternatives

None

Version

Latest

Additional Context

No response

Flow error handler

Preflight checklist

Describe your problem

One of the most difficult aspects of integrating Ory into my frontend has been the flow error handling. I'm currently using this in my Next.js project, based on kratos-selfservice-ui-react-nextjs : https://gist.github.com/jgillich/b078cb3de9047054a458049187f27bbd

It has grown over time, and I'm pretty sure there are subtle bugs there because Sentry picks up on them occasionally, but I'm not sure how to resolve them. Porting it to the latest version of the ory client has been difficult as well. There are some error types in the client, but it doesn't seem complete nor do I know how to detect which error I actually have

This repo once again contains a bunch of boilerplate for error handling, and it also doesn't appear to handle everything correctly (#53)

I was excited about Ory Elements until I realized it doesn't (yet) solve this major pain point.

Describe your ideal solution

Ory should provide an easy to use method that takes an error type and returns actionable results, something like:

interface ParsedFlowError {
  type: "redirect_to" | "bad_request" | "server_error"
  redirect_url?: string
  error_message?: string
}

This would be entirely framework-agnostic.

Workarounds or alternatives

Try to do it yourself, poorly

Version

latest

Additional Context

No response

ory-elements loads a 2.4 MB CSS file, does critical CSS overrides

Preflight checklist

Describe the bug

Using ory-elements loads a 2.4 MB CSS file (minified size).

This file includes:

  • the full Font Awesome icon collection
  • the Inter font in 3 font weights
  • the JetBrainsMono font in 2 font weights

Most importantly, it also includes normalize.css which is a full CSS reset, basically conflicting with every single project which doesn't use the exact same file.

It also does global style overrides like textRendering: "geometricPrecision" etc.

I'm sorry to say but this way it's not usable in any project. This might work on a separate subdomain hosted auth screens, but then the whole point of this project is to do it inside an app, isn't it?

Reproducing the bug

Build a project, look at the bundled 2.4 MB CSS file.

Add onSubmit callback function to UserConsentCard

Preflight checklist

Describe your problem

The UserConsentCard doesn't allow you to pass an onSubmit callback function like the UserAuthCard. Rather, it only allows you to pass an action which is an HTTP POST request. This does not allow for much flexibility in terms of how the user consent is accepted. In our use case we would like to make a GraphQL request to our API to accept the user consent.

Describe your ideal solution

The UserConsentCard allows for you to pass an onSubmit function.

Workarounds or alternatives

We've had to add a dedicated endpoint to our API just for accepting the user consent which isn't really a workaround.

Version

v0.0.1-beta.6

Additional Context

No response

Localization of button Text / "already have an account" text

Preflight checklist

Describe your problem

I need to localize more than the title in <UserAuthCard /> Component (React).
This could also effect other components.

Describe your ideal solution

It would be great if there are some extra props for localizing those strings.

Workarounds or alternatives

.

Version

0.0.1-alpha.28

Additional Context

No response

UserAuthCard doesn't format the form body traits correctly

Preflight checklist

Describe the bug

When submitting the a registration form using UserAuthCard, the body object returned to the callback on the onSubmit prop formats the object incorrectly.
What is expected is:

{
    traits: {
        email: '[email protected]'
    },
    //... other
}

What is given is:

{
    "traits.email": '[email protected]',
    //... other
}

This means that unless care is taken, form values are not passed up to kratos correctly.

Reproducing the bug

  • Use Ory Elements to create a login form connected to Ory Kratos.
  • Observe the object give back in the onSubmit callback

Relevant log output

No response

Relevant configuration

No response

Version

0.0.1-beta.3

On which operating system are you observing this issue?

Other

In which environment are you deploying?

Kubernetes with Helm

Additional Context

No response

Component snapshot testing

Preflight checklist

Describe your problem

Components can change visually at any time and since this is a component library it needs to stay visually appealing and without major changes - unless of course it is a breaking change or a fix.

Describe your ideal solution

We need to have component snapshot testing to verify that the components are visually the same.

Snapshots will immediately alert us to any visual change automatically. This in tern reduces time spent on manual checks.

Workarounds or alternatives

None

Version

Latest

Additional Context

No response

Incorrect Export

Preflight checklist

Ory Network Project

No response

Describe the bug

Within @ory/elements-test/dist/index.d.mts, you're exporting as follows:

export * from './src/tests/'

However, ./src/tests/ doesn't exist - ./src/test/ does. Is this just a typo?

Reproducing the bug

  1. Install @ory\elements-test package.
  2. Attempt to import into tsx.
  3. Observe that import doesn't resolve.

Relevant log output

No response

Relevant configuration

No response

Version

Latest

On which operating system are you observing this issue?

None

In which environment are you deploying?

None

Additional Context

No response

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.