一覧に戻る

ブログ

チュートリアル:Tactic Remoteでフルスタックアプリをリモート構築する

iPhoneからClaude Codeを指示して完全なタスク管理アプリを構築する過程を追体験しましょう — モバイルから本格的な開発作業が可能であることを証明します。

公開日 タグ: 使い始める / fullstack / workflow / hands-on
ブログ

このカテゴリのプロダクト/開発アップデートを確認できます。

カテゴリを見る

このチュートリアルでは、完全なフルスタックアプリケーション — Reactフロントエンドを備えたタスク管理API — をTactic Remoteのみで構築する過程を解説します。iPhoneからClaude Codeを指示し、Macが重い処理を担当します。

最後には、動作するアプリケーションと、Tactic Remoteが実現するリモート開発ワークフローの実践的な経験が得られます。

前提条件

開始前に、以下を確認してください:

  • Tactic Remoteがセットアップされ接続済み(はじめにガイド)
  • MacにNode.js 18以上がインストール済み
  • 作業用プロジェクトディレクトリがある(ここでは~/projects/taskflowを使用)

パート1:プロジェクトセットアップ(10分)

iPhoneでTactic Remoteを開き、プロジェクトディレクトリを指す新しいセッションを開始します。

プロンプト1:プロジェクトのスキャフォールド

Claude Codeに以下のプロンプトを送信します:

Create a full-stack task management application called TaskFlow.

Backend:
- Express.js server with TypeScript
- SQLite database with better-sqlite3
- RESTful API: CRUD for tasks and projects
- Input validation with zod

Frontend:
- React 18 with TypeScript
- Vite for bundling
- Tailwind CSS for styling
- React Query for data fetching

Set up the monorepo structure with packages/api and packages/web.
Use a root package.json with workspaces.

Claude Codeはこのタスクに3〜5分作業します。ディレクトリの作成、設定ファイルの書き込み、依存関係のインストールが行われるのが見えます。これはスマートフォンを置くのに良いタイミングです — Tactic Remoteがタスク完了時または承認が必要な場合に通知します。

注意点: Claude Codeはnpm installの実行の承認を求める可能性があります。通知からこれを承認してください — プロジェクトの依存関係をインストールしています。

プロンプト2:セットアップの確認

スキャフォールディングが完了したら、すべてが動作することを確認します:

Start both the API server and the frontend dev server.
Run any initial tests. Report the URLs where each is accessible.

Claude Codeがサーバーを起動し、APIはhttp://localhost:3001、フロントエンドはhttp://localhost:5173のようなURLを報告するはずです。

パート2:APIの構築(20分)

次に、実質的なビジネスロジックを持つバックエンドAPIを構築します。

プロンプト3:データベーススキーマとモデル

Create the database schema and models:

Tables:
- projects: id, name, description, color (hex), created_at, updated_at
- tasks: id, project_id (FK), title, description, status (todo/in_progress/done),
  priority (low/medium/high/urgent), due_date, created_at, updated_at

Include:
- Migration system that runs on server start
- Type-safe model layer with full TypeScript types
- Seed data: 2 sample projects with 5 tasks each

このプロンプトはAIアシスト開発の主要な利点を示しています:何をするかを記述し、Claudeがどのようにするかを処理します。結果には適切に型付けされたモデル、SQLマイグレーション、シードデータが含まれます — 人間の開発者なら30〜60分かかる作業です。

プロンプト4:バリデーション付きAPIルート

Implement the full REST API:

Projects:
- GET /api/projects (list all, with task counts)
- POST /api/projects (create, validate with zod)
- PUT /api/projects/:id (update)
- DELETE /api/projects/:id (cascade delete tasks)

Tasks:
- GET /api/projects/:id/tasks (list by project, support ?status= filter)
- POST /api/projects/:id/tasks (create with validation)
- PUT /api/tasks/:id (update, including status transitions)
- DELETE /api/tasks/:id

Include proper error handling with consistent error response format.
Add request logging middleware.

承認に関する注意: Claude Codeは複数ファイルの変更の承認を求める場合があります。承認カードのファイルリストを確認してください — プロジェクトのpackages/api/ディレクトリ内のファイルに限定されているはずです。このスコープ外のファイルが含まれている場合は却下してプロンプトを明確にしてください。

