Stateless AI Text Transform
September 26, 2025 ยท View on GitHub
A clean, stateless AI-powered text transformation tool designed for local AI models and OpenAI-compatible APIs. Each transformation is treated as an independent request with no chat history, optimizing performance for local AI inference.
โจ Features
- ๐ Stateless Design - Each request sends system prompt + input together, no conversation memory
- ๐ค OpenAI-Compatible API - Works with OpenAI, Ollama, LM Studio, vLLM, and any compatible endpoint
- โ๏ธ Flexible Configuration - Configurable base URL, model, API key, temperature, and max tokens
- ๐ Preset Templates - Built-in prompts for email formatting, summarization, bullet points, and more
- ๐พ Browser History - Local storage of transformations for easy reuse (up to 100 items)
- ๐ Dark Mode - Full dark/light/system theme support
- ๐ Copy & Clear Tools - Streamlined workflow for text processing
- ๐ Fast & Lightweight - React 19 + Vite + Tailwind CSS
๐ฏ Perfect For
- Local AI Users - Optimized for minimal context to maximize local performance
- Text Processing Workflows - Email formatting, content summarization, style transformation
- Privacy-Conscious Users - All data stays local, no external dependencies
- Multi-Model Testing - Easy switching between different AI endpoints
๐ Quick Start
Option 1: Run Pre-built Version (Recommended)
No Node.js required! Just serve the pre-built files:
# Download and extract the repository
git clone https://github.com/IgorWarzocha/stateless-AI-text-transform.git
cd stateless-AI-text-transform
# Serve the built files (choose one):
# Python (most common)
cd dist && python -m http.server 8080
# Node.js
cd dist && npx serve
# Or use any web server pointed to the dist/ folder
Then open http://localhost:8080 in your browser.
Option 2: Development Setup
Requirements: Node.js 18+ and npm
git clone https://github.com/IgorWarzocha/stateless-AI-text-transform.git
cd stateless-AI-text-transform
npm install
npm run build
npm run preview
โ๏ธ Configuration
- Click the Settings button in the top-right corner
- Configure your AI endpoint:
OpenAI API
Base URL: https://api.openai.com/v1
Model: gpt-4o
API Key: sk-...
Ollama (Local)
Base URL: http://localhost:11434/v1
Model: llama3.2
API Key: (leave empty)
LM Studio (Local)
Base URL: http://localhost:1234/v1
Model: (your loaded model name)
API Key: (leave empty)
Custom OpenAI-Compatible Endpoint
Base URL: https://your-endpoint.com/v1
Model: your-model-name
API Key: your-api-key (if required)
๐ง Usage
- Select a Preset or write a custom system prompt
- Paste your text in the input area
- Click Transform - each request is independent
- Copy the output or save it to history
- Access History to reuse previous transformations
Example Workflows
Email Formatting:
- Preset: "Format as Email"
- Input: Raw notes or bullet points
- Output: Professional email with proper structure
Content Summarization:
- Preset: "Summarize"
- Input: Long article or document
- Output: Concise summary of key points
Style Transformation:
- Preset: "Make Formal" or "Make Casual"
- Input: Text in one style
- Output: Same content in different tone
๐๏ธ Technical Details
- Frontend: React 19 + TypeScript + Vite
- Styling: Tailwind CSS v4 + shadcn/ui design system
- Storage: Browser localStorage for settings and history
- API: OpenAI-compatible REST API calls
- Bundle Size: ~240KB (minified + gzipped)
๐จ Development
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
# Lint code
npm run lint
๐ Project Structure
src/
โโโ components/ # React components
โ โโโ HistorySidebar.tsx
โ โโโ ModeToggle.tsx
โ โโโ SettingsModal.tsx
โ โโโ ThemeProvider.tsx
โโโ lib/ # Utilities
โ โโโ api.ts # OpenAI-compatible API client
โ โโโ presets.ts # Built-in prompt templates
โ โโโ storage.ts # localStorage helpers
โ โโโ utils.ts # General utilities
โโโ types.ts # TypeScript definitions
โโโ App.tsx # Main application
โโโ main.tsx # Application entry point
๐ค Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes and test thoroughly
- Submit a pull request
๐ License
MIT License - feel free to use this project for personal or commercial purposes.
๐ ๏ธ Troubleshooting
CORS Issues with Local AI
Some local AI servers require CORS headers. Enable CORS in your AI server settings:
Ollama: Automatically handles CORS for browser requests LM Studio: Enable "Allow CORS" in server settings Custom servers: Add appropriate CORS headers
API Connection Issues
- Verify the base URL is correct and accessible
- Check if the model name matches exactly
- For local models, ensure the AI server is running
- Use the "Test" button in settings to verify connection
Performance Tips
- Use lower
max_tokensvalues for faster responses - Reduce
temperaturefor more consistent outputs - Keep system prompts concise for better local AI performance
Built with โค๏ธ for the AI community. Optimized for local AI inference and privacy-focused workflows.