A CRUD bookshelf app built in every language. Same API, same database, different implementations.
babel-shelf/
├── db/ # Shared Postgres schema
│ └── init.sql
├── go-bookshelf/ # Go (port 8080)
├── ts-bookshelf/ # TypeScript/Bun (port 8081)
├── docker-compose.yml # Orchestrates apps + Postgres
└── README.md
Each language gets its own directory (<lang>-bookshelf/) with a Dockerfile and devcontainer config. They all share the same Postgres database and expose the same REST API.
| Method | Endpoint | Description | Status |
|---|---|---|---|
| POST | /books |
Create a book | 201 |
| GET | /books |
List all books | 200 |
| GET | /books/{id} |
Get one book | 200 |
| PUT | /books/{id} |
Update a book | 200 |
| DELETE | /books/{id} |
Delete a book | 204 |
{
"id": 1,
"title": "Dune",
"author": "Frank Herbert",
"status": "want to read"
}Status must be one of: want to read, reading, finished.
docker compose up --build| Implementation | URL |
|---|---|
| Go | http://localhost:8080 |
| TypeScript | http://localhost:8081 |
Tests are integration tests that hit a real Postgres database (no mocks).
# Go — from inside devcontainer or with Go installed:
cd go-bookshelf
DATABASE_URL="postgres://shelf:shelf@db:5432/bookshelf?sslmode=disable" go test -v
# TypeScript — from inside devcontainer or with Bun installed:
cd ts-bookshelf
DATABASE_URL="postgres://shelf:shelf@db:5432/bookshelf?sslmode=disable" bun test- Go
- TypeScript (Bun + Hono + pg)