Code Monkey home page Code Monkey logo

bluetooth-terminal's Introduction

loginov.rocks

Contentful Webhook CI Infrastructure CI Shared CI Update GitHub CI Web App CI

CD

This open-source project introduces a monorepo tailored for the development, management, and deployment of my website, serving as a showcase for various web development concepts, it is an embodiment of efficiency, automation, and scalability.

Architecture

Overview

At its core, the Monorepo architecture consolidates the code of different services, the website itself, and configurations within a single repository, simplifying versioning and dependency management. Embracing Serverless architecture, powered by AWS Lambda functions, ensures a cost-effective approach to handling tasks triggered by events like content updates or scheduled GitHub data retrieval.

Cloud-native principles drive the utilization of AWS services such as SQS and S3, optimizing scalability and integration. The project also adheres to Infrastructure as Code (IaC) practices, defining the entire infrastructure for reproducibility and simplified change management. Static Site Generation enhances website performance, and pre-rendering content to boost user experience and search engine visibility.

The project's Event-driven approach adeptly responds to changes in content or the codebase. Continuous Integration and Continuous Deployment (CI/CD) pipelines, incorporating Quality Gates like build, test, and deployment processes, automate workflows seamlessly. Security remains paramount through the implementation of the Principle of Least Privilege, effectively minimizing potential risks.

Notably, the project also incorporates a Headless CMS approach for flexible content management and Containerization for efficient deployment and scalability. Website implements Single Page Application (SPA) architecture supporting Hybrid Rendering to strike a balance between server-side generation and client-side rendering for optimal performance.

This simplified yet comprehensive project benefits from efficient content management, automated workflows, and a scalable, cost-effective infrastructure. It stands as a practical template, showcasing best practices in modern web development, and provides an inclusive solution for developers seeking to elevate their projects.

Infrastructure View

Infrastructure View

Workflows

A) Contentful Update

  1. Editor changes the content in Contentful
  2. Contentful triggers Contentful Webhook Lambda
  3. Contentful Webhook sends a message to SQS Queue
  4. see C) Static Site Generation

B) GitHub Update

  1. EventBridge Update GitHub Rule triggers Update GitHub Function Lambda by schedule (once a day)
  2. Update GitHub Function gets data from GitHub API
  3. GitHub API resolves personal access token to a particular user's GitHub Profile and returns user data
  4. Update GitHub Function writes GitHub file (if not changed) to S3 Data Bucket
  5. Data Bucket sends a Put Object notification in the form of a message to SQS Queue
  6. see C) Static Site Generation

C) Static Site Generation

  1. SQS Queue waits for a batch of messages for 5 minutes and triggers Web App Function Lambda
  2. Web App Function gets GitHub file from S3 Data Bucket
  3. Web App Function gets Contentful data from Contentful Delivery API
  4. Contentful Delivery API gets data from Contentful and returns
  5. Web App Function builds Web App static assets and deploys them to S3 Web App Bucket

D) Continuous Deployment

  1. Developer pushes tag to GitHub Repository
  2. GitHub Repository triggers GitHub CD Action
  3. GitHub CD Action builds artifacts and uploads them to AWS Infrastructure
  4. GitHub CD Action deploys Lambdas from artifacts uploaded

Docs

Reference

bluetooth-terminal's People

Contributors

davidka avatar greenkeeper[bot] avatar greenkeeperio-bot avatar loginov-rocks avatar makio135 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

Watchers

 avatar  avatar  avatar  avatar  avatar

bluetooth-terminal's Issues

ReferenceError: navigator is not defined

Hello, thanks for this ble with serial port library

