[READ-ONLY] Mirror of https://github.com/just-cameron/demo-todo-api. A demo todo application.
0

Configure Feed

Select the types of activity you want to include in your feed.

3 3 0

Clone this repository

https://git.vm.fail/cameron.stream/demo-todo-api https://git.vm.fail/did:plc:ycswjdgqilkccr2mmjd6kbo2
ssh://git@knot1.tangled.sh:2222/cameron.stream/demo-todo-api ssh://git@knot1.tangled.sh:2222/did:plc:ycswjdgqilkccr2mmjd6kbo2

For self-hosted knots, clone URLs may differ based on your setup.


README.md

Demo Todo API#

A simple Todo API built with Express and TypeScript. This repo is designed as a demo for showcasing the Letta Code Action.

Quick Start#

npm install
npm run dev

The API will be running at http://localhost:3000.

Endpoints#

Method Endpoint Description Auth Required
GET /health Health check No
GET /todos List all todos Yes
GET /todos/:id Get a todo Yes
POST /todos Create a todo Yes
PUT /todos/:id Update a todo Yes
DELETE /todos/:id Delete a todo Yes

Authentication#

Protected endpoints require a Bearer token:

curl -H "Authorization: Bearer demo-token-123" http://localhost:3000/todos

Demo with Letta Code Action#

This repo has the Letta Code Action pre-configured. To use it:

  1. Push this repo to GitHub
  2. Add LETTA_API_KEY to your repository secrets
  3. Create an issue and mention @letta-code

Demo Scenarios#

Try these prompts in GitHub issues:

  1. Explain the codebase:

    @letta-code can you explain how authentication works in this API?

  2. Find a bug:

    @letta-code I think there might be a bug in the auth middleware. Can you review it?

  3. Add a feature (shows memory persistence):

    @letta-code add input validation to the POST /todos endpoint

  4. Create a PR:

    @letta-code can you create a PR to fix the issues you found?

Project Structure#

src/
├── index.ts           # Express app setup
├── routes/
│   └── todos.ts       # Todo CRUD routes
├── middleware/
│   └── auth.ts        # Auth middleware
└── types/
    └── todo.ts        # TypeScript types

License#

MIT