Tawny

Live design demo

Dev

A minimal mono developer blog with MDX essays and interactive CS demos — open the live showcase. Navigate inside the frame — you are still on Tawny.

designs/dev

REST API

REST (Representational State Transfer) maps CRUD operations onto HTTP methods. Each method has well-defined semantics that clients and servers can rely on — using the right method makes your API predictable and cache-friendly.

HTTP Methods

MethodPurposeIdempotentSafe
GETRead a resourceYesYes
POSTCreate a resourceNoNo
PUTReplace a resourceYesNo
PATCHPartially updateNoNo
DELETERemove a resourceYesNo

Idempotent means calling the method multiple times has the same effect as calling it once. Safe means the method should not modify server state.

Try It

Select a method below to see a sample request and response:

GET /api/posts/1

HTTP/1.1 200

{ "id": 1, "title": "Hello" }

Design Principles

Good REST APIs use nouns for resource paths (/posts/1) and verbs via HTTP methods, not in the URL (/getPost/1). Status codes communicate outcome: 200 for success, 201 for created, 204 for deleted with no body, 404 for not found.

Keep responses consistent in shape, version your API when breaking changes are unavoidable, and document the contract so clients can integrate without guessing.

About

Dev is a minimal mono developer blog focused on readable essays and interactive demos. It uses MDX for content, Shiki for syntax highlighting, and a tight typographic system inspired by classic engineer personal sites.

Navigate the live demo above to read sample posts and try the demos. Scaffold your own copy with the create command below, then swap in your name, social links, and writing.

Get the template

Scaffold a local copy with your preferred package manager.

Terminal
pnpm create tawny@latest dev my-app

Template source

Browse every file in templates/dev.

templates/dev

README.md
# Dev Blog

A minimal mono developer blog template — MDX essays, projects, and interactive demos.

Design by [Hugo Lin](https://1chooo.com).

## Quick start

### Option A — create-next-app (recommended)

```bash
npx create-next-app@latest my-blog \
  --example "https://github.com/1chooo/tawny" \
  --example-path "templates/dev"
```

### Option B — create-tawny CLI (interactive prompts)

```bash
npx create-tawny@latest dev my-blog
```

Then:

```bash
cd my-blog
pnpm install   # or npm / yarn / bun
pnpm dev
```

Open [http://localhost:3000](http://localhost:3000).

## Customize these files

| File | What to change |
|------|----------------|
| `app/layout.tsx` | Site title and metadata |
| `app/page.tsx` | About / home copy |
| `components/site-header.tsx` | Brand name in the header |
| `components/site-footer.tsx` | Social links and location |
| `app/blog/_articles/` | Your essays (`.mdx` files) |
| `app/projects/page.mdx` | Projects page |

### Placeholders

Search for `{{AUTHOR_NAME}}`, `{{AUTHOR_EMAIL}}`, `{{GITHUB_USERNAME}}`, and `{{CITY_NAME}}` across the project and replace them.

## Stack

- Next.js 16 App Router & React Server Components
- MDX & Shiki for content
- Tailwind CSS v4
- Minimal mono typography

## License

MIT