- Updated @astrojs/cloudflare from ^12.5.1 to ^12.5.3 - Updated @astrojs/node from ^9.2.1 to ^9.2.2 - Updated @astrojs/react from ^4.2.5 to ^4.3.0 - Updated @prisma/client from ^6.7.0 to ^6.8.2 - Updated @radix-ui/react-dialog from ^1.1.13 to ^1.1.14 - Updated @radix-ui/react-dropdown-menu from ^2.1.14 to ^2.1.15 - Updated @radix-ui/react-form from ^0.1.6 to ^0.1.7 - Updated @radix-ui/react-select from ^2.2.4 to ^2.2.5 - Updated @radix-ui/react-toast from ^1.2.13 to ^1.2.14 - Updated @types/react from ^19.1.2 to ^19.1.5 - Updated @types/react-dom from ^19.1.2 to ^19.1.5 - Updated astro from ^5.7.5 to ^5.8.0 - Updated @types/node from ^20.11.0 to ^22.15.21 - Updated @vitejs/plugin-react from ^4.4.1 to ^4.5.0 - Updated @vitest/coverage-v8 from ^3.1.3 to ^3.1.4 - Updated prisma from ^6.7.0 to ^6.8.2 - Updated supertest from ^7.1.0 to ^7.1.1 - Updated vitest from ^3.1.2 to ^3.1.4 - Updated wrangler from ^4.13.1 to ^4.16.1
Financial Transaction Manager
A web application for managing financial transactions across multiple bank accounts.
Project Overview
- Purpose: Provides a user interface for CRUD operations on financial transactions.
- Technology: Built with Astro, TypeScript, and plain CSS, utilizing Astro API routes.
- Layout: Features a two-column dashboard design with a sidebar for account selection/actions and a main area for transaction display.
- Data Management: Uses Prisma ORM for database operations (
src/data/db.service.ts), accessed via API endpoints (src/pages/api/). - Key Features (Implemented & Planned): Account switching, transaction listing, adding, editing, and deleting transactions.
Logs
This app is currently deployed using Cloudflare Pages. The logs can be viewed with the npx wrangler pages deployment tail --project-name finance command.
Development Environment Setup
For detailed setup instructions, including environment configuration and troubleshooting, see ENVIRONMENT_SETUP.md.
Quick Start
-
Prerequisites
- Node.js (version 18 or higher)
- PostgreSQL (local installation or Docker)
- Git
-
Setup Steps
- Clone this repository
- Run
npm install - Copy
.env.exampleto.envand configure your database connection - Run
npx prisma migrate devto set up the database
Database Setup
The project uses Prisma ORM for database operations. To set up the database:
-
Create a
.envfile in the project root with your database connection string:DATABASE_URL="postgresql://username:password@localhost:5432/finance" -
Run database migrations:
npx prisma migrate dev -
Seed the database with initial data (optional):
npx prisma db seed -
To view and manage your data visually:
npx prisma studio
Path Aliases
This project uses TypeScript path aliases for cleaner imports. Instead of using relative paths like ../../../../data/db.service, use the following aliases:
@/*- Maps tosrc/*@components/*- Maps tosrc/components/*@layouts/*- Maps tosrc/layouts/*@data/*- Maps tosrc/data/*@pages/*- Maps tosrc/pages/*@styles/*- Maps tosrc/styles/*@stores/*- Maps tosrc/stores/*@utils/*- Maps tosrc/utils.ts@types- Maps tosrc/types.ts
Example:
// ✅ DO use path aliases like this
import { transactionService } from '@data/db.service';
import type { Transaction } from '@types';
// ❌ DON'T use relative imports like this
import { transactionService } from '../../../../data/db.service';
Enforcing Path Aliases with Biome.js
This project uses Biome.js for code formatting and linting. Biome enforces the use of path aliases instead of relative imports. To run Biome checks:
npm run check
To automatically fix issues:
npm run check -- --apply
The Biome configuration (in biome.json) includes rules for import sorting and path alias enforcement. To customize the rules, edit the biome.json file.