All Projects → Devessier → temporal-electronic-signature

Devessier / temporal-electronic-signature

Licence: GPL-3.0 License
Electronic signature demonstration built with Temporal and XState

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects
CSS
56736 projects
HTML
75241 projects
Svelte
593 projects

Projects that are alternatives of or similar to temporal-electronic-signature

xstate.dart
xstate for dart & flutter
Stars: ✭ 31 (-13.89%)
Mutual labels:  xstate
use-router-machine
Router state-machine hook, powered by XState (DEPRECATED).
Stars: ✭ 11 (-69.44%)
Mutual labels:  xstate
xstate-viz
Visualizer for XState machines
Stars: ✭ 274 (+661.11%)
Mutual labels:  xstate
pwl
Password Lense: reveal character types in a password
Stars: ✭ 20 (-44.44%)
Mutual labels:  xstate
state-machine-demo
A React state machine demo using xstate
Stars: ✭ 18 (-50%)
Mutual labels:  xstate
txstate
An effort to statically type xstate
Stars: ✭ 64 (+77.78%)
Mutual labels:  xstate
mlr3spatiotempcv
Spatiotemporal resampling methods for mlr3
Stars: ✭ 43 (+19.44%)
Mutual labels:  temporal
xstate-cpp-generator
C++ State Machine generator for Xstate
Stars: ✭ 33 (-8.33%)
Mutual labels:  xstate
imove
INACTIVE: Move your mouse, generate code from flow chart
Stars: ✭ 3,598 (+9894.44%)
Mutual labels:  xstate
xstate-marionettist
Model based testing with Jest, XState and Puppeteer or Playwright made easy
Stars: ✭ 23 (-36.11%)
Mutual labels:  xstate
ember-statecharts
Statecharts for Ember.js applications
Stars: ✭ 67 (+86.11%)
Mutual labels:  xstate
time-aware-template
Time Aware is a configurable application template that enables you to display time enabled layers in an ArcGIS web map using a time slider.
Stars: ✭ 20 (-44.44%)
Mutual labels:  temporal
roover
🐱 A lightweight audio library for React apps.
Stars: ✭ 70 (+94.44%)
Mutual labels:  xstate
samples-php
Temporal PHP SDK samples
Stars: ✭ 52 (+44.44%)
Mutual labels:  temporal
documentation
Temporal documentation
Stars: ✭ 49 (+36.11%)
Mutual labels:  temporal
awesome-cadence-temporal-workflow
A curated list of awesome things related to the Cadence and Temporal Workflow Engines
Stars: ✭ 63 (+75%)
Mutual labels:  temporal
s3x
s3x is a minio gateway providing an S3 API powered by TemporalX that uses IPFS as the data storage layer. It lets you turn any S3 application into an IPFS application with no change in application design
Stars: ✭ 85 (+136.11%)
Mutual labels:  temporal
st-hadoop
ST-Hadoop is an open-source MapReduce extension of Hadoop designed specially to analyze your spatio-temporal data efficiently
Stars: ✭ 17 (-52.78%)
Mutual labels:  temporal
xstate-catalogue
Professionally designed, interactive state machines
Stars: ✭ 616 (+1611.11%)
Mutual labels:  xstate
cj-temporal-models
No description or website provided.
Stars: ✭ 29 (-19.44%)
Mutual labels:  temporal

Temporal Electronic Signature

Temporal Electronic Signature is a demonstration of Temporal Node.js SDK used with XState to write workflows. By implementing an electronic signature system, we have to use all most important features of Temporal: activities, signals, queries, timers. Thanks to XState, the code we have to write is more predictable and prevents race conditions to happen.

validated-signature.mp4

Temporal Meetup

Watch the presentation of this project at the November 2021 Temporal Meetup.

What can be done with the application?

  • User selects a PDF document and validates her choice. It creates a signature procedure.
  • Uploaded document is shown and the user has to validate her choice, or cancel the procedure.
  • An email address is asked. A confirmation code will be sent to this address that will unblock the procedure.
  • The user has to fill the code she received by email.
  • If the code was correct, the document is signed and shown to the user.
  • If the procedure is not validated after one minute, it expires automatically.

How it works

The Stack

The application is built around three packages: app, api and temporal. The front-end is built on SvelteKit and TailwindCSS. The back-end uses AdonisJS.

The Workflow

The workflow is impleted using XState. XState is a library to create state machines in JavaScript. A state machine is a way to represent code with explicit states, that can be in one state at a time, and that goes from one state to another one via transitions. Statecharts are an improvement of state machines that bring some interesting features, such as hierarchical states, delayed transitions or service invokation. These features are used in the workflow.

Let's see how the workflow is organized with states. Open the visualizer

Setup

Those are the instructions to launch the signature system locally.

Except docker-compose package, all commands will have to be executed in separate shells and kept alived.

Dependencies

First, let's install dependencies at the root of the repository.

yarn install

Temporal

We have to launch Temporal server and Temporal worker.

Environment variables

Go to packages/temporal directory, create a .env from .env.example.

You will need credentials to authenticate to a SMTP server. If you do not have one, you can use your Gmail account credentials. If you have enabled 2FA on your Google account, you might need an additional step.

Temporal server

Execute the following command:

cd packages/docker-compose

docker-compose up -d

Temporal worker

Launch a Temporal worker:

cd packages/temporal

yarn start.watch

If you encounter issues, such as dyld: lazy symbol binding failed: Symbol not found, try the following actions:

  • Install Node.js version 14
  • Install node-gyp: npm install -g node-gyp

Back-end

Go to packages/api directory, create a .env by copying .env.example.

Then launch the API with the following command.

cd packages/api

yarn dev

Front-end

Launch SvelteKit development server with the following command.

cd packages/app

yarn dev

The front-end will then be accessible at http://localhost:3000.

If not, check the URL printed in the logs.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].