Skip to content

devarismeroxa/govopps-dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GovOpps Dashboard

A modern React-based dashboard for browsing, filtering, and managing government opportunity data from the GovOpps API. Features AI-powered scoring, advanced filtering, and application tracking.

πŸš€ Features

  • Real-time Data: Fetches opportunities from the GovOpps backend API
  • AI-Powered Insights: View AI scoring and detailed analysis for each opportunity
  • Advanced Filtering: Filter by score, agency, keywords, and application status
  • Smart Search: Search across titles and descriptions
  • Application Tracking: Mark opportunities as applied and track your progress
  • Detailed View: Modal with complete opportunity details, contacts, and AI analysis
  • Responsive Design: Modern, mobile-friendly interface with dark theme
  • Pagination: Efficient handling of large datasets
  • Live Updates: Real-time refresh functionality

πŸ“‹ Prerequisites

  • Node.js (v16 or higher)
  • GovOpps Backend API running on localhost:9000 (see govopps)
  • Modern web browser

πŸ› οΈ Installation

1. Clone and Install

git clone <your-repo-url>
cd govopps-dash
npm install

2. Start Development Server

npm run dev

The dashboard will be available at http://localhost:3001

3. Build for Production

npm run build
npm run preview

πŸ”§ Configuration

Backend API Connection

The dashboard connects to your GovOpps backend API via a proxy configuration in vite.config.js:

server: {
  port: 3001,
  proxy: {
    '/api': {
      target: 'http://localhost:9000',
      changeOrigin: true,
      rewrite: (path) => path.replace(/^/api/, '')
    }
  }
}

Make sure your GovOpps backend is running on port 9000 before starting the dashboard.

🎯 Usage

Dashboard Overview

The dashboard provides several key sections:

  1. Header: Shows total opportunities, filtered count, and applied count
  2. Filters Bar: Advanced filtering and search options
  3. Opportunity Cards: Paginated list of opportunities with key information
  4. Detail Modal: Complete opportunity information and AI analysis

Filtering Options

  • Search: Search opportunity titles and descriptions
  • Minimum Score: Filter by AI score (0-10 scale)
  • Agency: Filter by government agency
  • Sort Options: Sort by score, due date, or posted date
  • Show Applied: Toggle visibility of applied opportunities

Opportunity Cards

Each card shows:

  • Title and AI Score (color-coded: green 8+, yellow 6-7, red <6)
  • Agency and Description
  • Posted Date and Due Date (with countdown)
  • Contract Value (when available)
  • Application Status (Applied/Not Applied)
  • Quick Actions: Mark as applied, view details

Detailed View

Click any opportunity to see:

  • Complete Description and AI Analysis
  • Key Technologies and Differentiators
  • Agency Details and Points of Contact
  • NAICS Codes and Solicitation Numbers
  • Direct Links to SAM.gov
  • Application Management

🎨 UI Features

Color-Coded Scoring

  • 🟒 Green (8.0+): Excellent match, high priority
  • 🟑 Yellow (6.0-7.9): Good match, worth considering
  • πŸ”΄ Red (<6.0): Lower relevance

Due Date Indicators

  • πŸ”΄ Red: Expired opportunities
  • 🟠 Orange: Due within 7 days
  • 🟑 Yellow: Due within 14 days
  • 🟒 Green: More than 14 days remaining

Application Tracking

  • Local Storage: Your application status is saved locally
  • Visual Indicators: Applied opportunities are clearly marked
  • Filter Toggle: Hide/show applied opportunities
  • Statistics: Track total applications in header

πŸ“± Responsive Design

The dashboard is fully responsive and works on:

  • Desktop: Full feature experience
  • Tablet: Optimized layout with touch interactions
  • Mobile: Compact view with essential functionality

πŸ”Œ API Integration

Endpoints Used

The dashboard connects to these GovOpps API endpoints:

// Fetch opportunities with pagination
GET /api/opportunities?minScore=0&limit=100&offset=0

// Response format
{
  "count": 25,
  "total": 150,
  "opportunities": [
    {
      "id": 1,
      "source": "SAM",
      "title": "Data Pipeline Implementation",
      "aiScore": 8.5,
      "aiSummary": "High relevance for data streaming...",
      "fullAnalysis": { ... },
      "agency": "Department of Commerce",
      "dueDate": "2024-01-15T00:00:00.000Z",
      "amount": 500000,
      "url": "https://sam.gov/...",
      "rawData": { ... }
    }
  ]
}

