GithubHelp home page GithubHelp logo

kapusta / pzgps Goto Github PK

View Code? Open in Web Editor NEW
12.0 3.0 1.0 427 KB

Read GPS data from a PiZero in a single page web app via a WebSocket

License: Apache License 2.0

JavaScript 85.13% HTML 11.86% CSS 1.85% Less 0.88% SCSS 0.29%
pzgps websockets pizero couchdb nodejs gpsd adafruit-gps-breakout gps

pzgps's People

Contributors

dependabot[bot] avatar kapusta avatar tobozo avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

Forkers

tobozo

pzgps's Issues

MapQuest staticmap view in the reactjs pkg

  • follow the pattern in the GpsData component
  • add a staticmap using a consumer key if it exists
  • only show the MapQuest button if the key exists
  • the map should update if the gpsData changes

Db component

  • Move Database things to a component
  • Make a db.js file and abstract indexes and such out to there
  • Get most db stuff out of src/components/RouteEditor/RouteEditor.jsx
  • Find a proper home for src/components/App/Db.jsx
  • query the routes end point for routes instead of using allDocs()

add couchdb/pouchdb support

Couch/Pouch install docs

  • add feature/couchdb branch
  • make a routes table, post some data into it

Questions...

  • POST directly from the FE?
  • send a ws frame and have that POST data into couch?
  • send data somewhere after that?
  • how to share that data?

add react-router

  • learn
  • break up the components into paths (reuse App?)
  • support WebSocket reuse like in the angular1 FE

store gps data on the pizero using Realm(?)

On TPV events, if distance from previous location is greater than n meters, record the new location in a Realm. Provide access to that data from the FE.

  • Create /lib/realmApi.js and add getter and setter
  • Create /lib/realmSchema.js and define a location object
  • Add UI to initiate a save of a location, with a user defined note

Create a react front end

Needs....

  • Basic app structure/outline
  • Boostrap 4 css
  • websocket component
  • connect back end data to front end and render as an unordered list
  • add mapquest component that consumes the gpsData and consumerKey

websocket frames causes rebuilds...

New frames come in, the data is put into the component with setState which causes the entire app to recompile/run/mount/etc, consider moving that out of a setState call

improve lighthouse score

Current HEAD on feature/preat-pwa scores 62 on lighthouse against the webpack dev build, improve that score.

  • test against prod build
  • get https working on the pizero (letsencrypt and apache or ws/ssl)

There is no UI

  • Make a small ng1 app
  • figure out file/dir structure that makes sense for FE and BE
  • npm install angular-websocket --save
  • Add live-server support - live-server --entry-file=index.html

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.