Skip to content

Repository files navigation

Blue Sheet Tax 青色申告帳簿

A local-first bookkeeping helper for sole proprietors running English lesson businesses in Japan.

License: MIT TypeScript React Vite


Overview

Blue Sheet Tax is a fully offline, browser-based bookkeeping tool designed for English conversation teachers (英会話講師) in Japan who file as sole proprietors (個人事業主) under the blue return system (青色申告). It covers the complete annual bookkeeping workflow — from recording monthly tuition payments and business expenses through to generating the reports required for year-end filing preparation.

All data is stored exclusively in the browser's localStorage. Nothing is transmitted to any server. The app can be used entirely offline once loaded.

Disclaimer: This application is a preparation aid only. All figures should be confirmed with a qualified tax accountant (税理士) before filing. The authors accept no liability for errors in tax calculations or filings.


Features

Screen What it does
Dashboard Year-to-date income, expenses, and estimated profit at a glance; filing readiness badge; quick-action shortcuts
Students 生徒管理 Full CRUD for the student roster with lesson type, usual fee, and active/inactive status
Monthly Tuition 月謝入力 Per-payment income recording with student snapshot, payment method, receipt reference, and envelope-signed flag
Expenses 経費入力 Business expense entry across 8 blue-return categories with Included / NeedsReview / Excluded status workflow
Gas / Car ガソリン・車 Fuel receipt log plus monthly business-use allocation with configurable percentage and deductible amount calculation
Assets 資産管理 Asset purchase recording with automatic treatment suggestion (ordinary expense vs. depreciable asset) based on the ¥100,000 threshold, with manual override
Reports 帳票・レポート Nine report types: Journal (仕訳帳), General Ledger (総勘定元帳), Cash Book (現金出納帳), Expense Summary (経費集計), Asset & Depreciation (減価償却一覧), Monthly Income (月別売上集計), Profit & Loss (損益計算書), Balance Sheet (貸借対照表), and City Hall Filing Helper (入力補助表)
Year-End Review 年末確認 Seven-point checklist wizard with filing readiness badge and issue list
Export & Backup エクスポート Full JSON backup/restore, four CSV exports, and multi-year management
Settings 設定 Owner name, business name, default payment method, default gas business-use percentage, and asset threshold

Tech Stack

Layer Technology
Framework React 19
Language TypeScript 5.6
Build tool Vite 7
Styling Tailwind CSS 4
UI components shadcn/ui (Radix UI primitives)
Routing Wouter 3
Charts Recharts 2
Persistence Browser localStorage
ID generation nanoid

Getting Started

Prerequisites

  • Node.js 20 or later
  • pnpm 10 or later (npm install -g pnpm)

Installation

# Clone the repository
git clone https://github.com/penatechnologies/blue-sheet-tax.git
cd blue-sheet-tax

# Install dependencies
pnpm install

# Start the development server
pnpm dev

The app will be available at http://localhost:3000.

Build for Production

pnpm build

The static output is written to dist/public. Because the app is entirely client-side, it can be served from any static hosting provider (GitHub Pages, Netlify, Vercel, Cloudflare Pages, etc.) or opened directly from the file system.


Project Structure

blue-sheet-tax/
├── client/
│   ├── index.html              # HTML entry point
│   └── src/
│       ├── App.tsx             # Routes and top-level layout
│       ├── main.tsx            # React entry point
│       ├── index.css           # Global styles and design tokens
│       ├── components/
│       │   ├── AppLayout.tsx   # Sidebar navigation shell
│       │   └── ui/             # shadcn/ui primitives
│       ├── contexts/
│       │   └── AppContext.tsx  # Global state (wraps storage layer)
│       ├── hooks/              # Custom React hooks
│       ├── lib/
│       │   ├── types.ts        # All TypeScript interfaces and enums
│       │   ├── storage.ts      # localStorage read/write and CSV/report helpers
│       │   └── utils.ts        # Shared utility functions
│       └── pages/
│           ├── Dashboard.tsx
│           ├── Students.tsx
│           ├── MonthlyTuition.tsx
│           ├── Expenses.tsx
│           ├── GasCar.tsx
│           ├── Assets.tsx
│           ├── Reports.tsx
│           ├── YearEndWizard.tsx
│           ├── Export.tsx
│           └── Settings.tsx
├── server/                     # Minimal Express server (static file serving only)
├── shared/                     # Shared type stubs
├── CHANGELOG.md
├── CONTRIBUTING.md
├── CODE_OF_CONDUCT.md
└── LICENSE

Data Model

All application data is stored under a single localStorage key (blueSheetTax) as a JSON object conforming to the AppStore interface:

AppStore
├── schemaVersion: number       # For future migrations
├── settings: AppSettings       # Global preferences
└── years: Record<string, YearData>
    └── YearData
        ├── students[]
        ├── tuitionEntries[]
        ├── expenseEntries[]
        ├── gasReceipts[]
        ├── gasAllocations[]
        ├── assets[]
        ├── reportState
        ├── reviewState
        └── yearStatus

Each tax year is stored independently. The Export & Backup screen allows the full store to be exported as a timestamped JSON file and restored from a previous backup.


Multi-Year Support

The sidebar year selector allows switching between any recorded tax year. The + button creates a new year with an empty YearData record. Students are stored globally (shared across years) while all financial records are scoped to the year they were entered.


Expense Categories

The following blue-return expense categories are supported:

English Japanese Risky
Supplies 消耗品費(文具等) No
Printing 印刷費 No
Consumables 消耗品費 No
Vehicle Fuel 車両燃料費 No
Travel / Transport 旅費交通費 No
Gift / Promotion 交際費・販促費 Yes
Meals (Review Required) 飲食費(要確認) Yes
Misc / Other 雑費 Yes

Expenses flagged as "risky" are automatically set to NeedsReview status and highlighted for manual confirmation before filing.


Backup and Data Safety

Because all data lives in localStorage, it will be lost if the browser cache is cleared. Regular JSON backups via the Export screen are strongly recommended, particularly before clearing browser data or switching devices.

The JSON backup format is human-readable and version-tagged, making it suitable for long-term archival.


Roadmap

See CHANGELOG.md for the release history. Planned improvements include:

  • Receipt photo filename linking with folder-open shortcut
  • Monthly income bar chart on the Dashboard
  • One-click carry-forward of the active student roster when creating a new tax year
  • Depreciation schedule calculation (straight-line and declining-balance)
  • Print-optimised CSS for all report views

Contributing

Contributions are welcome. Please read CONTRIBUTING.md before opening a pull request.


License

This project is licensed under the MIT License.


Acknowledgements

Built with React, Vite, Tailwind CSS, shadcn/ui, and Recharts. Designed for the specific needs of English conversation teachers filing blue returns in Japan.

About

Offline-first 青色申告 bookkeeping app for English lesson sole proprietors in Japan — tuition, expenses, gas, assets, 9 report types, year-end review wizard

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages