⚡ Study App

Course Setup
🤖 Generate Course Content with an LLM
Copy the prompt below and paste it into any LLM (Claude, ChatGPT, Gemini, etc.) along with your study materials — textbook chapters, notes, slides, PDFs, URLs. The LLM will return a JSON object you paste into the import field below.
You are a study-app content generator. Your job is to convert study materials into a
structured JSON object for a flashcard and quiz app.

Given the study materials I provide, produce a single valid JSON object matching this
exact schema. Do NOT output anything before or after the JSON — no markdown fences,
no explanation, just the raw JSON object.

SCHEMA:
{
  "meta": {
    "title":    "Short course title shown in the app topbar (e.g. 'CompTIA A+ Core 1')",
    "subtitle": "One-line description (e.g. '220-1101 · Hardware & Networking')",
    "icon":     "Single emoji representing the subject",
    "storageKey": "Unique snake_case key for localStorage (e.g. 'comptia_aplus_core1')",
    "workerUrl": ""
  },

  "domains": [
    {
      "name":  "Domain name shown in the left sidebar (e.g. 'Hardware')",
      "icon":  "Single emoji",
      "hasQuiz": true,
      "hasFlashcards": true,
      "hasPortQuiz": false
    }
  ],

  "topics": [
    {
      "title":   "Topic title shown in the sidebar and content header",
      "domain":  "Must exactly match a domain name from the domains array",
      "content": "Full markdown content for this topic. Use ## for sections, ### for sub-sections, **bold**, *italic*, tables, code blocks, blockquotes, and bullet lists freely. Aim for comprehensive notes — 200–800 words per topic."
    }
  ],

  "quizzes": {
    "Domain Name Here": [
      {
        "q":    "Question text",
        "opts": ["Option A", "Option B", "Option C", "Option D"],
        "a":    0
      }
    ]
  },

  "flashcards": {
    "Domain Name Here": [
      {
        "term": "Term or concept",
        "def":  "Concise definition — one to two sentences, plain text only (no markdown)"
      }
    ]
  },

  "ports": [
    {
      "port":   "22",
      "proto":  "SSH",
      "detail": "Secure Shell — encrypted remote terminal access"
    }
  ]
}

RULES:
- Every domain listed in "domains" should have at least 3 topics in "topics".
- Every domain with hasQuiz:true needs at least 8 questions in "quizzes".
- Every domain with hasFlashcards:true needs at least 10 flashcard pairs in "flashcards".
- "ports" is optional — only include if the subject involves networking port numbers.
  If included, set hasPortQuiz:true on the domain it belongs to.
- Quiz answer index "a" is zero-based (0 = first option).
- "storageKey" must be globally unique — use a specific slug for the course.
- All domain names must be consistent across domains, topics, quizzes, and flashcards.
- Content should be accurate, dense, and exam-focused. Prefer tables over prose for
  reference material. Include mnemonics, comparisons, and worked examples where useful.
- Do not truncate. Generate complete content for all domains and topics.
📥 Import Course JSON
Paste the JSON returned by the LLM below and click Load. The course will be saved to localStorage — no server required.

📱 Want to study on another device or back up your progress? Use the ☁ Save / Load button inside the app — it takes 5 minutes to set up and your data stays on your own server.

Save / Load Progress

🔒 Your data, your server
Your study progress lives entirely in your browser's localStorage — nothing is sent anywhere by default. This feature is only needed if you want to study on a different device, or you're worried about your browser clearing its storage.

To keep things private, sync goes through a Cloudflare Worker that you deploy yourself — free, takes about 5 minutes, and requires only a Google account. The app author has no access to your data.
🛠️ Set up your Worker (one time)
1
Go to cloudflare.com and sign up — you can use Sign in with Google. No credit card needed.
2
In the dashboard, click Workers & Pages → Create → Create Worker. Delete the default code, paste in the contents of worker.js from this project, then click Deploy. Copy the *.workers.dev URL it gives you.
3
Go to Workers & Pages → KV → Create a namespace. Name it anything (e.g. study-kv) and click Add.
4
Open your Worker → Settings → Bindings → Add → KV Namespace. Set the variable name to exactly STUDY_KV, select your namespace, save, then redeploy the Worker.
5
Paste your Worker URL below and click Save URL.
⚠ No Worker URL saved yet — complete step 5 above to enable sync.
Choose any passkey — a word or short phrase you'll remember. Use the same passkey on every device. It's hashed before storage; the server never sees it in plain text.