Back to REST API Lab

README

Database REST API Lab & Testing Framework

This repository contains two main components organized for clarity and ease of use.

🧪 Lab: Multi-Service REST API Environment

Location: lab/

A complete REST API learning environment featuring:

  • Groovy Spring Boot backend - Full CRUD operations for customers, orders, tickets
  • Go microservice - Hexagonal architecture with geolocation features
  • SQLite database - File-based, portable, version-controlled
  • Web frontend - Modern UI for all entities
  • Docker orchestration - Everything containerized and ready to run
This is a proven, working environment perfect for learning multi-service architecture, testing patterns, and API design.

👉 Start here: lab/README.md

Quick Start (Lab)

bash
cd lab
./build-all.sh
./dev-all.sh

Access:

  • Frontend: http://localhost:3000
  • Groovy API: http://localhost:8080/swagger-ui.html
  • Go API: http://localhost:8081/swagger/index.html

🧬 Testing: API Equivalence Framework

Location: api-compare/

Advanced API testing framework with fully dynamic workflow generation. No manual YAML writing required - workflows are automatically generated from captured API data.

Features:

  • Dynamic workflow generation from captured API requests/responses
  • Automatic resource discovery and grouping
  • Smart ID variable substitution ({{customer_id}})
  • Auto-detected timestamp ignore fields
  • OpenAPI/Swagger integration
  • Works with any REST API structure
👉 Start here: test-suite/README.md - Quick start guide

Quick Start (Testing)

bash
cd test-suite

# Capture API data (saves responses + metadata)
../api-compare/capture-api-generated.sh

# Generate workflows dynamically
../api-compare/generate-workflows.sh

# Run tests
../api-compare/api-test ../api-compare/workflows/


📁 Repository Structure

shell
db-restapi-lab/
├── lab/              # Complete REST API lab environment (working)
│   ├── backend/      # Groovy Spring Boot service
│   ├── shops-service/# Go microservice
│   ├── frontend/     # Web UI
│   ├── data/         # SQLite database
│   ├── docker-compose.yml
│   └── ...
│
├── api-compare/      # API equivalence testing framework
│   ├── main.go       # Test runner
│   ├── compare       # Built binary
│   └── ...
│
├── test-suite/       # Your test files (created during workflow)
│   ├── openapi-spec.json    # API specification
│   └── api-captures/        # Captured responses + metadata
│       ├── *.json           # API responses
│       └── *.meta.json      # Request metadata (for workflow generation)
│
├── getting-started/  # Step-by-step testing guide
│   ├── 01-setup.md
│   ├── 02-create-openapi.md
│   └── ...
│
└── README.md         # This file


🎯 Use Cases

Lab Environment

  • Learning multi-service architecture
  • Practicing REST API development
  • Understanding hexagonal/clean architecture
  • Testing Docker orchestration
  • Exploring Swagger/OpenAPI documentation

Testing Framework

  • Validating API equivalence across implementations
  • Automatically generating test workflows from captured data
  • Capturing and replaying API interactions
  • Regression testing for API changes
  • Zero-configuration workflow creation

📚 Documentation


🚀 Quick Navigation

I want to...Go to...
Run the REST API labcd lab && ./dev-all.sh
Learn about the architecturelab/README.md
Test the APIslab/QUICK-START.md
Generate test workflows automaticallytest-suite/README.md
Run API equivalence testscd test-suite && ../api-compare/api-test ../api-compare/workflows/
Use Claude Code promptsapi-compare/testing-how-to/CLAUDE-CODE-PROMPTS.md

Happy Coding! 🚀

© 2026 Jonathan Leahy · v1.1.0