プロンプト5:APIのテスト

Write integration tests for all API endpoints using vitest and supertest.
Test both success cases and error cases (invalid input, not found, etc.).
Run the tests and report results.

ターミナルビューでテスト結果がストリーミングされるのを見ましょう。グリーンのテスト通過はスマートフォンの画面でも満足感があります。テストが失敗した場合、Claude Codeは通常自動的に問題を診断して修正します。

パート3:フロントエンドの構築(25分)

プロンプト6:コアUIコンポーネント

Build the frontend UI:

1. Layout with sidebar (project list) and main area (task board)
2. ProjectList component: shows projects with task counts and color indicators
3. TaskBoard component: kanban-style columns for todo/in_progress/done
4. TaskCard component: shows title, priority badge, due date
5. Drag-and-drop between columns to change task status

Use React Query for all data fetching. Show loading skeletons.
Style with Tailwind - clean, modern look with the project color as accent.

これはこれまでで最も大きなプロンプトです。Claude Codeは複数のコンポーネントを生成し、ルーティングを設定し、React Queryを設定し、ドラッグ&ドロップを実装します。5〜8分の作業を見込んでください。

プロンプト7:フォームとインタラクション

Add interactive features:

1. Create Project modal: name, description, color picker
2. Create Task modal: title, description, priority selector, due date picker
3. Inline task editing: click to edit title, click priority to cycle through levels
4. Delete confirmation dialogs for projects and tasks
5. Toast notifications for successful operations

All forms should validate input and show helpful error messages.

プロンプト8:仕上げとレスポンシブデザイン

Polish the UI:

1. Make everything fully responsive (mobile-friendly at 375px+)
2. Add empty states for projects and tasks (with calls-to-action)
3. Add a search/filter bar: filter tasks by title or status
4. Add keyboard shortcuts: N for new task, / for search
5. Add subtle animations for card transitions and modal open/close

Fix any visual issues you notice.

パート4:統合と最終確認(10分)

プロンプト9:エンドツーエンドの確認

Verify the complete application:

1. Start the API server and frontend
2. Create a new project through the UI
3. Add several tasks with different priorities
4. Move tasks between columns
5. Edit and delete tasks
6. Test responsive layout at mobile sizes
7. Report any issues found and fix them

Provide the final URLs to access the application.

プロンプト10:ドキュメント

Create a README.md in the project root with:

1. Project description and screenshot placeholder
2. Tech stack overview
3. Getting started instructions (install, run, test)
4. API endpoint documentation with example requests/responses
5. Project structure explanation

構築したもの

スマートフォンからClaude Codeを指示して約1時間で、以下を作成しました:

  • SQLite永続化を備えたTypeScript Express API
  • ドラッグ&ドロップカンバンボードを備えたReactフロントエンド
  • バリデーション付きの完全なCRUD操作
  • 統合テスト
  • レスポンシブデザイン
  • プロジェクトドキュメント

これは自明でないアプリケーションです — 数十のファイルにわたる数百行のコードです。そしてデスクに座ることなく構築しました。

リモートフルスタック開発のヒント

作業を明確なフェーズに分割する。 アプリケーション全体を1つのプロンプトで記述しようとしないでください。フェーズごとのプロンプティングは、各プロンプトが前のフェーズで検証された作業の上に構築されるため、より良い結果を生みます。

各フェーズ後に確認する。 各主要な作業の後にClaude Codeにテストの実行やサーバーの起動を依頼しましょう。問題を早期にキャッチすることで、連鎖的な問題を防ぎます。

承認通知を賢く使う。 承認フローは単なるセキュリティ機能ではなく、Claude Codeが何をしているかを確認し、必要に応じて軌道修正できるチェックポイントです。

常に見守らない。 リモート開発のポイントは自由です。プロンプトを開始し、スマートフォンを置き、通知が来たら戻ってきましょう。システムを信頼してください。

次のステップ

Tactic Remote を試す

スマートフォンからコーディングエージェントを操作

Mac、Windows、Linux 上の Claude Code や Codex などに接続。iPhone や iPad で進捗を確認し、次の指示を送れます。