Giter VIP home page Giter VIP logo

wifi-web-app's Introduction

Sparrow web interface

This webApp is served by Wifi endpoints on ducks and smarrow mesh nodes (Smartphones with Sparrow App).

The Web application is a chat interface that lets users interact with sparrow. The interface interacts with server running on ESP32 device / Smartphone app to send messages to Sparrow and receive responses back.

We have choosen a peculiar non-intuitive API structure to interface with our Web app.

Working

The Wifi endpoint opens index.html by default, which serves the chat interface. The webapp has no internet based dependencies, hence works in 'Offline' mode. Message transfer is enabled by Sparrow Mesh / LoRa on ESP32.

Send messages

Endpoint - /send
Type - HTTP POST
Request format - Form data with 'data' key containing JSON Message

Message format - 
{
"key":$messageID,
"userID":$userID,
"timeStamp":$timeStampOfMessageOrigin,
"destination":$destination,
"message":$messgeContent
}

Receive message

Endpoint - /receive

The webapp keeps polling the GET API every 10 seconds to check if it has new messages. ESP32 maintains an array of message replies, which it sends over the /receive endpoint.

We make the webapp check if it has any new messages for the current user by checking the 'key' and 'destination' parameters.

wifi-web-app's People

Contributors

ameyaapte1 avatar jaylohokare avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.