Error Handling

  • Connection Errors: Shows user-friendly error messages
  • Loading States: Spinner animations during data fetching
  • Retry Logic: Refresh button to reload data
  • Graceful Degradation: Handles missing data fields

πŸ› οΈ Development

Available Scripts

# Start development server
npm run dev

# Build for production
npm run build

# Preview production build
npm run preview

# Lint code
npm run lint

Technology Stack

  • React 19: Modern React with hooks
  • Vite: Fast development and build tool
  • Tailwind CSS 4: Utility-first CSS framework
  • Lucide React: Beautiful SVG icons
  • Axios: HTTP client for API calls
  • date-fns: Date manipulation and formatting

File Structure

src/
β”œβ”€β”€ main.jsx          # React app entry point
β”œβ”€β”€ App.jsx           # Main dashboard component
β”œβ”€β”€ App.css           # Custom styles
β”œβ”€β”€ index.css         # Global styles and Tailwind
└── assets/           # Static assets

Key Components

App.jsx contains:

  • State management for opportunities and filters
  • API integration and data fetching
  • Filtering and sorting logic
  • Pagination implementation
  • Modal management
  • Local storage for application tracking

πŸ› Troubleshooting

Common Issues

Dashboard won't load data:

# Check if backend API is running
curl http://localhost:9000/health

# Check browser console for errors
# Verify proxy configuration in vite.config.js

Styling issues:

# Rebuild Tailwind CSS
npm run dev

# Clear browser cache
# Check for console CSS errors

Build errors:

# Clear node modules and reinstall
rm -rf node_modules package-lock.json
npm install

# Check for TypeScript errors
npm run lint

Performance Tips

  • Pagination: Dashboard fetches data in chunks for better performance
  • Local Storage: Application status is cached locally
  • Lazy Loading: Only fetches additional data when needed
  • Debounced Search: Search input is optimized for performance

πŸš€ Deployment

Development

npm run dev

Runs on http://localhost:3001

Production Build

npm run build

Creates optimized build in dist/ folder

Deployment Options

Static Hosting (Netlify, Vercel, GitHub Pages):

npm run build
# Deploy dist/ folder

Docker:

FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
EXPOSE 3001
CMD ["npm", "run", "preview"]

Nginx (serve static files):

server {
    listen 80;
    root /path/to/govopps-dash/dist;
    index index.html;
    
    # API proxy to backend
    location /api/ {
        proxy_pass http://localhost:9000/;
    }
    
    # Frontend routes
    location / {
        try_files $uri $uri/ /index.html;
    }
}

πŸ” Security Considerations

  • No API Keys: All authentication handled by backend
  • CORS: Configured for local development
  • XSS Protection: React's built-in XSS protection
  • Local Storage: Only stores non-sensitive UI state

πŸ“Š Browser Support

  • Chrome: 88+
  • Firefox: 85+
  • Safari: 14+
  • Edge: 88+

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/new-feature
  3. Make changes and test thoroughly
  4. Commit changes: git commit -m "Add new feature"
  5. Push to branch: git push origin feature/new-feature
  6. Submit a pull request

πŸ“ License

ISC License

πŸ†˜ Support

Getting Help

  1. Check Backend: Ensure GovOpps API is running and accessible
  2. Browser Console: Check for JavaScript errors
  3. Network Tab: Verify API calls are working
  4. Documentation: Review this README and inline comments

Common Workflows

Setting up for first time:

  1. Start GovOpps backend API on port 9000
  2. Install dashboard dependencies: npm install
  3. Start development server: npm run dev
  4. Open http://localhost:3001

Daily usage:

  1. Start backend API (if not running)
  2. Start dashboard: npm run dev
  3. Use filters to find relevant opportunities
  4. Click opportunities for detailed analysis
  5. Mark interesting opportunities as "Applied"

Troubleshooting data issues:

  1. Click "Refresh" button in header
  2. Check backend API logs
  3. Verify database has opportunities data
  4. Check browser network tab for API errors

About

Dashboard to visualize the gov opportunities related to Meroxa

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published