{"id":34976207,"url":"https://github.com/martian56/lumnicode","last_synced_at":"2025-12-27T00:11:06.927Z","repository":{"id":317421110,"uuid":"1063919117","full_name":"martian56/lumnicode","owner":"martian56","description":"Free to use web based AI code editor and generator. BYOK (Bring your own keys)","archived":false,"fork":false,"pushed_at":"2025-10-24T14:42:03.000Z","size":1541,"stargazers_count":15,"open_issues_count":2,"forks_count":5,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-18T23:29:15.098Z","etag":null,"topics":["ai","ai-code-editor","ai-code-generator"],"latest_commit_sha":null,"homepage":"https://lumnicode.ufazien.com","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/martian56.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-09-25T09:43:30.000Z","updated_at":"2025-12-12T09:08:37.000Z","dependencies_parsed_at":"2025-10-07T16:02:18.624Z","dependency_job_id":null,"html_url":"https://github.com/martian56/lumnicode","commit_stats":null,"previous_names":["martian56/lumnicode"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/martian56/lumnicode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martian56%2Flumnicode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martian56%2Flumnicode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martian56%2Flumnicode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martian56%2Flumnicode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/martian56","download_url":"https://codeload.github.com/martian56/lumnicode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/martian56%2Flumnicode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28065839,"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-12-26T02:00:06.189Z","response_time":55,"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":["ai","ai-code-editor","ai-code-generator"],"created_at":"2025-12-27T00:11:06.244Z","updated_at":"2025-12-27T00:11:06.921Z","avatar_url":"https://github.com/martian56.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lumnicode - AI-Powered Online Code Editor\n\n![Lumnicode Logo](https://via.placeholder.com/150x50/6366f1/ffffff?text=Lumnicode)\n\nLumnicode is a modern, AI-powered online code editor built with React (frontend) and FastAPI (backend). It provides real-time code editing, project management, and AI-assisted coding features.\n\n## 🚀 Features\n\n- **AI-Powered Code Assistance**: Get intelligent suggestions and code improvements\n- **Project Management**: Create, organize, and manage coding projects\n- **Real-time Code Editor**: Monaco Editor integration with syntax highlighting\n- **Authentication**: Secure user authentication with Clerk\n- **File Management**: Complete CRUD operations for project files\n- **Modern UI**: Responsive design inspired by VS Code\n- **Cloud Database**: Powered by Neon.tech PostgreSQL\n\n## 🏗️ Architecture\n\n### Backend (FastAPI)\n- **Framework**: FastAPI with Python 3.11+\n- **Database**: PostgreSQL (Neon.tech)\n- **Authentication**: Clerk JWT verification\n- **ORM**: SQLAlchemy with Alembic migrations\n- **API**: RESTful endpoints for projects, files, and AI assistance\n\n### Frontend (React + TypeScript)\n- **Framework**: React 18 with TypeScript\n- **Build Tool**: Vite\n- **Styling**: Tailwind CSS\n- **Editor**: Monaco Editor\n- **Routing**: React Router\n- **Authentication**: Clerk React\n\n## 📋 Prerequisites\n\nBefore running this project, make sure you have:\n\n- **Node.js** (v18 or higher)\n- **Python** (v3.11 or higher)\n- **Clerk Account** (for authentication)\n- **Neon.tech Account** (for PostgreSQL database)\n\n## 🛠️ Installation \u0026 Setup\n\n### 1. Clone the Repository\n\n```bash\ngit clone \u003cyour-repo-url\u003e\ncd lumnicode\n```\n\n### 2. Backend Setup\n\n```bash\ncd backend\n\n# Create virtual environment\npython -m venv venv\n\n# Activate virtual environment\n# On Windows:\nvenv\\Scripts\\activate\n# On macOS/Linux:\nsource venv/bin/activate\n\n# Install dependencies\npip install -r requirements.txt\n\n# Create .env file\ncp .env.example .env\n```\n\nEdit `backend/.env` with your configuration:\n\n```env\n# Database (from Neon.tech)\nDATABASE_URL=postgresql://username:password@ep-example.us-east-1.aws.neon.tech/neondb\n\n# Clerk Authentication\nCLERK_SECRET_KEY=sk_test_your_clerk_secret_key_here\nCLERK_PUBLISHABLE_KEY=pk_test_your_clerk_publishable_key_here\n\n# Application Settings\nDEBUG=True\nAPP_NAME=Lumnicode\n```\n\n### 3. Database Migration\n\n```bash\n# Generate initial migration\nalembic revision --autogenerate -m \"Initial migration\"\n\n# Run migrations\nalembic upgrade head\n```\n\n### 4. Frontend Setup\n\n```bash\ncd ../frontend\n\n# Install dependencies\nnpm install\n\n# Create .env file\ncp .env.example .env\n```\n\nEdit `frontend/.env` with your Clerk configuration:\n\n```env\nVITE_CLERK_PUBLISHABLE_KEY=pk_test_your_clerk_publishable_key_here\nVITE_API_BASE_URL=http://localhost:8000\n```\n\n## 🚀 Running the Application\n\n### Option 1: Using Docker Compose\n\n#### For Development (with hot reload):\n```bash\n# From the root directory\ndocker-compose -f docker-compose.dev.yml up --build\n```\n\nThis will start:\n- Backend API at `http://localhost:8000` (with hot reload)\n- Frontend dev server at `http://localhost:3000` (with hot reload)\n\n#### For Production (with Nginx):\n```bash\n# From the root directory\ndocker-compose up --build\n```\n\nThis will start:\n- Backend API at `http://localhost:8000`\n- Frontend app served by Nginx at `http://localhost` (port 80)\n\n### Option 2: Manual Setup\n\n**Backend:**\n```bash\ncd backend\n# Activate virtual environment\nvenv\\Scripts\\activate  # Windows\n# source venv/bin/activate  # macOS/Linux\n\n# Start the server\nuvicorn main:app --reload --host 0.0.0.0 --port 8000\n```\n\n**Frontend:**\n```bash\ncd frontend\nnpm run dev\n```\n\n## 📚 API Documentation\n\nOnce the backend is running, you can access:\n\n- **API Documentation**: `http://localhost:8000/docs` (Swagger UI)\n- **Alternative Docs**: `http://localhost:8000/redoc` (ReDoc)\n\n### Main Endpoints\n\n- `GET /health` - Health check\n- `GET /auth/me` - Get current user info\n- `GET /projects` - List user projects\n- `POST /projects` - Create new project\n- `GET /files?project_id=X` - List project files\n- `POST /files` - Create new file\n- `POST /assist` - AI code assistance\n\n## 🔧 Development\n\n### Backend Development\n\n```bash\ncd backend\n\n# Install development dependencies\npip install black ruff\n\n# Format code\nblack .\n\n# Lint code\nruff check .\n\n# Run tests\npytest\n```\n\n### Frontend Development\n\n```bash\ncd frontend\n\n# Format code\nnpm run format\n\n# Lint code\nnpm run lint\n\n# Type check\nnpx tsc --noEmit\n```\n\n### Database Operations\n\n```bash\ncd backend\n\n# Create new migration\nalembic revision --autogenerate -m \"Description of changes\"\n\n# Apply migrations\nalembic upgrade head\n\n# Rollback migration\nalembic downgrade -1\n```\n\n## 📁 Project Structure\n\n```\nlumnicode/\n├── backend/\n│   ├── src/\n│   │   ├── api/          # API endpoints\n│   │   ├── models/       # Database models\n│   │   ├── schemas/      # Pydantic schemas\n│   │   ├── services/     # Business logic\n│   │   └── db/           # Database configuration\n│   ├── alembic/          # Database migrations\n│   ├── main.py           # FastAPI app entry point\n│   └── requirements.txt  # Python dependencies\n├── frontend/\n│   ├── src/\n│   │   ├── components/   # React components\n│   │   └── lib/          # Utilities and API client\n│   ├── public/           # Static assets\n│   └── package.json      # Node.js dependencies\n└── docker-compose.yml    # Docker configuration\n```\n\n## 🔐 Authentication Setup\n\n### Clerk Configuration\n\n1. Create a Clerk account at [clerk.com](https://clerk.com)\n2. Create a new application\n3. Get your publishable and secret keys from the dashboard\n4. Add the keys to your `.env` files\n\n### Environment Variables\n\n**Backend (.env):**\n- `CLERK_SECRET_KEY`: Your Clerk secret key\n- `DATABASE_URL`: Your Neon.tech database URL\n\n**Frontend (.env):**\n- `VITE_CLERK_PUBLISHABLE_KEY`: Your Clerk publishable key\n\n## 🗃️ Database Schema\n\n### Users Table\n- `id`: Primary key\n- `clerk_id`: Unique Clerk user identifier\n- `email`: User email\n- `first_name`, `last_name`: User names\n- `created_at`, `updated_at`: Timestamps\n\n### Projects Table\n- `id`: Primary key\n- `name`: Project name\n- `description`: Project description\n- `owner_id`: Foreign key to users\n- `is_public`: Visibility flag\n- `created_at`, `updated_at`: Timestamps\n\n### Files Table\n- `id`: Primary key\n- `name`: File name\n- `path`: File path within project\n- `content`: File content\n- `language`: Programming language\n- `project_id`: Foreign key to projects\n- `created_at`, `updated_at`: Timestamps\n\n## 🚀 Deployment\n\n### Backend Deployment (Railway/Render)\n\n1. Connect your repository to Railway or Render\n2. Set environment variables in the platform dashboard\n3. The service will automatically build and deploy\n\n### Frontend Deployment (Vercel)\n\n1. Connect your repository to Vercel\n2. Set the root directory to `frontend`\n3. Add environment variables in Vercel dashboard\n4. Deploy automatically on push\n\n### Environment Variables for Production\n\nMake sure to set these in your deployment platform:\n\n**Backend:**\n- `DATABASE_URL`\n- `CLERK_SECRET_KEY`\n- `CLERK_PUBLISHABLE_KEY`\n\n**Frontend:**\n- `VITE_CLERK_PUBLISHABLE_KEY`\n- `VITE_API_BASE_URL` (your backend URL)\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## 📝 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🆘 Troubleshooting\n\n### Common Issues\n\n**Database Connection Error:**\n- Verify your Neon.tech DATABASE_URL is correct\n- Check if your IP is whitelisted in Neon.tech dashboard\n\n**Clerk Authentication Error:**\n- Ensure your Clerk keys are correctly set in environment variables\n- Verify the keys match your Clerk application dashboard\n\n**Frontend Build Issues:**\n- Clear node_modules and reinstall: `rm -rf node_modules \u0026\u0026 npm install`\n- Check Node.js version compatibility\n\n**Backend Import Errors:**\n- Ensure you're in the correct virtual environment\n- Reinstall requirements: `pip install -r requirements.txt`\n\n### Getting Help\n\n- Open an issue in the GitHub repository\n- Check the API documentation at `/docs`\n- Review the browser console and server logs for error details\n\n---\n\nBuilt with ❤️ using FastAPI, React, and modern web technologies.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartian56%2Flumnicode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmartian56%2Flumnicode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmartian56%2Flumnicode/lists"}