# GitHub Copilot Instructions for my-bank-app ## Project Goal This project is a web user interface (UI) for a CRUD (Create, Read, Update, Delete) application managing financial transactions for multiple bank accounts. The UI follows a two-column dashboard layout (Alternative 3 from the design phase). ## Technology Stack * **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.** ## Current State & Key Features * **Layout:** A two-column dashboard layout (`src/layouts/BaseLayout.astro`, `src/pages/index.astro`) is implemented. * **Sidebar:** (`src/components/Sidebar.astro`) Contains account selection dropdown and a collapsible section for adding new transactions. Includes an account summary section. * **Main Content:** (`src/components/MainContent.astro`) Displays the header with the current account name and the transaction list. * **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: * 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 * **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 (`