Peter Wood 4b87bce4b7 docs: add development container setup instructions (#29)
- Add PAT requirements
- Add devcontainer CLI commands
- Add VS Code instructions
- Add troubleshooting tips

Part of #29
2025-05-04 13:34:11 -04:00

My Bank App - 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: Currently uses an in-memory data store (src/data/store.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

Prerequisites

  • VS Code with Remote Containers extension
  • Docker and Docker Compose
  • Git

Initial Setup

  1. Clone the repository
  2. Copy .devcontainer/.env.example to .devcontainer/.env
  3. Update the environment variables in .devcontainer/.env
  4. Open the project in VS Code and select "Reopen in Container" when prompted

GitHub MCP Server

The project uses GitHub's MCP server for development tasks. The server runs in a Docker container and is automatically configured when you open the project in a devcontainer.

Configuration

  • The MCP server uses GitHub authentication via Personal Access Token
  • Token is stored securely in .devcontainer/.env (not committed to repository)
  • GitHub CLI is installed in the devcontainer for easier authentication management
  • Container health monitoring is configured

Usage

The MCP server will automatically start when you open the project in a devcontainer. If you need to manually authenticate:

  1. Run gh auth login in the terminal
  2. Follow the prompts to authenticate with your GitHub account

Database Setup

Development Container Setup

GitHub Personal Access Token

Before using the development container, you'll need a GitHub Personal Access Token (PAT) with the following permissions:

  • repo (Full control of private repositories)
  • read:packages (Download container images)
  • write:packages (Upload container images)
  • delete:packages (Optional: manage container versions)
  • workflow (GitHub Actions integration)

Using the Development Container

Command Line Interface

You can build and start the development container using the devcontainer CLI:

# Build the container
devcontainer build .

# Start the container (with post-create command)
devcontainer up --workspace-folder .

# Start the container (skip post-create)
devcontainer up --workspace-folder . --skip-post-create

VS Code

  1. Open the project in VS Code
  2. Press F1 and run "Dev Containers: Rebuild and Reopen in Container"
    • To skip post-create steps: Press F1 and run "Dev Containers: Rebuild Container Without Cache"

Troubleshooting

  • If GitHub authentication fails, ensure your PAT is correctly set in .devcontainer/.env
  • For network issues, try rebuilding the container with --no-cache option
  • Check the VS Code "Dev Containers" output panel for detailed logs
Description
No description provided
Readme 696 KiB
Languages
TypeScript 80.3%
CSS 11.9%
PowerShell 3.1%
Shell 2.4%
JavaScript 1.8%
Other 0.5%