Skip to content

samkhawase/school-dash-backend

Repository files navigation

Kindle Dashboard

The server component of the project to transforms your jailbroken Kindle into a customizable dashboard display. It works by periodically fetching images from a server at regular intervals.

Kindle Dashboard Example

Overview

Turn your jailbroken Kindle into a low powered dashboard. The system works by executing a script (dash.sh) that periodically fetches PNG images from a Cloudflare worker and displays it on the Kindle's e-ink screen. I use this to show today's weather, arrival data for the bus stop next door and the day's timetable for my daughter's school. You can use it to display any other information you want to display in a low-power, always-on format.

This is the backend component of the project. For the client that runs on the Kindle please see this repo: kindle-dash-client.

Prerequisites

  • A free Cloudflare account
  • Basic knowledge of JavaScript
  • A spirit for adventure 🏴‍☠️

Installation

1. Free Cloudflare account

This project uses Cloudflare developer platform which has a very generous free tier perfectly suited for this use case. Get started with a free account at Cloudflare Dash.

2. Bun

I used Bun as the main development framework, but you can also choose use Node or Deno if that's your preference.

3. Wrangler

Wrangler is the workhorse of Cloudflare developer platform. It's open source and can be installed from Wrangler docs.

Cloudflare devs is a very active community and is very helpful. For advanced topics, refer to Cloudflare developers or the Cloudflare Discord Server.

2. Set Up

  1. Clone this git repo and cd into it.

  2. Install Bun and npm, preferably using a Node version manager like Volta or nvm.

  3. Install the dependencies:

    bun install
  4. Install Wrangler

    npm install wrangler@latest
  5. Create the KV Namespaces for live and preview. Replace these values with the values in the wrangler.jsonc file.

    npx wrangler kv namespace create SCHOOL_DASH_KV
    npx wrangler kv namespace create SCHOOL_DASH_KV --preview
  6. Create a secret in the Cloudflare dashboard for the API key.

    Settings Example

  7. Start the local development:

    npx wrangler dev --remote
  8. The changes will be live on localhost:8787

  9. Deploy the changes to your Cloudflare dash: bash npx wrangler login bun run deploy

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

About

Backend for the school dashboard project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published