This project provides a web application designed to help constituents easily draft professional letters to their elected officials using the power of AI. By providing basic information about themselves, the representative, and the issue at hand, users can generate well-structured, persuasive letters ready to be sent.
Try the application live:
- AI-Powered Drafting: Leverages the Perplexity AI API to generate formal, researched, and persuasive letter content.
- Simple Interface: User-friendly form to input necessary details (user info, representative info, issue, custom instructions).
- Customizable Output: Option to add custom instructions to guide the AI's tone, style, or specific points to include.
- Multiple Export Options:
- Copy the generated letter text to the clipboard.
- Download the letter as a formatted
.docxfile. - Initiate sending the letter via the default email client, Gmail, or Outlook.
- Theming: Supports both Light and Dark modes, respecting system preferences and allowing manual toggling.
- Responsive Design: Adapts to various screen sizes for accessibility on desktop and mobile devices.
- Built with Modern Tech: Utilizes React, TypeScript, Node.js, Express, and shadcn/ui components.
- Frontend:
- React
- Vite
- TypeScript
- Wouter (Routing)
- TanStack Query (Data Fetching/Caching)
- shadcn/ui (Component Library)
- Tailwind CSS (Styling)
docx(for .docx generation)file-saver(for file downloads)
- Backend:
- Node.js
- Express
- TypeScript
- Perplexity AI API (via Axios)
- Shared:
- TypeScript (for shared types/schemas)
- Zod (Schema validation)
- Development/Build:
tsx(TypeScript execution)esbuild(Bundling for production)
- Deployment:
- Replit (Hosting & Autoscale)
Contributions are welcome! If you'd like to contribute, please send me a message!
This project is licensed under the MIT License. Use it as you wish.
- Replit: For the seamless development and deployment platform.
- Perplexity API: For providing the powerful AI model used for letter generation.
- shadcn/ui: For the excellent collection of reusable UI components.
