Shared Dependencies:
-
Next.js: All files in the pages directory and the _app.tsx and _document.tsx files will share the Next.js library for server-side rendering and routing.
-
React: All .tsx files will share the React library for building the user interface.
-
TypeScript: All .tsx and .ts files will share TypeScript for type checking and improved developer experience.
-
PostgreSQL: The db.ts file will establish a connection to the PostgreSQL database which will be used by the expense.ts, category.ts, currency.ts, and report.ts files for data manipulation.
-
CSS Modules: All .css files will share the CSS Modules for styling the components.
-
Exported Variables: The components (ExpenseForm, CategoryForm, CurrencyForm, ReportForm, ExpenseTable, CategoryTable, CurrencyTable, ReportTable) will be exported and used in the pages.
-
Data Schemas: The data schemas for expenses, categories, currencies, and reports will be shared across the API files (expense.ts, category.ts, currency.ts, report.ts) and the corresponding form and table components.
-
DOM Element IDs: IDs for form inputs and table rows will be shared across the form and table components and the corresponding pages.
-
Function Names: Functions for handling form submissions, data fetching, and data manipulation will be shared across the API files and the corresponding form and table components.
-
Message Names: Message names for error handling and user notifications will be shared across the API files and the corresponding form and table components.