Public
Like
GitHubIssuesToClay
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v36View latest version
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is a Val Town project for converting GitHub issues to Clay format. The project is configured for Deno/TypeScript development with TSX support and Val Town-specific types.
- Runtime: Deno with TypeScript/TSX support
- Configuration:
deno.json
with Val Town types and experimental features enabled - Main Entry:
main.tsx
(currently empty - likely a placeholder for the main application logic)
- TypeScript compiler options:
noImplicitAny: false
,strict: false
- Val Town types imported from
https://www.val.town/types/valtown.d.ts
- Experimental features enabled: unstable-node-globals, unstable-temporal, unstable-worker-options, unstable-sloppy-imports
- Configured to lint files in
deno:/https/esm.town/**/*
- Excludes
no-explicit-any
rule to allow flexible typing
This project follows Val Town development patterns as defined in .cursorrules
:
- Generate code in TypeScript or TSX
- Use appropriate TypeScript types and interfaces
- Prefer official SDKs over direct API calls
- Never embed secrets - always use environment variables
- Follow modern ES6+ and functional programming practices
- HTTP Triggers: Files with
.http.tsx
extension for web APIs - Cron Triggers: Files with
.cron.tsx
extension for scheduled tasks - Email Triggers: Files with
.email.tsx
extension for email processing
- Use
https://esm.sh
for npm/Deno dependencies - Use TailwindCSS via
<script src="https://cdn.twind.style" crossorigin></script>
- For redirects:
return new Response(null, { status: 302, headers: { Location: "/path" }})
- For React: Pin to version 18.2.0 and use
/** @jsxImportSource https://esm.sh/react@18.2.0 */
- Avoid browser APIs like
alert()
,prompt()
,confirm()
- Use
Deno.env.get('keyname')
for environment variables
├── backend/
│ ├── database/
│ ├── routes/
│ └── index.ts
├── frontend/
│ ├── components/
│ ├── index.html
│ └── index.tsx
├── shared/
│ └── utils.ts
└── README.md
- Blob Storage:
import { blob } from "https://esm.town/v/std/blob";
- SQLite:
import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
- OpenAI:
import { OpenAI } from "https://esm.town/v/std/openai";
- Email:
import { email } from "https://esm.town/v/std/email";
- Utilities:
import { parseProject, readFile, serveFile } from "https://esm.town/v/std/utils@85-main/index.ts";
- When changing SQLite schemas, create new tables with version suffixes (e.g.,
table_name_2
) - Code in
shared/
must work in both frontend and backend environments - Use error unwrapping in Hono apps:
app.onError((err, c) => { throw err; });
- Standard Library utilities only run on server - pass data to client via HTML injection or API calls