Code Monkey home page Code Monkey logo

atria-assignment's Introduction

Atria-assignment

Simple App for posting and querying sensor data with chart and table display

Frameworks used -

Frontend - React library
Backend - Django REST

Database used -

SQLITE - Django default backend

Libraries used -

React - react-moment, react-router-dom, material-ui, recharts, axios
Django REST - rest_framework, django, numpy, gunicorn (for docker hosting)

About the app -

Frontend is hosted at 3000 and backend at 8000. By default,app shows temperature sensor data in chart and table on component mount

App is capable of posting sensor data as JSON api with readings, sensor type and unix timestamp as input parameters.

User can query sensor data using the query panel by providing the sensor type and date range

Once the query is success( readings are present for the given time range), same will be shown in the Line chart and Table

Authentication and CSRF attack prevention -

Authentication and CSRF prevention is handled based on token and is added to request header and verified by django rest session authentication User input sanitation is handled only at a basic level.

Docker Support -

Backend can be hosted on docker containers with the help of docker images built via the dockerfile.

PS -

  1) Frontend - Query API will work even if "from" and "to" dates are not provided by the user (mentioned in backend code specifying the handling).
                Infinite scrolling/ Line Chart scaling - If query result gives too many data points, displaying them all at once might affect UI/UX experience. This is not taken care currently
                Custom error page shown when visting unknown urls
  2) Backend (Django + DB) - 400 bad request in case of bad paramters or post data not valid
                             SQLite DB - although lightweight and in-memory, not ideal for sensor data posted every second(or milliseconds)

atria-assignment's People

Contributors

athul8raj avatar

Watchers

James Cloos 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.