From a8ec2734c8e9f5d2e06d4ea5275fa50ccede747c Mon Sep 17 00:00:00 2001 From: GitHub Copilot Date: Tue, 6 May 2025 08:57:53 +0000 Subject: [PATCH] Update Copilot instructions to reflect database integration --- .github/copilot-instructions.md | 35 ++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index ee4401b..61f2604 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -9,7 +9,7 @@ This project is a web user interface (UI) for a CRUD (Create, Read, Update, Dele * **Framework:** Astro (latest version) * **Language:** TypeScript, JavaScript (client-side scripts), HTML, CSS * **Styling:** Plain CSS (`src/styles/global.css`) -* **Data:** Using Astro's built-in API routes in `src/pages/api/` with a temporary in-memory store (`src/data/store.ts`). **The goal is to eventually replace the in-memory store with a persistent database.** +* **Data:** Using Astro's built-in API routes in `src/pages/api/` with persistent database storage via Prisma ORM (`src/data/db.service.ts`). * **Development Environment:** VS Code Dev Container using private Docker image (`ghcr.io/acedanger/finance-devcontainer:latest`) ## Development Environment @@ -41,20 +41,22 @@ This project is a web user interface (UI) for a CRUD (Create, Read, Update, Dele * **Components:** Separate Astro components exist for major UI sections (Sidebar, MainContent, TransactionTable, AddTransactionForm, AccountSummary). * **API Integration:** * API routes structure implemented in `src/pages/api/` - * Temporary data store in `src/data/store.ts` - * All API endpoints implemented and ready to use: + * Database integration using Prisma ORM in `src/data/db.service.ts` + * All API endpoints implemented and fully functional: * GET /api/accounts - List all accounts * GET /api/accounts/:id - Get single account details * GET /api/accounts/:id/transactions - Get transactions for an account * POST /api/transactions - Create new transaction * PUT /api/transactions/:id - Update existing transaction * DELETE /api/transactions/:id - Delete transaction - * Error handling and validation included - * Prepared for future database integration with modular store design + * Comprehensive error handling and validation + * Database persistence with proper transaction support * **Account Switching:** Selecting an account from the dropdown in the sidebar correctly updates the Main Content area (header, transaction table) and the Account Summary section using client-side JavaScript (`