Skip to main content

Documentation Index

Fetch the complete documentation index at: https://grantmaster.dev/llms.txt

Use this file to discover all available pages before exploring further.

The “First PR” Guide

Welcome to the team! This guide will walk you through your first contribution to GrantMaster. We will add a simple feature: Displaying a “Last Synced” timestamp on the Grant Details page.

🛠 Prerequisites

  1. Complete the Environment Setup.
  2. Ensure you have a local instance of the Firestore Emulator running.
  3. Have the Architecture Overview open for reference.

🚶 Step-by-Step Workflow

1. Create a Branch

git checkout -b feat/grant-sync-timestamp

2. Update the Data Model

Find src/shared/types/grant.ts and add the new field to the Grant interface:
export interface Grant {
  // ... existing fields
  lastSyncedAt: Date | null;
}

3. Update the Service (Backend)

Open src/features/intelligence/services/GrantService.ts. Navigate to the updateGrant method and ensure it can handle the new field.

4. Update the UI (Frontend)

Open src/features/intelligence/components/GrantDetailView.tsx.
  • Locate the header section.
  • Add a small text element to display the timestamp.
  • Use our FormattedDate utility component to ensure consistency.
<div className="text-gray-400 text-xs">
  Last updated: <FormattedDate date={grant.lastSyncedAt} />
</div>

5. Add a Test

Create or update src/features/intelligence/components/__tests__/GrantDetailView.test.tsx.
  • Verify that the timestamp renders correctly when provided.
  • Verify it shows “Never” or is hidden when null.

6. Lint and Type-Check

npm run lint
npm run type-check

7. Guardrails to Remember

Before opening the PR, do a quick pass on the architecture checks that most often surprise first-time contributors:
  • If you changed any src/features/*/public.ts exports, make sure PUBLIC_API_VERSION is correct and document breaking changes in ../../engineering/api-reference/changelog-public-api.md.
  • If you changed TypeScript baseline files, your PR needs explicit acknowledgement: add the typescript-baseline-approved label or include [typescript-baseline-approved] in the PR body.
  • If you changed agent tools or extension handlers that write through services, pass context.agentContext so audit logs still point to the original human actor.
For the short contributor checklist, see ../../../CONTRIBUTING.md. For the full policy set, see ../../engineering/architecture/architecture-consistency-guardrails.md.

8. Submit your PR

  1. Push your branch to GitHub.
  2. Open a PR with the template describing what you changed.
  3. Tag a senior engineer for review.

🎯 What to look for during review

  • Did you follow the naming conventions in the Style Guide?
  • Is the design responsive?
  • Does the new field handle “Empty States” gracefully?
Congratulations on your first contribution!