• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
warianoguerra

warianoguerra

recursive-task-lists

Public
REST API for recursive task lists with SQLite & OAuth
Like
recursive-task-lists
Home
Code
6
database
2
frontend
3
middleware
1
routes
2
README.md
H
main.ts
Environment variables
1
Branches
1
Pull requests
Remixes
History
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.
Sign up now
Code
/
README.md
Code
/
README.md
Search
…
README.md

Recursive Task Lists API

A REST API for managing recursive task lists, built on Val Town with per-val SQLite and owner-only OAuth authentication.

Authentication

All /api/* endpoints are protected. Only the val owner can access them.

  1. Visit /auth/login to authenticate via Val Town OAuth
  2. After login, your session cookie is set automatically
  3. All subsequent API requests use that cookie

Unauthenticated requests return 401. Non-owner users get 403.

Endpoints

Task Lists

MethodPathDescription
GET/api/task-listsList all task lists
POST/api/task-listsCreate a task list
GET/api/task-lists/:idGet a task list with full recursive task tree
PUT/api/task-lists/:idUpdate title/description
DELETE/api/task-lists/:idDelete a list and all its tasks

Tasks

MethodPathDescription
POST/api/task-lists/:listId/tasksCreate a top-level task (or nested via parent_task_id)
GET/api/tasks/:idGet a task with its subtask tree
PUT/api/tasks/:idUpdate title, description, or mark done
DELETE/api/tasks/:idDelete a task and all subtasks
POST/api/tasks/:id/subtasksAdd a subtask to a task

Data Model

Rendering mermaid diagram...

Example Usage

# Create a task list curl -X POST /api/task-lists \ -H "Content-Type: application/json" \ -d '{"title": "My Project", "description": "Things to do"}' # Add a task curl -X POST /api/task-lists/1/tasks \ -H "Content-Type: application/json" \ -d '{"title": "Setup environment"}' # Add a subtask curl -X POST /api/tasks/1/subtasks \ -H "Content-Type: application/json" \ -d '{"title": "Install dependencies"}' # Mark task as done curl -X PUT /api/tasks/1 \ -H "Content-Type: application/json" \ -d '{"done": true}' # Get full tree curl /api/task-lists/1

Project Structure

main.ts                  # Hono HTTP entrypoint + OAuth wrapper
middleware/auth.ts       # Owner-only auth middleware
database/migrations.ts   # SQLite schema
database/queries.ts      # All DB operations + recursive tree builder
routes/task-lists.ts     # Task list CRUD routes
routes/tasks.ts          # Task CRUD + subtask routes
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
AboutAlternativesPricingBlogNewsletterCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.