This is a modern React application built with TanStack Router, TanStack Query, and Tailwind CSS v4. It connects to your existing Lambda functions to provide a beautiful donation matching platform.
- Modern, responsive design with Tailwind CSS v4
- Type-safe routing with TanStack Router
- Efficient data fetching with TanStack Query
- Beautiful UI components with consistent design system
- Integration with your existing Lambda APIs
IMPORTANT: The app is now configured with your Lambda URL as a fallback, but you can still override it with a .env file:
VITE_API_BASE_URL=https://72m57zkngqsdsomp6ameqd2c6u0wqflv.lambda-url.us-east-2.on.awsCurrent Configuration:
- Default Lambda URL:
https://72m57zkngqsdsomp6ameqd2c6u0wqflv.lambda-url.us-east-2.on.aws - The app will use this URL if no environment variable is set
- You can override it by creating a
.envfile withVITE_API_BASE_URL
The environment variable is properly typed in src/vite-env.d.ts and accessed via import.meta.env.VITE_API_BASE_URL in the code.
The app expects the following Lambda function endpoints:
GET /item-types- Returns list of item typesGET /charity-types- Returns list of charity typesGET /organizations- Returns list of organizationsGET /org-items- Returns charity-to-item mappings
npm run devThe app will be available at http://localhost:5173
The app is already configured to work with your Lambda functions:
- GetItemTypes - Fetches available item types for donation
- GetCharityTypes - Fetches charity categories
- GetOrgs - Fetches all approved charities
- GetOrgItems - Fetches which items each charity accepts
src/
├── api/
│ └── charityApi.ts # API integration functions
├── components/
│ └── ui/ # Reusable UI components
├── routes/
│ ├── index.tsx # Landing page
│ ├── donate.tsx # Donation form
│ ├── donate/
│ │ └── results.tsx # Results page
│ └── charity/
│ └── $charityId.tsx # Charity details
├── types/
│ └── api.ts # TypeScript types
└── utils/
└── cn.ts # Utility functions
The app uses a custom color palette defined in src/index.css. You can modify the @theme section to change colors.
All UI components are in src/components/ui/ and use Tailwind Variants for consistent styling.
Modify src/api/charityApi.ts to adjust how data is fetched and transformed.
- Build the app:
npm run build - Deploy the
distfolder to your hosting service - Update the
VITE_API_BASE_URLenvironment variable with your production API Gateway URL
- Deploy your Lambda functions to AWS
- Set up API Gateway with CORS enabled
- Update the environment variables with your actual API URLs
- Test the full donation flow
- Add any additional features or customizations needed