I built Sift to address a common problem in React/TypeScript AI prototypes: the browser needs a simple summarization experience, but the Groq API key must remain server-side. The project is a small technical showcase of that boundary, with enough product polish to make the architecture easy to exercise and extend.
Architecture
The browser uses a typed tRPC mutation rather than calling Groq directly. The server validates the source text, summary format, tone, and requested model, then sends the request to Groq's OpenAI-compatible chat-completions endpoint using the server-only GROQ_API_KEY. The response is normalized into summary text, model metadata, and usage information for the UI.
The important rule is simple: the client never receives the Groq credential. Local development uses an environment template, while hosted deployments should use the platform's secret manager.
Product surface
Sift includes three summary styles—brief, detailed, and bullet points—and three tone presets—neutral, executive, and friendly. The model selector supports GPT-OSS 20B, GPT-OSS 120B, and Groq Compound Mini. The interface also includes loading and error states, a sample input, character/word counts, copy and print actions, and a responsive layout.
History is deliberately local for this starter kit. Recent summaries are stored in browser storage so the app can demonstrate a useful workflow without introducing a database or user-account dependency. That trade-off keeps the starter kit small; a production product could replace it with authenticated persistence, quotas, and team-level retention policies.
What I would improve next
The next practical additions would be streaming output, document upload with extraction limits, request-rate controls, and an evaluation harness that compares summary quality across models and prompt versions. I would also add explicit privacy controls before positioning the app for sensitive business documents.
I would appreciate feedback on the API boundary and on which extension would make this most useful as a foundation for other AI features.
Optional time-saver for developers who want the ready-to-deploy codebase: https://buy.stripe.com/fZueVc5Qm4d31nae5w6wE00
Top comments (0)