I got this error while trying to connect:
return navigator.bluetooth.requestDevice ({
            ^
ReferenceError: navigator is not defined

Here is my code :
var BluetoothTerminal = require('bluetooth-terminal');

var SERVICE_ID = 'c1b25000caaf6d0e4c337dae30052840';
var CHARACTERISTIC_ID = 'c1b25010caaf6d0e4c337dae30052840';
var CCC_ID = '2902'; // for Client Characteristic Configuration ID

// Obtain configured instance.
var terminal = new BluetoothTerminal(SERVICE_ID, CHARACTERISTIC_ID);

// Request the device for connection and get its name after successful connection.
terminal.connect().then(function() {
alert(terminal.getDeviceName() + ' is connected!');
});

An in-range update of eslint-plugin-jsdoc is breaking the build 🚨

The devDependency eslint-plugin-jsdoc was updated from 8.3.0 to 8.3.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-jsdoc is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details

Release Notes for v8.3.1

8.3.1 (2019-06-21)

Bug Fixes

  • add core-js/fn/array/flat-map import to no-undefined-types to ensure flatMap support (2b41cb8)
  • use stable flat-map polyfill (8254e70)
Commits

The new version differs by 3 commits.

  • 8254e70 fix: use stable flat-map polyfill
  • 2b41cb8 fix: add core-js/fn/array/flat-map import to no-undefined-types to ensure flatMap support
  • 40ffa50 chore: update dep. comment-parser (patch version)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Support printers?

Hi,

I was experimenting with web bluetooth with a thermal printer and tried using your nice lib instead of rewriting the same thing myself. This mostly worked out except for two things:

  1. You assume that the device supports notifications but this is not true for my test printer characteristic.properties.notify is false so any connect() attempt will fail
  2. You assume that I want to send a string encoded using a TextEncoder but the printer wants something encoded using a EscPosEncoder. As you have implemented send as public send(data: string): Promise<void> I had to rewrite that part including chunk splitting.

Would you be interesting in incorporating something for this or should i just keep it in a fork?

An in-range update of eslint is breaking the build 🚨

The devDependency eslint was updated from 5.15.3 to 5.16.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Release Notes for v5.16.0
  • dfef227 Build: gensite passes rulesMeta to formatter rendering (#11567) (Kevin Partington)
  • c06d38c Fix: Allow HTML formatter to handle no meta data (#11566) (Ilya Volodin)
  • 87a5c03 Docs: func-style: clarify when allowArrowFunctions is used (#11548) (Oliver Joseph Ash)
  • bc3e427 Update: pass rule meta to formatters RFC 10 (#11551) (Chris Meyer)
  • b452f27 Chore: Update README to pull in reviewer data (#11506) (Nicholas C. Zakas)
  • afe3d25 Upgrade: Bump js-yaml dependency to fix Denial of Service vulnerability (#11550) (Vernon de Goede)
  • 4fe7eb7 Chore: use nyc instead of istanbul (#11532) (Toru Nagashima)
  • f16af43 Chore: fix formatters/table test (#11534) (Toru Nagashima)
  • 78358a8 Docs: fix duplicate punctuation in CLI docs (#11528) (Teddy Katz)
Commits

The new version differs by 11 commits.

  • ded2f94 5.16.0
  • ea36e13 Build: changelog update for 5.16.0
  • dfef227 Build: gensite passes rulesMeta to formatter rendering (#11567)
  • c06d38c Fix: Allow HTML formatter to handle no meta data (#11566)
  • 87a5c03 Docs: func-style: clarify when allowArrowFunctions is used (#11548)
  • bc3e427 Update: pass rule meta to formatters RFC 10 (#11551)
  • b452f27 Chore: Update README to pull in reviewer data (#11506)
  • afe3d25 Upgrade: Bump js-yaml dependency to fix Denial of Service vulnerability (#11550)
  • 4fe7eb7 Chore: use nyc instead of istanbul (#11532)
  • f16af43 Chore: fix formatters/table test (#11534)
  • 78358a8 Docs: fix duplicate punctuation in CLI docs (#11528)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-jsdoc is breaking the build 🚨

The devDependency eslint-plugin-jsdoc was updated from 17.1.1 to 17.1.2.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-jsdoc is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details

Release Notes for v17.1.2

17.1.2 (2019-11-12)

Bug Fixes

  • no-undefined-types: do not crash on variadic arguments (eaf41ed)
  • no-undefined-types: properly parse template tag name(s) for defined types (5f48821)
  • no-undefined-types: surface jsdoctypeparser update to avoid errors with empty variadic argument; closes #419 (9124b7b)
Commits

The new version differs by 5 commits.

  • 9124b7b fix(no-undefined-types): surface jsdoctypeparser update to avoid errors with empty variadic argument; closes #419
  • eaf41ed fix(no-undefined-types): do not crash on variadic arguments
  • 160e86f chore: update typescript-eslint/parser
  • 5f48821 fix(no-undefined-types): properly parse template tag name(s) for defined types
  • fc465c8 testing: ensure rules that test with options have schemas

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of eslint-plugin-jsdoc is breaking the build 🚨

The devDependency eslint-plugin-jsdoc was updated from 10.2.0 to 10.3.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-jsdoc is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details

Release Notes for v10.3.0

10.3.0 (2019-07-05)

Features

  • check-tag-names: allow rejecting normally valid tag names and/or providing custom error messages when suggesting tags to reject or replace (fixes #108) (a367c48)
Commits

The new version differs by 4 commits.

  • a367c48 feat(check-tag-names): allow rejecting normally valid tag names and/or providing custom error messages when suggesting tags to reject or replace (fixes #108)
  • 609d57b Allow rejecting normally valid tag names and/or providing custom error messages when suggesting tags to reject or replace (#302)
  • 2a153d2 docs: indicate option defaults (fixes part of #256) and ensure optioins all listed in docs
  • 40d681d chore: update Babel devDeps.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

sending and receiving data with node-web-bluetooth

Hi. I'm working on a node project that needs to communicate (read and write) with a BLE hardware.
I couldn't figure out how to write a simple send/receive code with this package so I would be really appreciated if anyone could provide a simple sample code that:

  1. Scan and look for a specific name of the BLE device like mlt-bT05 or HC-08
  2. Connect to the device
  3. Read data from the device
  4. If received data was 'How are you doing?', then send 'I'm doing fine' back to the device.

thanks in adv.

Gatt operation already in progress

Hello, thanks for this library. I just gave it a quick test run and faced some problems :)
When writing a few commands in chain like:

terminal.send("test 1234").then(() => terminal.send("test 2345").then(() => terminal.send("test 3456"))

I get an "gatt operation already in progress" error.
I didn't have a deeper look at the code yet, but it seems like currently send doesn't actually wait till the characters are send to return the promise. Also I was wondering why sendDelay is needed at all couldn't we simply use the promise in https://github.com/1oginov/bluetooth-terminal/blob/master/src/BluetoothTerminal.js#L395 which is returned by writeValue https://developer.mozilla.org/en-US/docs/Web/API/BluetoothRemoteGATTCharacteristic/writeValue to determine the "finished state"?

navigator is not defined

There is an undefined navigator object at line 278. You create it as global in the test procedure, but without this hack, the library cannot be used, unfortunately.

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.