Imported from warusakudeveroper/toporogy_manager (
AGENTS.md). Install upstream withnpx skills add warusakudeveroper/toporogy_manager. Copyright stays with the author.
Repository Guidelines
Project Structure & Module Organization
frontend/holds the Vite/React app; place feature components infrontend/src/components/, hooks infrontend/src/hooks/, pages infrontend/src/pages/, state stores infrontend/src/stores/, and shared types infrontend/src/types/.- Static assets ship from
frontend/public/; bundle-only assets belong infrontend/src/assets/. - Firebase Cloud Functions live in
functions/src/with helpers beside their handlers and shared contracts underfunctions/src/types/. - Documentation and discovery notes stay in
doc/andobsidian/; avoid committing personal scratch files elsewhere.
Build, Test, and Development Commands
npm install— run separately infrontend/andfunctions/after cloning.npm run dev(frontend) — starts Vite onhttp://localhost:5173with hot reload.npm run build(frontend) — runs the TypeScript project build then produces a production bundle.npm run lint(frontend) — executes ESLint over.ts/.tsxfiles; fix warnings before committing.npm run serve(functions) — builds TypeScript and launches the Firebase emulator suite.npm run deploy(functions) — deploys cloud functions; confirmfirebase use <alias>first.- Node.js 20.x 以上を nvm (
nvm use 20.19.5など) で利用可能。ビルドや Firebase CLI 実行時は 20 以上を使用すること。
Coding Style & Naming Conventions
- Use TypeScript with functional React components and 2-space indentation.
- Name components
PascalCase.tsx, hooksuseThing.ts, Zustand storesthingStore.ts, and utility modulescamelCase.ts. - Favor Tailwind utility classes; centralize any custom tokens in
frontend/src/styles/. - Run
npm run lintand address formatting or type issues before opening a PR.
Testing Guidelines
- No automated suite yet; document manual checks in every PR.
- For new UI behavior, add focused Vitest/React Testing Library specs in
frontend/src/__tests__/and run them withnpm testonce the harness lands. - Validate backend changes with the Firebase emulator via
npm run serve; do not commit generated emulator data.
Commit & Pull Request Guidelines
- Follow Conventional Commits (e.g.,
feat: add member list filter,fix: handle empty firestore snapshot). - PRs must describe intent, list verification steps, link relevant issues, and include UI screenshots or short captures when altering UX.
- Note breaking changes clearly and request reviews from domain owners after tests and linters pass.
Security & Configuration Tips
- Frontend Firebase credentials load from Vite env variables (
VITE_FIREBASE_*) kept in.env.local. - Use
firebase loginplusfirebase use <alias>to target the correct project. - Firebase サービスアカウント鍵は
/Users/hideaikurata/Library/CloudStorage/Dropbox/Mac (3)/Documents/toporogy_manager/.firebase/lacistopologymanager-firebase-adminsdk-fbsvc-5ce1d5fcb2.jsonに保存されている。 - Never hardcode secrets; prefer Firebase config or supported secret managers.
追加オペレーション指針
- すべての回答は日本語で行うこと。
- 内部思考は英語で行い、アウトプットは常に日本語で提供すること。
- Firebase CLI や Firebase SDK、GitHub CLI を操作する権限を持つ前提で対応すること。
- 外部ネットワーク接続が必要な場合はユーザーに許可を求めて実行すること。
- 修正や実装を行った場合は Firebase にデプロイし、GitHub へ push まで完了させること。
MCP Tools
- chrome-devtools:
/opt/homebrew/bin/node /opt/homebrew/bin/chrome-devtools-mcpで稼働。利用可能ツールは click, close_page, drag, emulate_cpu, emulate_network, evaluate_script, fill, fill_form, get_network_request, handle_dialog, hover, list_console_messages, list_network_requests, list_pages, navigate_page, navigate_page_history, new_page, performance_analyze_insight, performance_start_trace, performance_stop_trace, resize_page, select_page, take_screenshot, take_snapshot, upload_file, wait_for。 - firebase:
/opt/homebrew/opt/node@20/bin/node /Users/hideaikurata/.npm-global/bin/firebase experimental:mcpで稼働。利用可能ツールは auth_disable_user, auth_get_user, auth_list_users, auth_set_claim, auth_set_sms_region_policy, crashlytics_create_note, crashlytics_delete_note, crashlytics_get_issue, crashlytics_get_top_android_devices, crashlytics_get_top_apple_devices, crashlytics_get_top_issues, crashlytics_get_top_operating_systems, crashlytics_get_top_variants, crashlytics_get_top_versions, crashlytics_list_events, crashlytics_list_notes, crashlytics_update_issue, database_get_data, database_get_rules, database_set_data, database_validate_rules, dataconnect_build, dataconnect_execute, dataconnect_generate_operation, dataconnect_generate_schema, dataconnect_list_services, firebase_consult_assistant, firebase_create_android_sha, firebase_create_app, firebase_create_project, firebase_get_admin_sdk_config, firebase_get_environment, firebase_get_project, firebase_get_sdk_config, firebase_init, firebase_list_apps, firebase_list_projects, firebase_login, firebase_logout, firebase_update_environment, firestore_delete_document, firestore_get_documents, firestore_get_rules, firestore_list_collections, firestore_query_collection, firestore_validate_rules, messaging_send_message, remoteconfig_get_template, remoteconfig_publish_template, remoteconfig_rollback_template, storage_get_object_download_url, storage_get_rules, storage_validate_rules。 - github:
/Users/hideaikurata/.npm-global/lib/node_modules/github-mcp-server/dist/index.jsで稼働。利用可能ツールは git-add, git-add-all, git-bisect, git-blame, git-branch, git-checkout, git-cherry-pick, git-clone, git-commit, git-diff, git-flow, git-init, git-log, git-merge, git-pull, git-push, git-quick-commit, git-rebase, git-remote-add, git-remote-list, git-remote-remove, git-remote-set-url, git-remove, git-remove-all, git-reset, git-stash, git-stash-pop, git-status, git-sync, git-tag。 - supabase:
/Users/hideaikurata/.npm-global/bin/mcp-server-postgrest --apiUrl https://bmwyvplhazmptevndqkl.supabase.co --apiKey [REDACTED jwt] --schema publicで稼働。利用可能ツールは postgrestRequest, sqlToRest。
アクセス確認手順
- ローカル環境から外部ネットワークへ直接アクセスできない場合でも、
chrome-devtoolsMCP を用いてlist_pages→navigate_page→take_snapshotの順でデプロイ先を開くことで、Web アプリの表示可否を確認できる。必要に応じてtake_screenshotで画面キャプチャを取得する。