A modern, responsive web application for searching and exploring Federal Transit Administration grant awards. Built with vanilla JavaScript and powered by Supabase.
Live Demo: ftagrants.com
- Smart Search - Server-side search across 2,200+ federal transit grants
- Advanced Filtering - Filter by year, program type, and funding amount
- Email Capture - Lead generation with database storage
- CSV Export - Download filtered results with date stamps
- Infinite Scroll - Smooth pagination loading 6 grants at a time
- Dark Mode - Toggle between light and dark themes
- Responsive Design - Works seamlessly on desktop, tablet, and mobile
- Real-time Search - Instant results with optimized database queries
- Frontend: HTML5, CSS3, JavaScript ES6+
- Backend: Supabase (PostgreSQL database, real-time APIs)
- Styling: Modern glassmorphism design with CSS custom properties
- Hosting: Netlify with automatic deployments
- Icons: Lucide React icon library
fta-grants/
├── index.html # Main application HTML
├── styles.css # Glassmorphism styling and responsive design
├── script.js # Application logic and Supabase integration
└── README.md # Project documentation
- Modern web browser with JavaScript enabled
- Internet connection (for CDN resources and database)
-
Clone the repository:
git clone https://github.com/levimccollum/fta-grants.git cd fta-grants -
Open
index.htmlin your browser or serve with a local server:# Using Python python -m http.server 8000 # Using Node.js npx serve . # Using PHP php -S localhost:8000
-
Navigate to
http://localhost:8000
The application uses Supabase with the following main tables:
id(bigint, primary key)fiscal_year(integer) - Grant fiscal yearopportunity_id(text) - Unique FTA opportunity identifiergrant_program(text) - Program type/categoryproject_sponsor(text) - Organization receiving the grantproject_description(text) - Detailed project descriptionfunding(bigint) - Grant amount in dollarscreated_at(timestamp) - Record creation time
id(bigint, primary key)email(text) - Captured email addresscreated_at(timestamp) - Capture timestamp
- Loads only relevant grants based on search queries
- Server-side filtering to work within Supabase free tier limits
- Optimized database functions for filter options
- Modal-based email collection before CSV downloads
- Email validation and database storage
- Privacy-focused with minimal data collection
- Full-text search across multiple grant fields
- Pill-based filtering for years and programs
- Funding range filtering with numeric inputs
- Lazy loading with infinite scroll
- Efficient database queries with proper indexing
- Minimal payload with selective field loading
- Chrome 90+
- Firefox 88+
- Safari 14+
- Edge 90+
- Mobile browsers (iOS Safari, Chrome Mobile)
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Commit your changes:
git commit -am 'Add feature' - Push to the branch:
git push origin feature-name - Submit a pull request
The application connects to Supabase using environment-specific configuration. Row Level Security (RLS) policies ensure data access control:
grantstable: Public read access for search functionalityemailstable: Public insert access for lead capture
Custom PostgreSQL functions for efficient filter loading:
get_distinct_years()- Returns all unique fiscal yearsget_distinct_programs()- Returns all unique grant programs
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
Grant data sourced from the Federal Transit Administration's publicly available grant databases. Data is updated periodically to reflect new grant awards.
Levi McCollum
- Portfolio: levimccollum.com
- GitHub: @levimccollum
- Email: [email protected]
- Federal Transit Administration for public grant data
- Supabase for backend infrastructure
- Lucide for icon library
- Netlify for hosting platform