Prof-Iz / COM4RT

Repository for the User Portal as well as the Arduino Code

Home Page:com-4-rt.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

COM4RT Portal

Last Edited: 4 April 2022

Contributors:

Name Role
Ibrahim Izdhan UI Design of dashboard and Real time graph View, Supabase Database configuration, Design of Serverless API Functions for Data logging with Vercel
Low Wai Sing UI Design of Login and Signup Page

Tags: node sveltekit tailwind css supabase

Status: 🟣 Fulfilled requirements for University Course, not fully complete though

What is this?

2022-05-05-05-52-54-image.png

COM4RT portal was designed as a real-time dashboard to view the data sent by a temperature and monitoring device that a user will register with the portal. The portal was built using Sveltekit and is served initially from the server and is subsequently hydrated client side. The UI is designed to be both accessible from a mobile or desktop browser.

Authentication was handled with Supabase as well as storing registered devices and data sent from said devices. Row level Security policies were implemented to protect pages and API routed from unauthorized access.

2022-05-05-06-06-32-image.png

The portal allows for registration of devices (buddies as they were called) and generates a numeric ID for the Device. This ID is tied to the user email address as well.

The graph was made with Apex Charts and is therefore interactive.

2022-05-05-05-56-41-image.png

Tech Stack Used

Front End Sveltekit, Tailwind CSS, Daisy UI
Back End Node, Vercel
Authentication Supabase
Database Supabase

Current Issues

  1. Auth has issues with cookie not properly being deleted from browser though logout was successful server side.

  2. Protected pages check if a user (email) is present in the browser local storage rather than the session object provided by svelte leading to issues where users can access the site, though not interact, if they are idle for a long period, as cookie expires (access token)

  3. Realtime is implemented as a API Request sent every 5 seconds to check if any datapoint has changed due to clash with RLS and Supabase Realtime.

  4. Currently the API that the device sends the readings to is not protected - as in it logs any request sent to the API - rather than validating before insertion.

Future Plans

As the project was simply done as a proof of concept for an IoT based device and its dashboard, no follow up is currently planned for the device. Perhaps in the future the same portal may be built with Nuxt 3 as Vue JS has better support for Supabase


Socials

LinkedIn

About

Repository for the User Portal as well as the Arduino Code

com-4-rt.vercel.app


Languages

Language:JavaScript 80.6%Language:Svelte 19.0%Language:HTML 0.3%Language:CSS 0.0%