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

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