Coding
PromptBeginner5 minmarkdown
Nano Banana Pro
Agent skill for nano-banana-pro
6
Guide for Claude AI to work with Simple Food project - Kotlin/Ktor server app for food management.
Sign in to like and favorite skills
Guide for Claude AI to work with Simple Food project - Kotlin/Ktor server app for food management.
The project implements a multi-module architecture (docs/achitecture.md)
| Module | Description |
|---|---|
| simple-food-transport-mappers | Business ↔ Transport mapping |
| simple-food-product-repo-memory | In-memory product repository |
| simple-food-product-repo-postgresql | PostgreSQL product repository |
| simple-food-repo-measure-memory | In-memory measure repository (7 units, ru/en) |
| simple-food-repo-measure-postgres | PostgreSQL measure repository |
| simple-food-product-app | Ktor REST API (port 8080) |
| specs | OpenAPI specification |
./gradlew build
./gradlew :simple-food-product-app:run
REPOSITORY_TYPE=postgres ./gradlew :simple-food-product-app:run
./gradlew :simple-food-transport-models:openApiGenerate
HTTP → Transport DTO → Business Model → Repository (toContext()) (IRepoProduct) ↓ Repository → Business Model → Transport DTO → HTTP (toTransport())
// Transport → Business val beProduct = transportProduct.toContext() // Business → Transport val transportProduct = beProduct.toTransport()
Interfaces:
IRepoProduct, IRepoMeasure in simple-food-common-models
Implementations:
memory (default) - ConcurrentHashMap, volatilepostgres - PostgreSQL, Exposed ORM, Flyway migrationsConfiguration:
repository.type = "memory" # or "postgres"
Environment variable:
REPOSITORY_TYPE
specs/spec-simple-food-api-*.yaml./gradlew :simple-food-transport-models:openApiGeneratesimple-food-transport-mappers + tests.toContext() and .toTransport()docker run -d -p 5432:5432 \ -e POSTGRES_DB=simplefood \ -e POSTGRES_USER=postgres \ -e POSTGRES_PASSWORD=postgres \ postgres:16
REPOSITORY_TYPE=postgres DB_URL=jdbc:postgresql://localhost:5432/simplefood DB_USER=postgres DB_PASSWORD=postgres
PORT env var)Error(code, message, details)simple-food-product-app/src/main/resources/application.conf:
ktor { deployment { port = 8080 port = ${?PORT} } } repository { type = "memory" type = ${?REPOSITORY_TYPE} } postgres { jdbcUrl = "jdbc:postgresql://localhost:5432/simplefood" jdbcUrl = ${?DB_URL} username = ${?DB_USER} password = ${?DB_PASSWORD} }
Version: 1.2 Updated: November 12, 2025