Update Copilot instructions to reflect in-memory data usage and remove references to static JSON files

This commit is contained in:
Peter Wood
2025-04-23 21:02:54 -04:00
parent 20f3ec4acc
commit b993cb89b2

View File

@@ -9,7 +9,7 @@ This project is a web user interface (UI) for a CRUD (Create, Read, Update, Dele
* **Framework:** Astro (latest version) * **Framework:** Astro (latest version)
* **Language:** TypeScript, JavaScript (client-side scripts), HTML, CSS * **Language:** TypeScript, JavaScript (client-side scripts), HTML, CSS
* **Styling:** Plain CSS (`src/styles/global.css`) * **Styling:** Plain CSS (`src/styles/global.css`)
* **Data:** Currently using static JSON files (`src/data/accounts.json`, `src/data/transactions.json`). **The goal is to eventually replace this with a backend API.** * **Data:** Currently using in-memory arrays. **The goal is to eventually integrate with a backend API.**
## Current State & Key Features ## Current State & Key Features
@@ -17,7 +17,7 @@ This project is a web user interface (UI) for a CRUD (Create, Read, Update, Dele
* **Sidebar:** (`src/components/Sidebar.astro`) Contains account selection dropdown and a collapsible section for adding new transactions. Includes an account summary section. * **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. * **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). * **Components:** Separate Astro components exist for major UI sections (Sidebar, MainContent, TransactionTable, AddTransactionForm, AccountSummary).
* **Data Loading:** Initial data for accounts and transactions is loaded from static JSON files on the server-side (`src/pages/index.astro`). * **Data Loading:** Currently using empty arrays for accounts and transactions, initialized in `src/pages/index.astro`.
* **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 (`<script>` tag in `index.astro`). * **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 (`<script>` tag in `index.astro`).
* **Collapsible Form:** The "Add Transaction" section in the sidebar (`src/components/AddTransactionForm.astro`) can be expanded and collapsed using client-side JavaScript (`<script>` tag in `AddTransactionForm.astro`). * **Collapsible Form:** The "Add Transaction" section in the sidebar (`src/components/AddTransactionForm.astro`) can be expanded and collapsed using client-side JavaScript (`<script>` tag in `AddTransactionForm.astro`).
* **Basic Formatting:** Utility functions (`src/utils.ts`) exist for formatting currency and dates, used both server-side and client-side (mirrored in `index.astro` script). * **Basic Formatting:** Utility functions (`src/utils.ts`) exist for formatting currency and dates, used both server-side and client-side (mirrored in `index.astro` script).
@@ -26,7 +26,6 @@ This project is a web user interface (UI) for a CRUD (Create, Read, Update, Dele
## File Structure Overview ## File Structure Overview
* `src/components/`: Reusable UI components. * `src/components/`: Reusable UI components.
* `src/data/`: Static JSON data files (temporary).
* `src/layouts/`: Base page layout(s). * `src/layouts/`: Base page layout(s).
* `src/pages/`: Astro pages (routes). `index.astro` is the main page. * `src/pages/`: Astro pages (routes). `index.astro` is the main page.
* `src/styles/`: Global CSS styles. * `src/styles/`: Global CSS styles.