{"id":30761471,"url":"https://github.com/terminal127/luna-v-x","last_synced_at":"2025-09-04T14:11:09.785Z","repository":{"id":311943348,"uuid":"1036897245","full_name":"Terminal127/luna-v-x","owner":"Terminal127","description":null,"archived":false,"fork":false,"pushed_at":"2025-08-27T17:16:49.000Z","size":877,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-28T00:48:27.476Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Terminal127.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-12T18:41:09.000Z","updated_at":"2025-08-27T17:16:52.000Z","dependencies_parsed_at":"2025-08-28T00:48:40.510Z","dependency_job_id":"fbb0a4c7-8024-41af-836a-4195c1cd01c2","html_url":"https://github.com/Terminal127/luna-v-x","commit_stats":null,"previous_names":["terminal127/luna-v-x"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Terminal127/luna-v-x","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Terminal127%2Fluna-v-x","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Terminal127%2Fluna-v-x/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Terminal127%2Fluna-v-x/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Terminal127%2Fluna-v-x/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Terminal127","download_url":"https://codeload.github.com/Terminal127/luna-v-x/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Terminal127%2Fluna-v-x/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273619738,"owners_count":25138241,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-04T14:11:03.687Z","updated_at":"2025-09-04T14:11:09.779Z","avatar_url":"https://github.com/Terminal127.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Luna Version X 🌙\n\nA beautiful AI chat interface powered by\n\nwith a stunning Tokyo Night theme.\n\n![Luna Version X Screenshot](https://via.placeholder.com/800x400/1a1b26/7aa2f7?text=Luna+Version+X)\n\n## Features ✨\n\n- 🎨 **Beautiful Tokyo Night Theme** - Dark, modern interface inspired by the popular VS Code theme\n- 🤖 **LangChain Integration** - Powered by LangChain for advanced AI capabilities\n- 🛠️ **Tool Usage Visualization** - See when and how AI tools are being used\n- 📱 **Responsive Design** - Works perfectly on desktop and mobile devices\n- ⚡ **Real-time Performance Metrics** - View response times and server status\n- 💾 **Local Storage** - Conversations are saved locally for persistence\n- 🎯 **Multiple Themes** - Choose between Tokyo Night, Dark, and Light themes\n- 🔄 **Session Management** - Proper conversation handling with the server\n- ⌨️ **Keyboard Shortcuts** - Enhanced UX with Ctrl+Enter to send, Escape to cancel\n\n## Architecture 🏗️\n\nThe system consists of two main components:\n\n1. **LangChain Server** (`/langchain/`) - FastAPI backend that handles AI interactions\n2. **Chat Client** (`/chatgpt-clone/`) - Beautiful web interface for chatting\n\n## Quick Start 🚀\n\n### Prerequisites\n\n- Python 3.8+\n- Node.js (for any additional tooling, optional)\n- A Gemini API key (or configure your preferred LLM)\n\n### 1. Setup the LangChain Server\n\n```bash\n# Navigate to the langchain directory\ncd luna-version-x/langchain\n\n# Install dependencies\npip install -r requirements.txt\n\n# Set up your environment variables\ncp .env.example .env\n# Edit .env and add your MODEL_API_KEY\n\n# Start the server\npython api_server.py\n```\n\nThe server will start at `http://localhost:8000`\n\n### 2. Setup the Chat Client\n\n```bash\n# Navigate to the client directory\ncd luna-version-x/chatgpt-clone\n\n# Start the client server\npython server.py\n```\n\nThe client will start at `http://localhost:3000` and should open automatically in your browser.\n\n## Configuration ⚙️\n\n### Environment Variables\n\nCreate a `.env` file in the `langchain` directory:\n\n```env\nMODEL_API_KEY=your_gemini_api_key_here\nAPP_NAME=Luna Version X\nPORT=8000\nUVICORN_RELOAD=false\n```\n\n### Server Configuration\n\nThe LangChain server can be configured by editing `langchain/api_server.py`:\n\n- **Models**: Configure which AI models to use\n- **Tools**: Add or remove available tools\n- **CORS**: Adjust CORS settings for production\n- **Rate Limiting**: Add rate limiting if needed\n\n### Client Configuration\n\nThe client can be configured in `chatgpt-clone/client/js/chat.js`:\n\n```javascript\n// Langchain server configuration\nconst LANGCHAIN_API_BASE = \"http://localhost:8000/api\";\n```\n\n## API Endpoints 📡\n\n### LangChain Server\n\n- `POST /api/chat` - Send a chat message\n- `POST /api/session` - Create a new session\n- `GET /api/session/{id}/history` - Get session history\n- `GET /health` - Server health check\n\n### Example Request\n\n```bash\ncurl -X POST \"http://localhost:8000/api/chat\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"message\": \"Hello, how are you?\"}'\n```\n\n## Features in Detail 🔍\n\n### Tokyo Night Theme\n\nThe interface uses a carefully crafted Tokyo Night color palette:\n\n- **Background**: Deep blues and purples (#1a1b26, #24283b)\n- **Accents**: Bright blues, purples, and cyans (#7aa2f7, #bb9af7, #7dcfff)\n- **Text**: High contrast whites and grays for readability\n- **Syntax Highlighting**: Matching code highlighting for consistency\n\n### Tool Usage Visualization\n\nWhen the AI uses tools, you'll see:\n\n- 🔧 Tool name and execution time\n- ✅/❌ Success/failure indicators\n- 📊 Performance metrics\n- 🔍 Output previews\n\n### Responsive Design\n\nThe interface adapts to different screen sizes:\n\n- **Desktop**: Full sidebar with conversation history\n- **Mobile**: Collapsible sidebar with touch-friendly controls\n- **Tablet**: Optimized layout for medium screens\n\n## Development 💻\n\n### Project Structure\n\n```\nluna-version-x/\n├── langchain/              # LangChain server\n│   ├── api_server.py       # FastAPI server\n│   ├── new.py             # Agent configuration\n│   └── requirements.txt   # Python dependencies\n└── chatgpt-clone/         # Chat client\n    ├── client/            # Static files\n    │   ├── css/          # Stylesheets\n    │   ├── js/           # JavaScript\n    │   ├── html/         # HTML templates\n    │   └── img/          # Images\n    └── server.py         # Static file server\n```\n\n### Adding New Themes\n\n1. Add CSS variables in `client/css/style.css`:\n\n```css\n.my-theme {\n    --bg-primary: #your-color;\n    --fg-primary: #your-color;\n    /* ... more variables */\n}\n```\n\n2. Add theme option in `client/html/index.html`:\n\n```html\n\u003cinput type=\"radio\" title=\"My Theme\" id=\"my-theme\" name=\"theme\" /\u003e\n```\n\n### Adding New Tools\n\n1. Configure tools in `langchain/new.py`\n2. The client will automatically show tool usage\n3. Tool events include timing and success/failure info\n\n## Troubleshooting 🔧\n\n### Common Issues\n\n1. **Server won't start**: Check if port 8000 is available\n2. **Client can't connect**: Ensure the LangChain server is running\n3. **API key issues**: Verify your `.env` file configuration\n4. **CORS errors**: Check the CORS configuration in the server\n\n### Logs and Debugging\n\n- Server logs appear in the terminal where you ran `api_server.py`\n- Client logs appear in the browser's developer console\n- Check the Network tab for API request/response details\n\n## Production Deployment 🌐\n\n### LangChain Server\n\nFor production deployment:\n\n1. Use a proper WSGI server like Gunicorn:\n   ```bash\n   gunicorn api_server:app -w 4 -k uvicorn.workers.UvicornWorker\n   ```\n\n2. Set up a reverse proxy (nginx, Apache)\n3. Configure environment variables securely\n4. Set up proper logging and monitoring\n\n### Chat Client\n\nFor production:\n\n1. Use a proper web server (nginx, Apache)\n2. Enable HTTPS\n3. Optimize assets (minification, compression)\n4. Configure proper caching headers\n\n## Contributing 🤝\n\nWe welcome contributions! Please:\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests if applicable\n5. Submit a pull request\n\n## License 📄\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Acknowledgments 🙏\n\n- **Tokyo Night Theme** - Inspired by the VS Code theme\n- **LangChain** - For the powerful AI framework\n- **FontAwesome** - For the beautiful icons\n- **Highlight.js** - For syntax highlighting\n\n## Support 💬\n\nIf you encounter any issues or have questions:\n\n1. Check the troubleshooting section\n2. Look at existing issues in the repository\n3. Create a new issue with detailed information\n4. Join our community discussions\n\n---\n\n**Made with ❤️ and 🌙 by the Luna Version X team**\n# luna-v-x\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterminal127%2Fluna-v-x","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fterminal127%2Fluna-v-x","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterminal127%2Fluna-v-x/lists"}