<aside> 📌 Last updated: August 23, 2022 For questions: eshin@codeforuv.org
</aside>
At a high-level the app does several key things:
Our app is built using Sveltekit and hosted on Heroku. We use a cloud database service called MongoDB Atlas and MongooseJS as our ORM. For styling we using TailwindCSS and DaisyUI. All speed testing logic is handled by our custom wrapper around the nodejs implementation of the open-source Libre SpeedTest module. The results map utilizes Leaflet to render the map and its data points
src/
lib/ <- Speedtest module, svelte stores, db schema, data classes/models, helper funcs
components/ <- UI Components (e.g. Map, SpeedTest) and JS logic
routes/ <- Pages and end-points
about/
api/ <- internal and public db operations
privacy/
results/
test/ <- end-points required by speedtest module
hooks.js <- server "middle-ware"
+page.js/svelte <- home page of the app
The SpeedTest.svelte
component, makes heavy use of the RuralTest
custom JS class, which itself wraps the open-source libre speedtest.js
module. For more info on the that module see this wiki.
SpeedTest.svelte
component (homepage by default)RuralTest
instance that sets up the testing interface.checkLocalForPrevTest()
to see if there’s a previous test result stored in browser localStorage
. If so, it draws it to the page.