CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

FFXIV Completion Tracker (v0) - A lightweight web application for Final Fantasy XIV players to track completion of dungeons, trials, raids, and other instances.

Development Commands

Linting

deno lint

Type Checking

deno check main.tsx

Running Val Town Function Locally

deno run --allow-net --allow-env main.tsx

Development with Watch Mode

deno run --allow-net --allow-env --watch main.tsx

XIVAPI Integration

Endpoint Details

  • Base URL: https://xivapi.com/instancecontent
  • Pagination: 100 results per page, 7 total pages (671 instances)
  • Required columns: ID,Name,ContentType.Name,ContentFinderCondition.Name,UnlockQuest.Name

Sample API Call

https://xivapi.com/instancecontent?columns=ID,Name,ContentType.Name,ContentFinderCondition.Name,UnlockQuest.Name&page=1

Data Structure

  • Name: Instance name
  • ContentType.Name: Content type (e.g., "Dungeons", "Trials")
  • ContentFinderCondition.Name: Duty finder name
  • UnlockQuest.Name: Unlock quest (mostly null)

Pagination Handling

// Loop through all pages (1-7) for (let page = 1; page <= 7; page++) { const response = await fetch(`https://xivapi.com/instancecontent?columns=ID,Name,ContentType.Name,ContentFinderCondition.Name,UnlockQuest.Name&page=${page}`); }

Architecture

Val Town Function (main.tsx)

  • Fetches all 7 pages from XIVAPI
  • Caches response for 24 hours
  • Returns CORS-enabled JSON
  • Groups by expansion/content type

Frontend (Static)

  • HTML/CSS/Vanilla JS
  • Fetches from Val Town endpoint
  • localStorage for user progress
  • Search/filter functionality

Deployment

  • Val Town: Backend function
  • Static hosting: Frontend (Netlify, Vercel, GitHub Pages)