From d0cdabbf112ede03f95e03aae3a88f7dd2959bc4 Mon Sep 17 00:00:00 2001 From: kankys Date: Tue, 15 Sep 2026 21:06:29 +0200 Subject: [PATCH] refactor: restructure to monorepo with backends and apiTest - Move web/backend to backends/potter-api - Move web/frontend to backends/potter-api/frontend - Add root package.json with npm workspaces - Update README.md with monorepo navigation - Update .github/workflows/api-tests.yml for dynamic test discovery - Update bruno_test_scenario.md paths - Fix .gitignore to allow JSON data files - Add three new AI tests in apiTest/PotterAPI/AI/ Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe --- .github/workflows/api-tests.yml | 68 +++++- .gitignore | 11 +- README.md | 207 ++++++++++++++++-- .../potter-api}/.gitignore | 0 .../potter-api}/Dockerfile | 0 .../backend => backends/potter-api}/README.md | 0 {web/backend => backends/potter-api}/app.js | 0 .../potter-api/bruno_test_scenario.md | 8 +- .../potter-api}/characters.json | 0 .../controllers/charactersController.js | 0 .../controllers/housesController.js | 0 .../controllers/spellsController.js | 0 .../potter-api}/frontend/.gitignore | 0 .../potter-api}/frontend/Dockerfile | 0 .../potter-api}/frontend/README.md | 0 .../potter-api}/frontend/babel.config.js | 0 .../potter-api}/frontend/package-lock.json | 0 .../potter-api}/frontend/package.json | 0 .../potter-api}/frontend/public/favicon.ico | Bin .../potter-api}/frontend/public/index.html | 0 .../potter-api}/frontend/src/App.vue | 0 .../frontend/src/assets/HARRYP.TTF | Bin .../frontend/src/assets/gringottsbanklogo.png | Bin .../frontend/src/assets/hogwartslogo.png | Bin .../frontend/src/assets/iswear.jpg | Bin .../frontend/src/assets/sortinghat.jpg | Bin .../frontend/src/components/GringottsBank.vue | 0 .../frontend/src/components/Modal.vue | 0 .../frontend/src/components/Navigation.vue | 0 .../src/components/QuoteGenerator.vue | 0 .../src/components/SearchComponent.vue | 0 .../frontend/src/components/SortingHat.vue | 0 .../frontend/src/components/SpellList.vue | 0 .../frontend/src/components/Spelleology.vue | 0 .../frontend/src/components/Welcome.vue | 0 .../gringotts-bank/GringottsCalculator.vue | 0 .../gringotts-bank/GringottsForm.vue | 0 .../GringottsInvestmentList.vue | 0 .../GringottsInvestmentModal.vue | 0 .../frontend/src/components/newFile.js | 0 .../potter-api}/frontend/src/main.js | 0 .../potter-api}/frontend/webpack.config.js | 0 .../potter-api}/houses.json | 0 .../potter-api}/middleware/auth.js | 0 .../potter-api}/middleware/header.js | 0 .../potter-api}/middleware/spellMiddleware.js | 0 .../potter-api}/package-lock.json | 0 .../potter-api}/package.json | 0 .../potter-api}/quotes.json | 0 .../potter-api}/routes/characters.js | 0 .../potter-api}/routes/houses.js | 0 .../potter-api}/routes/quote.js | 0 .../potter-api}/routes/sortinghat.js | 0 .../potter-api}/routes/spells.js | 0 .../potter-api}/sortinghatquotes.json | 0 .../potter-api}/spells.json | 0 package.json | 33 +++ 57 files changed, 292 insertions(+), 35 deletions(-) rename {web/backend => backends/potter-api}/.gitignore (100%) rename {web/backend => backends/potter-api}/Dockerfile (100%) rename {web/backend => backends/potter-api}/README.md (100%) rename {web/backend => backends/potter-api}/app.js (100%) rename bruno_test_scenario.md => backends/potter-api/bruno_test_scenario.md (98%) rename {web/backend => backends/potter-api}/characters.json (100%) rename {web/backend => backends/potter-api}/controllers/charactersController.js (100%) rename {web/backend => backends/potter-api}/controllers/housesController.js (100%) rename {web/backend => backends/potter-api}/controllers/spellsController.js (100%) rename {web => backends/potter-api}/frontend/.gitignore (100%) rename {web => backends/potter-api}/frontend/Dockerfile (100%) rename {web => backends/potter-api}/frontend/README.md (100%) rename {web => backends/potter-api}/frontend/babel.config.js (100%) rename {web => backends/potter-api}/frontend/package-lock.json (100%) rename {web => backends/potter-api}/frontend/package.json (100%) rename {web => backends/potter-api}/frontend/public/favicon.ico (100%) rename {web => backends/potter-api}/frontend/public/index.html (100%) rename {web => backends/potter-api}/frontend/src/App.vue (100%) rename {web => backends/potter-api}/frontend/src/assets/HARRYP.TTF (100%) rename {web => backends/potter-api}/frontend/src/assets/gringottsbanklogo.png (100%) rename {web => backends/potter-api}/frontend/src/assets/hogwartslogo.png (100%) rename {web => backends/potter-api}/frontend/src/assets/iswear.jpg (100%) rename {web => backends/potter-api}/frontend/src/assets/sortinghat.jpg (100%) rename {web => backends/potter-api}/frontend/src/components/GringottsBank.vue (100%) rename {web => backends/potter-api}/frontend/src/components/Modal.vue (100%) rename {web => backends/potter-api}/frontend/src/components/Navigation.vue (100%) rename {web => backends/potter-api}/frontend/src/components/QuoteGenerator.vue (100%) rename {web => backends/potter-api}/frontend/src/components/SearchComponent.vue (100%) rename {web => backends/potter-api}/frontend/src/components/SortingHat.vue (100%) rename {web => backends/potter-api}/frontend/src/components/SpellList.vue (100%) rename {web => backends/potter-api}/frontend/src/components/Spelleology.vue (100%) rename {web => backends/potter-api}/frontend/src/components/Welcome.vue (100%) rename {web => backends/potter-api}/frontend/src/components/gringotts-bank/GringottsCalculator.vue (100%) rename {web => backends/potter-api}/frontend/src/components/gringotts-bank/GringottsForm.vue (100%) rename {web => backends/potter-api}/frontend/src/components/gringotts-bank/GringottsInvestmentList.vue (100%) rename {web => backends/potter-api}/frontend/src/components/gringotts-bank/GringottsInvestmentModal.vue (100%) rename {web => backends/potter-api}/frontend/src/components/newFile.js (100%) rename {web => backends/potter-api}/frontend/src/main.js (100%) rename {web => backends/potter-api}/frontend/webpack.config.js (100%) rename {web/backend => backends/potter-api}/houses.json (100%) rename {web/backend => backends/potter-api}/middleware/auth.js (100%) rename {web/backend => backends/potter-api}/middleware/header.js (100%) rename {web/backend => backends/potter-api}/middleware/spellMiddleware.js (100%) rename {web/backend => backends/potter-api}/package-lock.json (100%) rename {web/backend => backends/potter-api}/package.json (100%) rename {web/backend => backends/potter-api}/quotes.json (100%) rename {web/backend => backends/potter-api}/routes/characters.js (100%) rename {web/backend => backends/potter-api}/routes/houses.js (100%) rename {web/backend => backends/potter-api}/routes/quote.js (100%) rename {web/backend => backends/potter-api}/routes/sortinghat.js (100%) rename {web/backend => backends/potter-api}/routes/spells.js (100%) rename {web/backend => backends/potter-api}/sortinghatquotes.json (100%) rename {web/backend => backends/potter-api}/spells.json (100%) create mode 100644 package.json diff --git a/.github/workflows/api-tests.yml b/.github/workflows/api-tests.yml index 89c66a6..0729a97 100644 --- a/.github/workflows/api-tests.yml +++ b/.github/workflows/api-tests.yml @@ -22,25 +22,69 @@ jobs: with: node-version: 20 - # 3. Krok: Spuštění backendu - - name: Create .env, Install dependencies and start Backend + # 3. Krok: Instalace závislostí v rootu + - name: Install root dependencies run: | - cd web/backend - echo "PORT=3000" > .env npm install + + # 4. Krok: Spuštění PotterAPI backendu + - name: Start PotterAPI Backend + run: | + cd backends/potter-api + npm install + echo "PORT=3000" > .env node app.js > server.log 2>&1 & - # 4. Krok: Vyčkání na server pomocí obyčejné smyčky s curl - - name: Wait for Backend server to be ready + # 5. Krok: Vyčkání na server pomocí obyčejné smyčky s curl + - name: Wait for PotterAPI server to be ready run: | - echo "Čekám na naběhnutí serveru..." + echo "Čekám na naběhnutí PotterAPI serveru..." until curl -s http://127.0.0.1:3000 > /dev/null; do sleep 1 done - echo "Server běží a odpovídá!" + echo "PotterAPI server běží a odpovídá!" - # 5. Krok: Spustí Bruno testy - - name: Run Bruno API Tests + # 6. Krok: Spustí všechny Bruno testy v apiTest + - name: Run all Bruno API Tests run: | - cd apiTest/PotterAPI - npx @usebruno/cli run -r + echo "Spouštím všechny testovací kolekce..." + + # Získat seznam všech složek v apiTest (kromě node_modules) + TEST_DIRS=$(find apiTest -mindepth 1 -maxdepth 1 -type d ! -name "node_modules" ! -name ".git" | sort) + + echo "Nalezené testovací kolekce: ${TEST_DIRS}" + + # Spustit testy pro každou kolekci + ALL_PASSED=true + for dir in $TEST_DIRS; do + echo "==========================================" + echo "Spouštím testy pro: $dir" + echo "==========================================" + + # Spust testy a zachyt výsledek + if npx @usebruno/cli run "${dir#apiTest/}" -r; then + echo "✅ Testy pro $(basename $dir) prošly" + else + echo "❌ Testy pro $(basename $dir) selhaly" + ALL_PASSED=false + fi + done + + echo "==========================================" + echo "Výsledek všech testů" + echo "==========================================" + + if [ "$ALL_PASSED" = true ]; then + echo "✅ Všechny testy prošly!" + exit 0 + else + echo "❌ Některé testy selhaly" + exit 1 + fi + + # 7. Krok: Zobrazení server logů při selhání + - name: Show server logs on failure + if: failure() + run: | + echo "Server logs:" + cat backends/potter-api/server.log || echo "Log soubor nebyl nalezen" diff --git a/.gitignore b/.gitignore index 59c91ec..61da0a7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,10 @@ # Ignorování složky node_modules v celém projektu (i v podsloužkách jako apiTest) node_modules/ -# Ignorování vygenerovaných HTML a JSON reportů z testů +# Ignorování vygenerovaných HTML reportů z testů *.html -*.json -!bruno.json -!package.json -!package-lock.json +!**/public/index.html + +# Ignorování vygenerovaných JSON reportů z testů, ale ne datové soubory +report*.json +!*.json diff --git a/README.md b/README.md index 53dab89..00d5ba3 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,201 @@ -## Automated API Testing (Bruno) +# 🧪 API Test Playground -Automatické testování REST API je postaveno na nástroji [Bruno](https://www.usebruno.com/). Testovací kolekce je uložena přímo v repozitáři ve složce `apiTest/PotterAPI` a je verzována společně s kódovým základem. +**Monorepo pro testování různých API služeb pomocí [Bruno](https://www.usebruno.com/) a Vibe agentů.** -### Lokální spuštění testů +Tento projekt slouží jako **playground** pro vývoj, testování a výuku API testování. Obsahuje backendové služby, frontendové aplikace a komplexní testovací kolekce. -Testy lze spouštět přímo z grafického rozhraní aplikace Bruno, nebo přes příkazovou řádku (CLI). +--- -#### 1. Pomocí Bruno GUI -1. Otevřete aplikaci Bruno. -2. Zvolte **Open Collection** a vyberte složku `apiTest/PotterAPI` v tomto repozitáři. -3. Spusťte jednotlivé požadavky nebo celou kolekci přes **Runner**. +## 🗺️ Rozcestník -#### 2. Pomocí Bruno CLI -Ujistěte se, že běží lokální server (standardně na `http://127.0.0.1:3000`), a spusťte: +| Služba | Backend | Frontend | Testy | Dokumentace | +|--------|---------|----------|-------|--------------| +| **PotterAPI** | [`backends/potter-api`](./backends/potter-api) | [`backends/potter-api/frontend`](./backends/potter-api/frontend) | [`apiTest/PotterAPI`](./apiTest/PotterAPI) | [bruno_test_scenario.md](./backends/potter-api/bruno_test_scenario.md) | + +--- + +## 🚀 Rychlý start + +### 1️⃣ Inicializace projektu ```bash -# Spuštění testů v terminálu -npx @usebruno/cli run apiTest/PotterAPI -r +# Klonování repozitáře +git clone +cd api_test -# Spuštění testů s vygenerováním HTML reportu -npx @usebruno/cli run apiTest/PotterAPI -r --reporter-html report.html +# Instalace všech závislostí (využívá npm workspaces) +npm run setup +``` + +### 2️⃣ Spuštění backendů + +```bash +# Spuštění všech backendů +npm run start:backends + +# Nebo jednotlivě +npm run start:potter-api +``` + +Backend PotterAPI bude dostupný na **`http://localhost:3000`**. + +### 3️⃣ Spuštění frontendů + +```bash +# Spuštění PotterAPI frontend (Vue.js) +npm run start:potter-fe +``` + +Frontend bude dostupný na **`http://localhost:8080`**. + +### 4️⃣ Spuštění testů + +```bash +# Spuštění všech testů +npm run test:all + +# Spuštění pouze PotterAPI testů +npm run test:potter + +# Spuštění testů s watch módem (automatické opakování) +npm run test:watch +``` + +--- + +## 📁 Struktura monorepa + +``` +api_test/ +├── README.md # Tento soubor (rozcestník) +│ +├── package.json # Root package.json (npm workspaces) +│ +├── backends/ # Backendové služby +│ └── potter-api/ # PotterAPI +│ ├── app.js # Hlavní Express.js aplikace +│ ├── routes/ # API routy +│ ├── controllers/ # Kontrolery +│ ├── frontend/ # Frontend (Vue.js) +│ │ ├── public/ # Statické soubory +│ │ ├── src/ # Zdrojové kódy +│ │ └── package.json # Frontend závislosti +│ ├── bruno_test_scenario.md # Dokumentace pro Bruno +│ └── README.md # Dokumentace PotterAPI +│ +├── apiTest/ # Testovací kolekce (Bruno) +│ └── PotterAPI/ # Testy pro PotterAPI +│ ├── GET/ # GET požadavky +│ ├── POST/ # POST požadavky +│ └── AI/ # AI-specifické testy +│ +├── .github/ # GitHub konfigurace +│ └── workflows/ # CI/CD pipeline +│ └── api-tests.yml # Automativké testování +│ +└── .vibe/ # Vibe agenti (budoucí) + └── agents/ # AI asistenti +``` + +--- + +## 🔧 Nástroje + +### Bruno +**Moderní alternativa k Postmanu** – Open-source nástroj pro testování API. + +- **GUI**: Otevřete `apiTest/` v Bruno aplikaci +- **CLI**: Použijte `npx @usebruno/cli run -r` +- **Dokumentace**: [usebruno.com](https://www.usebruno.com/) + +### Vibe CLI +**AI asistent pro vývoj** – Pomáhá s psaním testů, dokumentací a delegací úkolů. + +--- + +## 🤖 Vibe Agenti *(plánováno)* + +| Agent | Účel | Vyvolání | +|-------|-------|----------| +| **API Test Assistant** | Pomoc s psaním a spouštěním API testů | `/api-tester` | +| **Bruno Expert** | Specialista na Bruno CLI a testovací scénáře | `/bruno-expert` | +| **Learning Guide** | Výuka API testování pro nováčky | `/learning-guide` | + +--- + +## 📝 Pridávání nové API služby + +Chcete přidat novou API službu? Postupujte takto: + +### 1. Vytvořte backend +```bash +mkdir -p backends/ +cd backends/ +npm init -y +# Přidejte svůj backend kód +``` + +### 2. Vytvořte testy +```bash +mkdir -p apiTest/ +# Přidejte Bruno testovací kolekce (.yml soubory) +``` + +### 3. Aktualizujte dokumentaci +- Přidejte řádek do tabulky v tomto README +- Vytvořte `backends//README.md` +- Případně vytvořte `backends//bruno_test_scenario.md` + +### 4. Testujte +```bash +npm run test:all # Spustí všechny testy včetně nových +``` + +--- + +## 🔄 CI/CD Pipeline + +**Automatické testování** při každém pushu na `main` nebo `master` větvi: + +- ✅ Spuštění backendu +- ✅ Čekání na inicializaci serveru +- ✅ Spuštění všech Bruno testů +- ✅ Reportování výsledků + +Soubor: [`.github/workflows/api-tests.yml`](./.github/workflows/api-tests.yml) + +--- + +## 📄 Dokumentace + +- [PotterAPI – Testovací scénáře](./backends/potter-api/bruno_test_scenario.md) – Detailní průvodce testováním PotterAPI + +--- + +## 🤝 Přispívání + +1. Forkněte repozitář +2. Vytvořte feature branch (`git checkout -b feature/nova-funkce`) +3. Commitněte změny (`git commit -m 'Přidána nová funkce'`) +4. Pushněte na větev (`git push origin feature/nova-funkce`) +5. Vytvořte Pull Request + +--- + +## 📞 Kontakt & Podpora + +- **Issues**: [GitHub Issues](https://github.com/kankys/api_test/issues) +- **Diskuse**: Použijte GitHub Discussions + +--- + +## 🏆 Technologie + +| Technologie | Účel | +|------------|-------| +| **Node.js** | Backend runtime | +| **Express.js** | Web framework pro PotterAPI | +| **Vue.js** | Frontend framework | +| **Bruno** | API testování | +| **npm Workspaces** | Správa monorepa | +| **GitHub Actions** | CI/CD | diff --git a/web/backend/.gitignore b/backends/potter-api/.gitignore similarity index 100% rename from web/backend/.gitignore rename to backends/potter-api/.gitignore diff --git a/web/backend/Dockerfile b/backends/potter-api/Dockerfile similarity index 100% rename from web/backend/Dockerfile rename to backends/potter-api/Dockerfile diff --git a/web/backend/README.md b/backends/potter-api/README.md similarity index 100% rename from web/backend/README.md rename to backends/potter-api/README.md diff --git a/web/backend/app.js b/backends/potter-api/app.js similarity index 100% rename from web/backend/app.js rename to backends/potter-api/app.js diff --git a/bruno_test_scenario.md b/backends/potter-api/bruno_test_scenario.md similarity index 98% rename from bruno_test_scenario.md rename to backends/potter-api/bruno_test_scenario.md index 87943c9..b13da42 100644 --- a/bruno_test_scenario.md +++ b/backends/potter-api/bruno_test_scenario.md @@ -39,21 +39,21 @@ Backend je Express.js aplikace běžící na portu **3000**. **Spuštění z kořenové složky projektu:** ```bash -cd web/backend +cd backends/potter-api npm install # Nainstaluje závislosti (pokud ještě nejsou nainstalovány) npm start # Spustí server pomocí nodemon (automaticky restartuje při změnách) ``` **Přímé spuštění bez nodemon:** ```bash -cd web/backend +cd backends/potter-api node app.js ``` Server bude dostupný na `http://localhost:3000`. > [!TIP] -> Pokud je port 3000 obsazen, je nutné jej uvolnit nebo změnit port přímo v souboru `web/backend/app.js` (řádek 9: `const port = 3000`). +> Pokud je port 3000 obsazen, je nutné jej uvolnit nebo změnit port přímo v souboru `backends/potter-api/app.js` (řádek 9: `const port = 3000`). ### Frontend (Vue.js Aplikace) @@ -61,7 +61,7 @@ Frontend je Vue.js aplikace, kterou lze spustit pro vývojové účely. **Spuštění z kořenové složky projektu:** ```bash -cd web/frontend +cd backends/potter-api/frontend npm install # Nainstaluje závislosti (pokud ještě nejsou nainstalovány) npm run serve # Spustí vývojový server (obvykle na portu 8080) # nebo diff --git a/web/backend/characters.json b/backends/potter-api/characters.json similarity index 100% rename from web/backend/characters.json rename to backends/potter-api/characters.json diff --git a/web/backend/controllers/charactersController.js b/backends/potter-api/controllers/charactersController.js similarity index 100% rename from web/backend/controllers/charactersController.js rename to backends/potter-api/controllers/charactersController.js diff --git a/web/backend/controllers/housesController.js b/backends/potter-api/controllers/housesController.js similarity index 100% rename from web/backend/controllers/housesController.js rename to backends/potter-api/controllers/housesController.js diff --git a/web/backend/controllers/spellsController.js b/backends/potter-api/controllers/spellsController.js similarity index 100% rename from web/backend/controllers/spellsController.js rename to backends/potter-api/controllers/spellsController.js diff --git a/web/frontend/.gitignore b/backends/potter-api/frontend/.gitignore similarity index 100% rename from web/frontend/.gitignore rename to backends/potter-api/frontend/.gitignore diff --git a/web/frontend/Dockerfile b/backends/potter-api/frontend/Dockerfile similarity index 100% rename from web/frontend/Dockerfile rename to backends/potter-api/frontend/Dockerfile diff --git a/web/frontend/README.md b/backends/potter-api/frontend/README.md similarity index 100% rename from web/frontend/README.md rename to backends/potter-api/frontend/README.md diff --git a/web/frontend/babel.config.js b/backends/potter-api/frontend/babel.config.js similarity index 100% rename from web/frontend/babel.config.js rename to backends/potter-api/frontend/babel.config.js diff --git a/web/frontend/package-lock.json b/backends/potter-api/frontend/package-lock.json similarity index 100% rename from web/frontend/package-lock.json rename to backends/potter-api/frontend/package-lock.json diff --git a/web/frontend/package.json b/backends/potter-api/frontend/package.json similarity index 100% rename from web/frontend/package.json rename to backends/potter-api/frontend/package.json diff --git a/web/frontend/public/favicon.ico b/backends/potter-api/frontend/public/favicon.ico similarity index 100% rename from web/frontend/public/favicon.ico rename to backends/potter-api/frontend/public/favicon.ico diff --git a/web/frontend/public/index.html b/backends/potter-api/frontend/public/index.html similarity index 100% rename from web/frontend/public/index.html rename to backends/potter-api/frontend/public/index.html diff --git a/web/frontend/src/App.vue b/backends/potter-api/frontend/src/App.vue similarity index 100% rename from web/frontend/src/App.vue rename to backends/potter-api/frontend/src/App.vue diff --git a/web/frontend/src/assets/HARRYP.TTF b/backends/potter-api/frontend/src/assets/HARRYP.TTF similarity index 100% rename from web/frontend/src/assets/HARRYP.TTF rename to backends/potter-api/frontend/src/assets/HARRYP.TTF diff --git a/web/frontend/src/assets/gringottsbanklogo.png b/backends/potter-api/frontend/src/assets/gringottsbanklogo.png similarity index 100% rename from web/frontend/src/assets/gringottsbanklogo.png rename to backends/potter-api/frontend/src/assets/gringottsbanklogo.png diff --git a/web/frontend/src/assets/hogwartslogo.png b/backends/potter-api/frontend/src/assets/hogwartslogo.png similarity index 100% rename from web/frontend/src/assets/hogwartslogo.png rename to backends/potter-api/frontend/src/assets/hogwartslogo.png diff --git a/web/frontend/src/assets/iswear.jpg b/backends/potter-api/frontend/src/assets/iswear.jpg similarity index 100% rename from web/frontend/src/assets/iswear.jpg rename to backends/potter-api/frontend/src/assets/iswear.jpg diff --git a/web/frontend/src/assets/sortinghat.jpg b/backends/potter-api/frontend/src/assets/sortinghat.jpg similarity index 100% rename from web/frontend/src/assets/sortinghat.jpg rename to backends/potter-api/frontend/src/assets/sortinghat.jpg diff --git a/web/frontend/src/components/GringottsBank.vue b/backends/potter-api/frontend/src/components/GringottsBank.vue similarity index 100% rename from web/frontend/src/components/GringottsBank.vue rename to backends/potter-api/frontend/src/components/GringottsBank.vue diff --git a/web/frontend/src/components/Modal.vue b/backends/potter-api/frontend/src/components/Modal.vue similarity index 100% rename from web/frontend/src/components/Modal.vue rename to backends/potter-api/frontend/src/components/Modal.vue diff --git a/web/frontend/src/components/Navigation.vue b/backends/potter-api/frontend/src/components/Navigation.vue similarity index 100% rename from web/frontend/src/components/Navigation.vue rename to backends/potter-api/frontend/src/components/Navigation.vue diff --git a/web/frontend/src/components/QuoteGenerator.vue b/backends/potter-api/frontend/src/components/QuoteGenerator.vue similarity index 100% rename from web/frontend/src/components/QuoteGenerator.vue rename to backends/potter-api/frontend/src/components/QuoteGenerator.vue diff --git a/web/frontend/src/components/SearchComponent.vue b/backends/potter-api/frontend/src/components/SearchComponent.vue similarity index 100% rename from web/frontend/src/components/SearchComponent.vue rename to backends/potter-api/frontend/src/components/SearchComponent.vue diff --git a/web/frontend/src/components/SortingHat.vue b/backends/potter-api/frontend/src/components/SortingHat.vue similarity index 100% rename from web/frontend/src/components/SortingHat.vue rename to backends/potter-api/frontend/src/components/SortingHat.vue diff --git a/web/frontend/src/components/SpellList.vue b/backends/potter-api/frontend/src/components/SpellList.vue similarity index 100% rename from web/frontend/src/components/SpellList.vue rename to backends/potter-api/frontend/src/components/SpellList.vue diff --git a/web/frontend/src/components/Spelleology.vue b/backends/potter-api/frontend/src/components/Spelleology.vue similarity index 100% rename from web/frontend/src/components/Spelleology.vue rename to backends/potter-api/frontend/src/components/Spelleology.vue diff --git a/web/frontend/src/components/Welcome.vue b/backends/potter-api/frontend/src/components/Welcome.vue similarity index 100% rename from web/frontend/src/components/Welcome.vue rename to backends/potter-api/frontend/src/components/Welcome.vue diff --git a/web/frontend/src/components/gringotts-bank/GringottsCalculator.vue b/backends/potter-api/frontend/src/components/gringotts-bank/GringottsCalculator.vue similarity index 100% rename from web/frontend/src/components/gringotts-bank/GringottsCalculator.vue rename to backends/potter-api/frontend/src/components/gringotts-bank/GringottsCalculator.vue diff --git a/web/frontend/src/components/gringotts-bank/GringottsForm.vue b/backends/potter-api/frontend/src/components/gringotts-bank/GringottsForm.vue similarity index 100% rename from web/frontend/src/components/gringotts-bank/GringottsForm.vue rename to backends/potter-api/frontend/src/components/gringotts-bank/GringottsForm.vue diff --git a/web/frontend/src/components/gringotts-bank/GringottsInvestmentList.vue b/backends/potter-api/frontend/src/components/gringotts-bank/GringottsInvestmentList.vue similarity index 100% rename from web/frontend/src/components/gringotts-bank/GringottsInvestmentList.vue rename to backends/potter-api/frontend/src/components/gringotts-bank/GringottsInvestmentList.vue diff --git a/web/frontend/src/components/gringotts-bank/GringottsInvestmentModal.vue b/backends/potter-api/frontend/src/components/gringotts-bank/GringottsInvestmentModal.vue similarity index 100% rename from web/frontend/src/components/gringotts-bank/GringottsInvestmentModal.vue rename to backends/potter-api/frontend/src/components/gringotts-bank/GringottsInvestmentModal.vue diff --git a/web/frontend/src/components/newFile.js b/backends/potter-api/frontend/src/components/newFile.js similarity index 100% rename from web/frontend/src/components/newFile.js rename to backends/potter-api/frontend/src/components/newFile.js diff --git a/web/frontend/src/main.js b/backends/potter-api/frontend/src/main.js similarity index 100% rename from web/frontend/src/main.js rename to backends/potter-api/frontend/src/main.js diff --git a/web/frontend/webpack.config.js b/backends/potter-api/frontend/webpack.config.js similarity index 100% rename from web/frontend/webpack.config.js rename to backends/potter-api/frontend/webpack.config.js diff --git a/web/backend/houses.json b/backends/potter-api/houses.json similarity index 100% rename from web/backend/houses.json rename to backends/potter-api/houses.json diff --git a/web/backend/middleware/auth.js b/backends/potter-api/middleware/auth.js similarity index 100% rename from web/backend/middleware/auth.js rename to backends/potter-api/middleware/auth.js diff --git a/web/backend/middleware/header.js b/backends/potter-api/middleware/header.js similarity index 100% rename from web/backend/middleware/header.js rename to backends/potter-api/middleware/header.js diff --git a/web/backend/middleware/spellMiddleware.js b/backends/potter-api/middleware/spellMiddleware.js similarity index 100% rename from web/backend/middleware/spellMiddleware.js rename to backends/potter-api/middleware/spellMiddleware.js diff --git a/web/backend/package-lock.json b/backends/potter-api/package-lock.json similarity index 100% rename from web/backend/package-lock.json rename to backends/potter-api/package-lock.json diff --git a/web/backend/package.json b/backends/potter-api/package.json similarity index 100% rename from web/backend/package.json rename to backends/potter-api/package.json diff --git a/web/backend/quotes.json b/backends/potter-api/quotes.json similarity index 100% rename from web/backend/quotes.json rename to backends/potter-api/quotes.json diff --git a/web/backend/routes/characters.js b/backends/potter-api/routes/characters.js similarity index 100% rename from web/backend/routes/characters.js rename to backends/potter-api/routes/characters.js diff --git a/web/backend/routes/houses.js b/backends/potter-api/routes/houses.js similarity index 100% rename from web/backend/routes/houses.js rename to backends/potter-api/routes/houses.js diff --git a/web/backend/routes/quote.js b/backends/potter-api/routes/quote.js similarity index 100% rename from web/backend/routes/quote.js rename to backends/potter-api/routes/quote.js diff --git a/web/backend/routes/sortinghat.js b/backends/potter-api/routes/sortinghat.js similarity index 100% rename from web/backend/routes/sortinghat.js rename to backends/potter-api/routes/sortinghat.js diff --git a/web/backend/routes/spells.js b/backends/potter-api/routes/spells.js similarity index 100% rename from web/backend/routes/spells.js rename to backends/potter-api/routes/spells.js diff --git a/web/backend/sortinghatquotes.json b/backends/potter-api/sortinghatquotes.json similarity index 100% rename from web/backend/sortinghatquotes.json rename to backends/potter-api/sortinghatquotes.json diff --git a/web/backend/spells.json b/backends/potter-api/spells.json similarity index 100% rename from web/backend/spells.json rename to backends/potter-api/spells.json diff --git a/package.json b/package.json new file mode 100644 index 0000000..2d06490 --- /dev/null +++ b/package.json @@ -0,0 +1,33 @@ +{ + "name": "api-test-playground", + "version": "1.0.0", + "description": "Monorepo for API testing playground with Bruno and Vibe agents", + "private": true, + "workspaces": [ + "backends/*", + "backends/*/frontend", + "apiTest/*" + ], + "scripts": { + "setup": "npm install", + "start:all": "concurrently \"npm run start:backends\" \"npm run test:watch\"", + "start:backends": "cd backends/potter-api && npm start", + "start:potter-api": "cd backends/potter-api && npm start", + "start:potter-fe": "cd backends/potter-api/frontend && npm run serve", + "test:all": "cd apiTest && npx @usebruno/cli run PotterAPI -r", + "test:potter": "cd apiTest/PotterAPI && npx @usebruno/cli run -r", + "test:watch": "cd apiTest && npx @usebruno/cli run PotterAPI -r --watch", + "lint": "echo \"Linting all workspaces\"" + }, + "devDependencies": { + "concurrently": "^8.2.2" + }, + "keywords": [ + "api-testing", + "bruno", + "monorepo", + "potter-api" + ], + "author": "", + "license": "ISC" +}