# 🚀 NanoJason - Universal AI Prompt Language Translator & Optimizer

<div align="center">
  
![NanoJason](https://img.shields.io/badge/NanoJason-AI%20Prompt%20Optimizer-blue?style=for-the-badge&logo=sparkles)
![Version](https://img.shields.io/badge/Version-3.0-green?style=for-the-badge)
![License](https://img.shields.io/badge/License-MIT-yellow?style=for-the-badge)
![Offline](https://img.shields.io/badge/Status-Offline%20Ready-purple?style=for-the-badge)

</div>

<p align="center">
  <strong>NanoJason</strong> is a revolutionary, offline-only prompt engineering tool that transforms natural language descriptions into optimized Jason format for maximum AI accuracy across all image generation services.
</p>

<p align="center">
  <a href="#features">🌟 Features</a> • 
  <a href="#getting-started">🚀 Getting Started</a> • 
  <a href="#usage">💡 Usage</a> • 
  <a href="#contributing">🤝 Contributing</a> • 
  <a href="#license">📜 License</a>
</p>

---

## 🌟 **Amazing Features**

### 🎯 **Three Powerful Modes**

#### 1. **Jason Translator**
- Converts natural language to universal Jason format
- Style, mood, character, and item detection
- Extracts color palette, composition, and lighting
- Perfect for AI image generation compatibility

#### 2. **NanoPrompt Optimizer** 
- Deep reverse engineering for maximum AI accuracy
- Pattern mapping and keyword enhancement
- Quality descriptors and composition optimization
- Lighting and color enhancement
- Error prevention and artifact reduction
- **Accuracy Score:** Up to 95%

#### 3. **NanoCoder Technical Optimizer**
- Specialized for coding and engineering prompts
- Technical domain detection (programming, web, mobile, AI, etc.)
- Framework and language pattern recognition
- Architecture and security optimization
- Code context extraction
- **Technical Accuracy:** Up to 98%

### 🔥 **Key Benefits**

- **🚀 Offline-Only** - No internet connection required
- **⚡ Instant Results** - Real-time translation and optimization
- **🎨 Universal Compatibility** - Works with all AI image generators
- **🔒 Privacy Focused** - No data leaves your device
- **📱 Responsive Design** - Perfect for desktop and mobile
- **🎯 High Accuracy** - Advanced pattern recognition and optimization
- **🔄 Export Options** - Copy, download, and share optimized prompts

---

## 🚀 **Getting Started**

### Prerequisites
- Node.js 18+ 
- npm or pnpm

### Installation

1. **Clone the repository**
```bash
git clone https://github.com/roman-ryzenadvanced/NanoJason.git
cd NanoJason
```

2. **Install dependencies**
```bash
npm install
# or
pnpm install
```

3. **Run the application**
```bash
npm run dev
# or
pnpm dev
```

4. **Open your browser**
```
http://localhost:3000
```

---

## 💡 **Usage Examples**

### **Jason Translator Mode**
```text
Input: "A magical forest with glowing mushrooms and fairies"
Output: 
{
  "prompt": "A magical forest with glowing mushrooms and fairies",
  "style": "fantasy",
  "mood": "peaceful",
  "characters": ["fairies"],
  "items": ["mushrooms", "forest"],
  "setting": "forest",
  "action": undefined,
  "color_palette": ["glowing", "magical"],
  "composition": undefined,
  "lighting": "glowing"
}
```

### **NanoPrompt Optimizer Mode**
```text
Input: "A beautiful landscape"
Output:
- **Original:** "A beautiful landscape"
- **Optimized:** "A beautiful landscape, breathtakingly beautiful, ultra-detailed, photorealistic, perfect composition, dramatic lighting, high resolution, no artifacts"
- **Accuracy Score:** 85%
```

### **NanoCoder Technical Mode**
```text
Input: "React web application with TypeScript"
Output:
- **Original:** "React web application with TypeScript"
- **Technical:** "React web application with TypeScript, well-structured and maintainable, clean code, DRY principle, SOLID principles, responsive and accessible web application, technical excellence"
- **Technical Accuracy:** 92%
```

---

## 🏗️ **Architecture**

### **Core Components**

#### **JasonTranslator** (`src/services/jason-translator.ts`)
- Natural language to Jason format conversion
- Pattern recognition for style, mood, characters, items
- Setting, action, color palette extraction
- Composition and lighting detection

#### **NanoPrompt** (`src/services/nano-prompt.ts`) 
- Deep reverse engineering optimization
- Pattern mapping and keyword enhancement
- Quality descriptors and technical specifications
- Performance optimization and error prevention

#### **NanoCoder** (`src/services/nano-coder.ts`)
- Technical prompt optimization
- Programming language and framework detection
- Architecture and security enhancement
- Code context extraction

---

## 🎨 **UI Components**

### **Tabbed Interface**
- **Jason Translator** - Blue theme for basic translation
- **NanoPrompt** - Purple theme for AI optimization  
- **NanoCoder** - Green theme for technical optimization

### **Interactive Features**
- Quick templates for each mode
- Real-time processing with loading indicators
- Copy/download functionality for results
- Accuracy score display
- Performance tips and optimization details

---

## 🛠️ **Development**

### **Project Structure**
```
src/
├── app/
│   ├── page.tsx              # Main application page
│   ├── layout.tsx           # Root layout
│   └── globals.css          # Global styles
├── components/
│   ├── layout/
│   │   ├── header.tsx      # Navigation header
│   │   └── footer.tsx      # Footer section
│   └── ui/
│       ├── button.tsx      # Button component
│       ├── card.tsx        # Card component
│       └── input.tsx       # Input component
└── services/
    ├── jason-translator.ts # Jason translation service
    ├── nano-prompt.ts      # NanoPrompt optimization
    ├── nano-coder.ts       # NanoCoder technical optimization
    └── api-utils.ts        # API utilities
```

### **Technologies Used**
- **Next.js** - React framework with App Router
- **TypeScript** - Type-safe development
- **Tailwind CSS** - Modern utility-first styling
- **Lucide React** - Beautiful icon library

### **Build & Development**

```bash
# Development server
npm run dev

# Build for production
npm run build

# Start production server
npm start

# Linting
npm run lint
```

---

## 🤝 **Contributing**

We welcome contributions! Here's how you can help:

1. **Fork the repository**
2. **Create a feature branch** (`git checkout -b feature/amazing-feature`)
3. **Make your changes**
4. **Commit your changes** (`git commit -m 'Add some amazing feature'`)
5. **Push to the branch** (`git push origin feature/amazing-feature`)
6. **Open a Pull Request**

### **Development Guidelines**
- Follow TypeScript best practices
- Use Tailwind CSS for styling
- Write clean, readable code
- Add comments for complex logic
- Test your changes thoroughly

---

## 📜 **License**

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

---

## 👨‍💻 **About the Developer**

**NanoJason** is developed by **Roman | RyzenAdvanced**

- **GitHub:** [roman-ryzenadvanced](https://github.com/roman-ryzenadvanced)
- **Project Hub:** [Custom Engineered Agents and Tools for Vibe Coders](https://github.com/roman-ryzenadvanced/Custom-Engineered-Agents-and-Tools-for-Vibe-Coders)
- **Tools:** [GLM 4.6 Coding Model](https://z.ai/subscribe?ic=R0K78RJKNW)
- **Built with:** [TRAE IDE](https://www.trae.ai/s/WJtxyE)

### **Special Thanks**
- **GLM 4.6** - Advanced coding model for AI assistance
- **TRAE IDE** - Amazing development environment
- **Open Source Community** - For inspiration and collaboration

---

## 🚀 **Deployment**

### **Vercel (Recommended)**
```bash
# Deploy to Vercel
npm i -g vercel
vercel
```

### **GitHub Pages**
```bash
# Build and deploy
npm run build
npm run export
```

### **Other Platforms**
- Netlify
- Railway
- DigitalOcean App Platform
- AWS Amplify

---

## 🌟 **Show Your Support**

If you find NanoJason useful, please consider:

- ⭐ **Star the repository** on GitHub
- 🐛 **Report bugs** or suggest features
- 📢 **Share** with fellow developers
- 💡 **Contribute** to make it even better

---

## 📞 **Contact**

- **Issues:** [GitHub Issues](https://github.com/roman-ryzenadvanced/NanoJason/issues)
- **Discussions:** [GitHub Discussions](https://github.com/roman-ryzenadvanced/NanoJason/discussions)
- **Email:** [Create an issue](https://github.com/roman-ryzenadvanced/NanoJason/issues) for contact

---

<div align="center">
  <strong>Made with ❤️ by Roman | RyzenAdvanced</strong>
  
  [🚀 Deploy](https://vercel.com/new/clone?repository-url=https://github.com/roman-ryzenadvanced/NanoJason) •
  [💡 Features](#-amazing-features) •
  [📖 Documentation](#-getting-started)
</div>