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

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

  1. Click the Settings button in the top-right corner
  2. 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

  1. Select a Preset or write a custom system prompt
  2. Paste your text in the input area
  3. Click Transform - each request is independent
  4. Copy the output or save it to history
  5. 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

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature-name
  3. Make your changes and test thoroughly
  4. 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

  1. Verify the base URL is correct and accessible
  2. Check if the model name matches exactly
  3. For local models, ensure the AI server is running
  4. Use the "Test" button in settings to verify connection

Performance Tips

  • Use lower max_tokens values for faster responses
  • Reduce temperature for 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.