Skip to content

feat: grant expiration management (#155), organization profiles (#156) - #174

Open
ZacLou wants to merge 5 commits into
Core-Foundry:mainfrom
ZacLou:feat/expiration-org-profiles
Open

feat: grant expiration management (#155), organization profiles (#156)#174
ZacLou wants to merge 5 commits into
Core-Foundry:mainfrom
ZacLou:feat/expiration-org-profiles

Conversation

@ZacLou

@ZacLou ZacLou commented Aug 28, 2026

Copy link
Copy Markdown

Summary

This PR implements two GrantFox Third Campaign issues:

Issue #155: Create a Grant Expiration Management System

  • Created expiration-management.ts with auto-expiration detection
  • isExpired() checks deadline + grace period (1 hour)
  • isApproachingDeadline() identifies tasks within 24h of deadline
  • checkExpirations() batch check returns expired + upcoming
  • filterOutExpired(), getActiveTasks(), getExpiredTasks() for listings
  • getExpirationStatus() determines correct terminal status
  • Skips terminal statuses (completed/cancelled) from expiration

Issue #156: Add Organization Profiles for Grant Providers

  • Created organization-profile.ts with full CRUD
  • createOrganization() with duplicate name checking (case-insensitive)
  • getOrganization(), getOrganizationByName() lookups
  • listOrganizations(), listOrganizationsByAdmin() views
  • updateOrganization() (admin-only with auth check)
  • verifyOrganization() (platform-level verification)
  • incrementGrantCount() / decrementGrantCount() for linking
  • findAndLinkGrant() find org by name and auto-increment count

API Routes

  • GET/POST /api/organizations - list, create (with optional admin filter)

Tests

  • 8 tests for expiration management
  • 10 tests for organization profiles

Closes #155
Closes #156

鲁班七号 added 5 commits August 29, 2026 00:58
Core-Foundry#157), moderation queue (Core-Foundry#159)

- Core-Foundry#154: Levenshtein-based title similarity + org/description overlap detection
  Flags potential duplicates for admin review without blocking creation
- Core-Foundry#157: Structured eligibility fields (location, applicant type, project stage,
  team size, custom requirements) with validation and display formatting
- Core-Foundry#159: Admin moderation queue with enqueue/list/approve/reject/dismiss
  Auto-enqueues new tasks and duplicate flags for review
- Integrated into createTask: duplicate detection + auto-moderation on creation
- Added API routes: GET /api/moderation, GET/POST /api/moderation/:itemId
- 30+ unit tests covering all three features
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Organization Profiles for Grant Providers Create a Grant Expiration Management System

1 participant