{"id":32454260,"url":"https://github.com/anubhavick/t.lob","last_synced_at":"2026-05-09T02:05:38.760Z","repository":{"id":320590447,"uuid":"1082594452","full_name":"Anubhavick/t.lob","owner":"Anubhavick","description":"a website that let you make website from prompt","archived":false,"fork":false,"pushed_at":"2025-10-24T15:56:43.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-24T17:38:55.273Z","etag":null,"topics":["express","llm","react","saas","stackbit","webcontainer","websocket"],"latest_commit_sha":null,"homepage":"","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/Anubhavick.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-24T13:26:18.000Z","updated_at":"2025-10-24T15:56:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"5db41a16-fe5a-45f4-8fb7-477ca7fb6c5b","html_url":"https://github.com/Anubhavick/t.lob","commit_stats":null,"previous_names":["anubhavick/t.lob"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Anubhavick/t.lob","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anubhavick%2Ft.lob","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anubhavick%2Ft.lob/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anubhavick%2Ft.lob/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anubhavick%2Ft.lob/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Anubhavick","download_url":"https://codeload.github.com/Anubhavick/t.lob/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Anubhavick%2Ft.lob/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281074181,"owners_count":26439421,"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-10-26T02:00:06.575Z","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":["express","llm","react","saas","stackbit","webcontainer","websocket"],"created_at":"2025-10-26T07:58:22.036Z","updated_at":"2026-05-09T02:05:38.753Z","avatar_url":"https://github.com/Anubhavick.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# T.lob - AI-Powered Web Development Platform\n\n\u003e **Build full-stack applications instantly with AI** - A revolutionary web development platform that transforms natural language descriptions into complete, production-ready applications.\n\n## Overview\n\nT.lob is an intelligent web development platform that leverages cutting-edge AI models to generate complete web applications from simple text prompts. Whether you're building a React frontend, Node.js backend, or a full-stack application, T.lob handles the entire development workflow - from project scaffolding to code generation\n\n## Key Features\n\n### AI-Powered Code Generation\n- **Natural Language to Code**: Describe your app in plain English, and watch as T.lob generates production-ready code\n- **Multi-Model Support**: Integrated with GitHub AI Models (GPT-4o) for intelligent code generation\n- **Context-Aware**: Understands project structure and generates code that fits seamlessly with existing files\n\n### Smart Project Detection\n- **Automatic Template Selection**: Intelligently detects whether you need a React, Node.js, or custom project\n- **Pre-configured Templates**: \n  - **React Template**: Vite + React 18 + TypeScript + Tailwind CSS + Lucide Icons\n  - **Node.js Template**: Express + TypeScript with modern best practices\n\n### Advanced Architecture\n\n#### WebContainer Integration (Concept)\nT.lob is designed to work with WebContainer technology - an in-browser Node.js runtime that emulates a Linux-like environment:\n- **Browser-Based Execution**: Run Node.js, npm, and shell commands directly in the browser\n- **No Backend Required**: Full development environment without cloud infrastructure\n- **Real-time Preview**: Instant feedback as code changes are applied\n- **Sandboxed Environment**: Secure, isolated execution context\n\n#### Artifact System\nInspired by modern AI development tools, T.lob uses a structured artifact system:\n- **`\u003cboltArtifact\u003e`**: Container for complete project structures\n- **`\u003cboltAction\u003e`**: Individual file operations (create, update, delete)\n- **Sequential Execution**: Actions are executed in order for proper dependency management\n\n### Technology Stack\n\n#### Backend\n```\n├── Express.js          # RESTful API server\n├── OpenAI SDK          # GitHub AI Models integration\n├── TypeScript          # Type-safe development\n└── Custom Prompts      # Engineered system prompts for optimal output\n```\n\n#### Frontend (Planned)\n```\n├── React 18            # Modern UI framework\n├── TypeScript          # Type safety\n├── Tailwind CSS        # Utility-first styling\n├── Vite                # Lightning-fast build tool\n└── Lucide React        # Beautiful icon library\n```\n\n## Getting Started\n\n### Prerequisites\n- Node.js 18+ installed\n- GitHub Personal Access Token with AI model access\n\n### Installation\n\n1. **Clone the repository**\n```bash\ngit clone https://github.com/Anubhavick/t.lob.git\ncd t.lob\n```\n\n2. **Set up the backend**\n```bash\ncd backend\nnpm install\n```\n\n3. **Configure environment variables**\nCreate a `.env` file in the `backend` directory:\n```env\nGITHUB_TOKEN=your_github_personal_access_token_here\nPORT=3000\n```\n\n4. **Start the development server**\n```bash\nnpm run dev\n```\n\nThe server will start on `http://localhost:3000`\n\n## API Endpoints\n\n### POST `/template`\nAnalyzes the user's prompt and returns the appropriate project template.\n\n**Request:**\n```json\n{\n  \"prompt\": \"Create a todo app with React\"\n}\n```\n\n**Response:**\n```json\n{\n  \"prompts\": [\n    \"System prompt...\",\n    \"Base template prompt...\"\n  ],\n  \"uiPrompts\": [\n    \"Full React template with all files...\"\n  ]\n}\n```\n\n### POST `/chat`\nProcesses chat messages and generates code based on the conversation.\n\n**Request:**\n```json\n{\n  \"messages\": [\n    { \"role\": \"system\", \"content\": \"System prompt...\" },\n    { \"role\": \"user\", \"content\": \"Add a delete button to each todo item\" }\n  ]\n}\n```\n\n**Response:**\n```json\n{\n  \"response\": \"\u003cboltArtifact\u003e...\u003c/boltArtifact\u003e\"\n}\n```\n\n## How It Works\n\n### 1. **Prompt Engineering**\nT.lob uses sophisticated system prompts that guide the AI to:\n- Generate clean, modular code following best practices\n- Use the artifact format for structured output\n- Consider the entire project context\n- Split functionality into smaller, reusable modules\n- Apply proper naming conventions and formatting\n\n### 2. **Project Type Detection**\nThe `/template` endpoint uses AI to analyze the user's intent:\n```typescript\n// Detects project type: \"react\" or \"node\"\nconst response = await client.chat.completions.create({\n  messages: [\n    { role: 'system', content: \"Detect project type...\" },\n    { role: 'user', content: userPrompt }\n  ]\n});\n```\n\n### 3. **Context Management**\nTo work within AI model token limits (4000 tokens for GPT-4o):\n- Sends summarized base prompts to the AI\n- Returns full templates separately for UI display\n- Maintains conversation history efficiently\n\n### 4. **Code Generation**\nThe AI generates structured artifacts:\n```xml\n\u003cboltArtifact id=\"todo-app\" title=\"Todo Application\"\u003e\n  \u003cboltAction type=\"file\" filePath=\"src/App.tsx\"\u003e\n    // Complete React component code\n  \u003c/boltAction\u003e\n  \u003cboltAction type=\"shell\"\u003e\n    npm install\n  \u003c/boltAction\u003e\n\u003c/boltArtifact\u003e\n```\n\n## Use Cases\n\n- **Rapid Prototyping**: Turn ideas into working prototypes in minutes\n- **Learning Tool**: See how experienced developers structure applications\n- **Component Library**: Generate reusable UI components on demand\n- **API Development**: Create Express endpoints and database schemas\n- **Full-Stack Apps**: Build complete applications with frontend and backend\n\n## Configuration\n\n### AI Model Settings\nLocated in `backend/src/index.ts`:\n```typescript\nconst endpoint = \"https://models.github.ai/inference\";\nconst model = \"gpt-4o\"; // or \"gpt-4o-mini\", \"o1-preview\"\n```\n\n### System Prompts\nCustomize AI behavior in `backend/src/prompts.ts`:\n- Code style preferences\n- Framework-specific guidelines\n- Project structure conventions\n\n### Templates\nModify base templates in `backend/src/defaults/`:\n- `react.ts` - React + Vite template\n- `node.ts` - Node.js template\n\n## Best Practices\n\n### Rate Limit Management\n- GitHub AI models have daily rate limits\n- Use keyword-based detection when possible\n- Implement retry logic with exponential backoff\n- Cache responses for repeated queries\n\n### Token Optimization\n- Summarize base prompts to fit within limits\n- Stream responses for large outputs\n- Maintain minimal conversation history\n\n### Security\n- Never commit `.env` files\n- Validate all user inputs\n- Sanitize AI-generated code before execution\n- Use proper CORS configuration\n\n## Roadmap\n\n- [ ] **Frontend Interface**: Complete React UI with Monaco Editor\n- [ ] **WebContainer Integration**: In-browser code execution\n- [ ] **Live Preview**: Real-time application preview\n- [ ] **Version Control**: Git-like version management for projects\n- [ ] **Collaboration**: Multi-user editing and sharing\n- [ ] **Template Marketplace**: Community-contributed templates\n- [ ] **Custom Models**: Support for local and custom AI models\n- [ ] **Export Options**: Download as zip, deploy to Vercel/Netlify\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/AmazingFeature`)\n3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)\n4. Push to the branch (`git push origin feature/AmazingFeature`)\n5. Open a Pull Request\n\n## License\n\nThis project is licensed under the ISC License.\n\n## Acknowledgments\n\n- GitHub AI Models for providing the AI inference API\n- OpenAI SDK for the excellent TypeScript client\n- The React, Vite, and TypeScript communities\n- WebContainer technology pioneers for the browser-based runtime concept\n\n## Contact\n\n**Anubhavick** - [@Anubhavick](https://github.com/Anubhavick)\n\nProject Link: [https://github.com/Anubhavick/t.lob](https://github.com/Anubhavick/t.lob)\n\n---\n\n**Built with care using AI and modern web technologies** \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanubhavick%2Ft.lob","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanubhavick%2Ft.lob","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanubhavick%2Ft.lob/lists"}