Skip to content

devonjhills/government-grant-directory

Repository files navigation

πŸ›οΈ Professional Government Funding Intelligence Platform

A comprehensive intelligence platform that transforms raw government funding data into actionable insights. Built with Next.js 14, TypeScript, and professional design principles, this platform provides real success probability analysis, competition intelligence, and opportunity-specific guidance based on actual federal agency statistics.

Next.js TypeScript Tailwind CSS React

Screenshot 2025-08-07 at 2 11 07β€―PM

✨ Features

🧠 Intelligence Analysis

  • Real Success Probabilities based on published federal agency statistics (NSF: 11%, NIH: 14%, VA: 18%, SBA: 22%)
  • Competition Intelligence with realistic applicant pool analysis and expected application estimates
  • Opportunity-Specific Insights with detailed calculation breakdowns and methodology explanations
  • Educational Transparency - all estimates clearly sourced and explained

🎯 Opportunity Type Differentiation

  • Visual Distinction - Grants (green), Contracts (purple), Cooperative Agreements (orange), Other (teal)
  • Type-Specific Terminology - "Apply for" vs "Bid on" vs "Partner with" based on opportunity type
  • Relevant Metrics - Different data points displayed based on whether it's a grant, contract, or other opportunity
  • Professional Styling - Consistent design system with type-aware color schemes

🎨 Professional Design System

  • 8px Grid System for consistent spacing throughout the application
  • Professional Typography hierarchy with improved readability
  • Accessible Design with proper focus states and contrast ratios
  • Type-Aware UI that adapts styling and terminology based on opportunity type

⚑ Technical Excellence

  • Next.js 14 App Router with Server Components and TypeScript
  • Advanced Caching with stale-while-revalidate patterns
  • Error Handling - Robust API error handling and graceful fallbacks
  • Performance Optimization with Core Web Vitals focus

πŸ“Š Data Integration

  • Multi-Source APIs - Grants.gov, USAspending.gov with unified data layer
  • Real-time data from official government sources with comprehensive error handling
  • Data Standardization - Consistent format across different government APIs
  • Intelligence Enrichment - Raw data enhanced with calculated success metrics
  • Robust error handling with user-friendly messages
  • Data sanitization for security

πŸ› οΈ Tech Stack

Frontend

Development & Build

API Integration

  • Grants.gov API - Official U.S. government grant data
  • sanitize-html - HTML content sanitization

πŸ—οΈ Architecture

Server-Side First Approach

  • Server Components for initial data fetching
  • Client Components only where interactivity is needed
  • API Proxy Pattern for secure external API integration

Component Structure

app/
β”œβ”€β”€ components/           # Reusable UI components
β”‚   β”œβ”€β”€ Header.tsx       # Navigation header
β”‚   β”œβ”€β”€ Footer.tsx       # Site footer
β”‚   β”œβ”€β”€ SearchBar.tsx    # Enhanced search interface
β”‚   β”œβ”€β”€ GrantCard.tsx    # Grant display card
β”‚   β”œβ”€β”€ GrantList.tsx    # Grant grid layout
β”‚   β”œβ”€β”€ FilterControls.tsx # Advanced filtering
β”‚   └── Pagination.tsx   # Results pagination
β”œβ”€β”€ api/grants/          # Internal API routes
β”‚   β”œβ”€β”€ search/          # Grant search endpoint
β”‚   └── details/         # Grant details endpoint
└── services/            # External API integration
    └── grantsGovService.ts

πŸš€ Getting Started

Prerequisites

  • Node.js 18.0 or higher
  • npm or yarn package manager

Installation & Setup

  1. Clone the repository

    git clone https://github.com/your-username/government-grant-finder.git
    cd government-grant-finder
  2. Install dependencies

    npm install
    # or
    yarn install
  3. Start development server

    npm run dev
    # or
    yarn dev

Building for Production

npm run build
npm run start

πŸ“‘ API Integration

Grants.gov API

  • Base URL: https://api.grants.gov/v1/api
  • Endpoints Used:
    • search2 - Grant search with filters
    • fetchOpportunity - Detailed grant information
  • No API Key Required for basic access
  • Rate Limiting: Respectful usage patterns implemented

Data Flow

  1. User Search β†’ Internal API route (/api/grants/search)
  2. API Route β†’ Grants.gov API with parameters
  3. Data Transformation β†’ Mapped to internal Grant interface
  4. Client Rendering β†’ Display in modern UI components

🎨 Design System

Color Palette

  • Primary: Government blue theme
  • Secondary: Complementary grays
  • Accent: Interactive elements
  • Semantic: Success, warning, error states

Typography

  • Headings: Bold, clear hierarchy
  • Body: Readable, accessible font sizes
  • Code: Monospace for technical content

Responsive Breakpoints

  • Mobile: 0-768px
  • Tablet: 768-1024px
  • Desktop: 1024px+

πŸš€ Deployment

Vercel (Recommended)

npm install -g vercel
vercel

Docker

FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]

πŸ§ͺ Testing

Currently, this project does not include a testing framework. Future enhancements may include:

  • Unit tests with Jest
  • Integration tests with Testing Library
  • E2E tests with Playwright

πŸ“ˆ Performance

Lighthouse Scores

  • Performance: 95+
  • Accessibility: 95+
  • Best Practices: 95+
  • SEO: 95+

Optimizations

  • Static generation for improved loading
  • Image optimization with Next.js
  • Tree shaking for smaller bundles
  • Code splitting for efficient loading

πŸ”’ Security

  • HTML sanitization of external content
  • TypeScript for type safety
  • Environment variables for sensitive configuration
  • HTTPS enforcement in production

🀝 Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open Pull Request

πŸ™ Acknowledgments

  • Grants.gov for providing the official API
  • shadcn for the excellent UI component library
  • Vercel for Next.js and deployment platform
  • Tailwind Labs for the CSS framework

πŸ“§ Contact

LinkedIn: Your LinkedIn
Portfolio: Portfolio


Built with ❀️ for grant seekers everywhere

About

A modern, performant web application for discovering federal funding opportunities. Built with Next.js 14, TypeScript, and Tailwind CSS, this application provides a clean interface for searching and exploring government grants through the Grants.gov API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors