Skip to content

bradgarropy/yoto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

44 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Yoto Sync

A web application for syncing YouTube content to Yoto cards. Download audio from YouTube videos or playlists and upload them directly to your Yoto cards. Deployed on Cloudflare Workers with Containers for YouTube downloading.

Features

  • Browse and manage your Yoto cards
  • Import audio from YouTube videos and playlists
  • Drag-and-drop track reordering
  • Track deletion and card management
  • Search and sort cards

Prerequisites

Installation

git clone https://github.com/bradgarropy/yoto.git
cd yoto
npm install

Usage

Start the development server:

npm run dev

Open http://localhost:3000 in your browser.

First Time Setup

  1. Click "Login" to authenticate with your Yoto account
  2. Follow the device code flow instructions
  3. Once logged in, you'll see all your Yoto cards

Syncing YouTube Content

  1. Navigate to a card's detail page
  2. Click "Add Tracks"
  3. Paste a YouTube video or playlist URL
  4. Click "Import" and wait for the sync to complete

Development

npm run dev         # Start development server
npm run build       # Build for production
npm run deploy      # Build and deploy to Cloudflare
npm run test        # Run tests
npm run lint        # Check for lint errors
npm run typecheck   # Check TypeScript types
npm run format      # Check code formatting

Local Development with Containers

This app uses Cloudflare Containers for YouTube downloading via yt-dlp. For local development:

  1. Docker must be installed and running - The Vite dev server uses Docker to run containers locally
  2. First run builds the container - Takes 2-3 minutes; subsequent runs use cached layers
  3. Rebuild containers - Press r + Enter in the terminal to rebuild after Dockerfile changes

The local development environment runs your Worker code in workerd (the same runtime as production) and containers in Docker, providing near-production behavior.

Project Structure

yoto/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ routes/           # React Router pages
β”‚   β”‚   β”œβ”€β”€ home.tsx      # Card grid dashboard
β”‚   β”‚   β”œβ”€β”€ login.tsx     # Device code auth flow
β”‚   β”‚   └── cards.$id.tsx # Card detail with tracks
β”‚   β”œβ”€β”€ components/ui/    # shadcn/ui components
β”‚   └── lib/              # Server-side utilities
β”‚       β”œβ”€β”€ auth.server.ts
β”‚       β”œβ”€β”€ youtube.server.ts
β”‚       └── sync.server.ts
β”œβ”€β”€ public/               # Static assets
└── images/               # Image assets

Tech Stack