Show original
Try the app

契約管理システム
Enjoyed this article?
Support Shunsuke Kinjo

AI translation
We are introducing the apps published on Tsukutta one by one. The third one is a web business system called "Contract Management System" that centrally manages contracts held by the company from registration to expiration dates, renewal decisions, versions, cancellations, terminations, and audit histories. Why we created it: Simply saving contract files is not enough to manage them...
Try the app

契約管理システム
Enjoyed this article?
Support Shunsuke Kinjo
We are introducing the apps published on Tsukutta one by one. The third one is a web business system called "Contract Management System" that provides unified management of contracts held by a company, from registration through expiration dates, renewal decisions, versions, cancellations, terminations, and audit histories.

Contracts cannot be adequately managed by simply storing files. With auto-renewing contracts, once the "cancellation notice deadline" before the end date passes, the contract cannot be stopped. As the number of contracts increases, expiration dates become scattered, making it difficult to track decisions about whether to renew, revise conditions, or cancel, as well as the history of condition changes.
For this reason, rather than creating a contract storage repository, we built a system that handles the entire contract lifecycle—progressing from "confirmation → decision → approval → new contract terms" triggered by deadlines.
The target users are departments, legal teams, and accounting teams at companies managing multiple contracts, as well as organizations that need to manage renewal and cancellation deadlines.
The features are divided into four categories: contract management, deadlines and notifications, renewals and changes, and controls.

The dashboard is at the center. It calculates important deadlines from contract end dates and cancellation notice periods, displays the number of contracts in each category—renewal deadline approaching, renewal this month, auto-renewal, cancellation notice deadline approaching, and overdue—and shows the contracts requiring immediate attention in order of nearest deadline. Notification timing is set by default at 90 days before, 60 days before, 30 days before, and overdue, with administrators able to adjust the three-stage intervals.
First, you register the contract name, counterparty, type, period, whether it auto-renews, cancellation notice period, and other details. As the deadline approaches, it appears on the dashboard and renewal management screens, where the person in charge confirms the content and records "renew," "cancel," or "negotiate conditions." After approval, the updated terms are added as a new version.

Even when contract terms are updated, past content is not overwritten. It remains as history—Version 1, Version 2, and so on—and key items like contract amount and end date can be compared side-by-side before and after changes. Cancelled contracts are not deleted either; they remain along with cancellation records and audit logs.

The currently available demo is a Demo Mode that can be tried without registration. All companies, contracts, and people are fictional demo data, with the reference date fixed at August 20, 2026. Operation data is saved only within that browser and can be reset to the initial state from the screen. Role switching is for screen verification purposes and is not actual login authentication.
Development proceeds using AI-driven development with an AI coding agent. The tech stack includes Next.js 16.3 (App Router, static export), React 19.2, TypeScript 5.9, and Tailwind CSS 4.3, with Lucide React for icons, Sonner for notifications, Vitest and Testing Library for testing, and deployment on Vercel.
Contract deadlines are critical—errors have real consequences. For this reason, deadline calculations, state transitions, and permission checks are written separately from the UI and verified through testing. Permissions are not only hidden from the UI but also verified on the backend side, preventing operations that bypass the interface. We also established rules: past versions are not modified, completed contracts are not deleted, and important operations are recorded in audit logs.
To prevent the AI agent from implementing outdated patterns, we placed a rule in the repository's AGENTS.md file stating "read the included Next.js documentation before implementation," and configured CLAUDE.md to read the same file, ensuring both Codex and Claude Code work by the same standards. For final verification, ESLint, type checking, testing, and production builds are all confirmed with a single command (npm run verify). As of August 20, 2026, 24 tests and production builds pass. Portfolio documentation was also compiled into instructions for Codex, specifying that features, URLs, numbers, and images should not be added by inference.
We also welcome inquiries about creating similar business applications.
See our portfolio here: https://kj-web-app-portfolio.web.app/
Tsukuttaで公開しているアプリを、1本ずつ紹介していきます。3本目は、会社が持っている契約を登録から期限、更新判断、Version、解約、終了、監査履歴まで一元管理するWeb業務システム「契約管理システム」です。

契約書は、ファイルを保存しておくだけでは管理しきれません。自動更新の契約は、終了日より前の「解約通知期限」を過ぎると止められなくなります。契約が増えるほど期限はばらばらになり、更新するのか、条件を見直すのか、解約するのかの判断や、条件を変えた履歴も追いにくくなります。
そこで、契約書の保管庫ではなく、期限をきっかけに「確認 → 判断 → 承認 → 新しい契約内容」へ進める、契約のライフサイクル全体を扱うシステムとして作りました。
想定しているのは、複数の契約を抱える会社の担当部署や法務・経理、契約の更新や解約の期限を管理する必要がある組織です。
機能は、契約管理、期限・通知、更新・変更、統制の4つに分かれています。

中心になるのはダッシュボードです。契約の終了日と解約通知日数から重要な期限を計算し、更新期限接近・今月更新・自動更新・解約通知期限接近・期限超過の件数と、今対応すべき契約を期限の近い順に表示します。通知のタイミングは初期設定で90日前・60日前・30日前・期限超過で、管理者が3段階の日数を変更できます。
まず契約名、契約先、種別、期間、自動更新の有無、解約通知日数などを登録します。期限が近づくとダッシュボードと更新管理の画面に表示され、担当者が内容を確認して「更新する」「解約する」「条件交渉」を記録します。承認を経て、変更後の条件は新しいVersionとして追加されます。

契約内容を更新しても、過去の内容は上書きしません。Version 1、Version 2のように履歴として残り、契約金額や終了日などの主な項目を変更前・変更後で並べて比較できます。解約した契約も削除せず、解約の記録や監査ログと一緒に残ります。

公開中のデモは、登録なしで試せるDemo Modeです。会社・契約・人物はすべて架空のデモデータで、基準日を2026年8月20日に固定しています。操作内容はそのブラウザの中だけに保存され、画面から初期状態に戻せます。Roleの切り替えは画面確認用で、実際のログイン認証ではありません。
開発は、AIコーディングエージェントを使うAI駆動開発で進めています。技術スタックは Next.js 16.3(App Router、静的書き出し)、React 19.2、TypeScript 5.9、Tailwind CSS 4.3 で、アイコンに Lucide React、通知表示に Sonner、テストに Vitest と Testing Library を使い、Vercel で公開しています。
契約の期限は、間違えると実害が出る部分です。そのため、期限の計算や状態の移り変わり、権限のチェックは画面とは分けて書き、テストで確かめています。権限は画面のボタンを隠すだけでなく、内部の処理側でも確認し、画面を迂回した操作も受け付けないようにしました。過去のVersionは書き換えない、終了した契約は消さない、重要な操作は監査ログへ追記する、というルールも決めています。
AIエージェントに古い書き方で実装させないよう、リポジトリの AGENTS.md に「実装の前に同梱のNext.jsのドキュメントを読む」というルールを置き、CLAUDE.md からも同じファイルを読み込むようにして、Codex と Claude Code が同じルールで作業できるようにしました。仕上げでは、ESLint・型チェック・テスト・本番ビルドを1つのコマンド(npm run verify)でまとめて確認しています。2026年8月20日の記録では、24件のテストと本番ビルドが通っています。ポートフォリオに載せる作業もCodex向けの指示書にまとめ、推測で機能やURL、件数、画像を追加しないよう指定しました。
同じような業務アプリの制作もご相談ください。
制作実績はこちら:https://kj-web-app-portfolio.web.app/