financial-planning

zakisanbaiman's avatarfrom zakisanbaiman

財務計画計算機プロジェクトの開発支援。Next.js/TypeScript フロントエンドと Go/Gin バックエンドの開発、DDD アーキテクチャ、金融計算ロジックの実装時に使用。

⭐1stars🔀0forks📁View on GitHub🕐Updated Jan 8, 2026

When & Why to Use This Skill

This Claude skill is a comprehensive development assistant for building a Japanese-market financial planning and asset simulation web application. It provides end-to-end support for a modern full-stack architecture, utilizing Next.js 14 and TypeScript for the frontend, and Go (Gin) for the backend. By leveraging Domain-Driven Design (DDD) principles, it helps developers implement complex financial calculation logic, asset projections, and retirement planning features with high maintainability and type safety.

Use Cases

  • Scaffolding a full-stack financial application with Next.js App Router and a Go-based REST API.
  • Implementing complex financial domain logic such as compound interest simulations, retirement fund gap analysis, and emergency fund calculations.
  • Architecting a backend system using Domain-Driven Design (DDD) patterns, including entities, value objects, and repository interfaces.
  • Generating type-safe frontend components and Zod validation schemas for financial data entry and user profiling.
  • Setting up a robust development environment with Docker, GitHub Actions, and OpenAPI documentation for financial services.
namefinancial-planning
description財務計画計算機プロジェクトの開発支援。Next.js/TypeScript フロントエンドと Go/Gin バックエンドの開発、DDD アーキテクチャ、金融計算ロジックの実装時に使用。

財務計画計算機

日本向けの財務計画・資産シミュレーションWebアプリケーション。

プロジェクト概要

ユーザーが現在の収入・支出・貯蓄を入力し、将来の資産推移、老後資金、緊急時の備えを計算・可視化します。

技術スタック

フロントエンド (frontend/)

  • フレームワーク: Next.js 14 (App Router)
  • 言語: TypeScript
  • スタイリング: Tailwind CSS
  • グラフ: Chart.js
  • フォーム: React Hook Form + Zod

バックエンド (backend/)

  • 言語: Go 1.24+
  • フレームワーク: Gin
  • データベース: PostgreSQL
  • API仕様: OpenAPI/Swagger (docs/)

インフラ

  • デプロイ: Render.com
  • CI/CD: GitHub Actions
  • コンテナ: Docker + Docker Compose

アーキテクチャ

バックエンド (DDD)

backend/
├── domain/
│   ├── entities/        # FinancialProfile, Goal, RetirementData
│   ├── valueobjects/    # Money, Percentage
│   ├── aggregates/      # FinancialPlan
│   └── repositories/    # インターフェース
├── application/usecases/
├── infrastructure/
│   ├── database/
│   ├── repositories/
│   └── web/
└── config/

フロントエンド

frontend/src/
├── app/           # Next.js App Router
├── components/    # UIコンポーネント
├── lib/           # ユーティリティ
└── types/         # TypeScript型定義

ドメイン知識

主要エンティティ

  • FinancialProfile: 収入、支出、貯蓄、年齢
  • Goal: 目標タイプ、金額、期限
  • RetirementData: 年金、生活費、退職金

値オブジェクト

  • Money: 通貨付き金額(不変)
  • Percentage: パーセンテージ

計算ロジック

  • 資産推移シミュレーション(複利)
  • 老後資金の過不足計算
  • 緊急資金の必要月数

コーディング規約

Go

// エラーにコンテキストを付与
return fmt.Errorf("usecase: failed to save: %w", err)

TypeScript

// Zodでバリデーション
const schema = z.object({ monthlyIncome: z.number().positive() });

コミット

Conventional Commits: feat(frontend): 機能追加, fix(backend): バグ修正

コマンド

make dev          # 開発サーバー
make test         # テスト
make lint         # Lint

API

Method Path 説明
GET /health ヘルスチェック
POST /api/v1/financial-profiles プロファイル作成
POST /api/v1/projections シミュレーション

注意点

  • 金額は整数(円)で扱う
  • 本番: DB_SSLMODE=require, GIN_MODE=release
  • UI/コメントは日本語OK