Arduino-Dashboard-Svelte- Svelte Themes

Arduino Dashboard Svelte

This project is a web application using Svelte and flask to create my own customizable widget dashboard to control my IOT Arduino devices and prioject.

*To Run this application you will need both Nodejs and FLask(python) and Requests(python) installed onto your device *

*To Install Nodejs please go to https://nodejs.org/en/download/ and to install Flask please go to https://flask.palletsprojects.com/en/2.0.x/installation/ and to install Requests please go to https://pypi.org/project/requests/ *

To run code uncompress the node modules folder

Svelte Arduino Dashboard(Svelte + Flask)


This project is a web application using both Svelte(JS) and Flask(Python) to create my own customizable online dashboard GUI to control my Arduino and IOT projects. I created this project to be a central control system for all my current and future projects. Currently I have 3 projects being controlled thru this project, My RFID Door lock, my automated light project, and my arduino cloud messenger project.

Screenshot 2023-03-30 at 5 41 36 PM Screenshot 2023-03-30 at 5 41 44 PM

*Note that you will need to have [Node.js], [Flask(Python)] and [Requests(Python)] installed. *

How It Works


The user clicks on the buttons and switches, and each button and swithc is linked to an event. Whenever an event is triggered the corresponding function makes a call to the backend, based on the function that makes the call the backend will then send a publish request to arduino to then modify and update the new property values.

Main code is in src/App.svelte

The server/api are in server.py

Get started


These installation an Deployment Instructions are meant for MAC OS * Download the Project

git clone https://github.com/humzah-77/Arduino-Dashboard-Svelte-.git
cd Arduino-Dashboard-Svelte

How to Run


To run with development server


first set up the environment

 export FLASK_APP=server.py
 export FLASK_ENV=development
 flask run

then start the server

python server.py

in a new terminal tab navigate to the public folder

cd public

next install dependencies

npm install

and finally deploy the front end

npm run build 

The application is now running...

Navigate to localhost:5000.

137675173-494d0bf9-eb99-4ca1-836e-4debf244a69a

To run with production server


first set up the environment

 export FLASK_APP=server.py
 export FLASK_ENV=production
 flask run

then start the server

python server.py

in a new terminal tab navigate to the public folder

cd public

next install dependencies

npm install

and finally deploy the front end

npm run build 

The application is now running...

The application is now running...

Navigate to localhost:8080.

or

Navigate to 0.0.0.0:8080.

137677670-0385d41f-1c31-42b0-aa62-d538d2197bca

Top categories

Loading Svelte Themes