Skip to content

rahulpatle-sol/codemapers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

⚑ CodeMapers

The AI-Orchestrated Cloud IDE β€” Build, Preview & Deploy from Your Browser

Next.js TypeScript Tailwind Groq PostgreSQL License


πŸ“Έ Demo

Next.js 15 Β· Vite 6 Β· Expo SDK 54 β€” Three frameworks, one IDE.


✨ Features

πŸ€– AI Agent Chat

  • Context-aware β€” understands your whole project, not just one file
  • Groq LLM β€” fast inference with llama-3.3-70b-versatile
  • File-aware responses β€” AI reads current files, suggests changes
  • Auto file write β€” AI can create & modify files directly
  • Custom API key β€” bring your own Groq key

πŸ“ Multi-Framework Editor

Framework Auto-Config Live Preview Device Frames
Next.js 15 βœ“ SSR + App Router βœ“ HMR βœ“ Mobile/Tablet/Laptop
Vite 6 React βœ“ Fast Refresh βœ“ HMR βœ“ Mobile/Tablet/Laptop
Expo SDK 54 βœ“ Expo Router βœ“ QR + Expo Go βœ“ iPhone/Android/iPad

πŸ’» Full IDE Features

  • Monaco Editor β€” VS Code-quality code editing with syntax highlighting
  • File Tree β€” create, rename, delete files & folders
  • Real Terminal β€” xterm.js with jsh shell, Ctrl+C kill, command history
  • Resizable panels β€” drag to resize terminal, file tree, preview
  • Auto-save β€” debounced save to database (1.5s)
  • Keyboard shortcuts β€” Ctrl+`` terminal Β· Ctrl+B file tree Β· Ctrl+\ chat

πŸš€ Deploy & Push

  • GitHub Push β€” create public/private repos, push code with one click
  • ZIP Download β€” export entire project as archive
  • One-click Open β€” preview in new tab

πŸ“± Responsive Device Preview

  • iPhone β€” Dynamic Island, bezels, home bar
  • Android β€” punch hole camera, nav buttons
  • iPad β€” slim bezels, camera dot
  • Laptop β€” screen + keyboard base

πŸ§ͺ Built-in Testing

  • Vitest + @testing-library/react β€” 22+ tests
  • Component & integration tests

🎯 How It Works

1. Create a Project

Dashboard β†’ "New Architecture" β†’ Pick Name + Framework β†’ Enter IDE

2. Code with AI

Open a file β†’ Monaco Editor β†’ Type code
OR
Open Chat β†’ Describe what to build β†’ AI writes files

3. See Live Preview (Web Frameworks)

Next.js / Vite β†’ WebContainer boots β†’ npm install β†’ dev server starts
Edit code β†’ auto-save β†’ HMR β†’ preview updates instantly

4. Preview Expo (Mobile)

Expo project β†’ WebContainer boots β†’ Metro starts β†’ QR code generated
Scan QR with Expo Go on phone β†’ changes hot-reload on device

5. Push to GitHub

IDE Toolbar β†’ Push button β†’ Set repo name β†’ Public/Private β†’ Push
Visit `https://github.com/{user}/{repo}` to see your code

6. Download or Build

ZIP β€” Download complete project as archive
Build (Expo) β€” iOS/Android options (requires EAS)

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                  Browser                     β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚ Monaco    β”‚ β”‚ Terminal β”‚ β”‚ AI Chat      β”‚ β”‚
β”‚  β”‚ Editor    β”‚ β”‚ (xterm)  β”‚ β”‚ (Groq LLM)   β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚       β”‚            β”‚               β”‚         β”‚
β”‚  β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚         WebContainer API                β”‚ β”‚
β”‚  β”‚  (Node.js + npm + dev server in-browser)β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           Next.js API Routes                 β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚ Auth   β”‚ β”‚Files   β”‚ β”‚  AI   β”‚ β”‚ GitHub β”‚ β”‚
β”‚  β”‚ OAuth  β”‚ β”‚ CRUD   β”‚ β”‚ Chat  β”‚ β”‚  Sync  β”‚ β”‚
β”‚  β””β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”¬β”€β”€β”€β”˜ β””β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚          β”‚          β”‚         β”‚
β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”
β”‚           External Services                  β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚GitHub  β”‚ β”‚NeonDB  β”‚ β”‚Groq    β”‚ β”‚Cloudin-β”‚ β”‚
β”‚  β”‚ OAuth  β”‚ β”‚(PG)    β”‚ β”‚ API    β”‚ β”‚ary     β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ› οΈ Tech Stack

Category Technology
Framework Next.js 15 (App Router)
Language TypeScript
Styling Tailwind CSS + Framer Motion
Editor Monaco Editor (CodeMirror-based)
Terminal xterm.js + jsh shell
AI Groq API (llama-3.3-70b-versatile)
Container WebContainer API
Database NeonDB (PostgreSQL)
Auth GitHub OAuth + Google OAuth
File Storage PostgreSQL + Cloudinary (images)
Image Opt sharp (resize + webp)
DevTools @expo/next-adapter, react-rnd
Testing Vitest + @testing-library/react

πŸš€ Local Setup

# 1. Clone
git clone https://github.com/rahulpatle-sol/codemapers.git
cd codemapers

# 2. Install
npm install

# 3. Set environment variables (.env.local)
cat > .env.local << EOF
DATABASE_URL=postgresql://user:[email protected]/codemapers?sslmode=require
JWT_SECRET=your-secret-key
NEXT_PUBLIC_APP_URL=http://localhost:3000
GITHUB_CLIENT_ID=your-github-client-id
GITHUB_CLIENT_SECRET=your-github-secret
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-secret
GROQ_API_KEY=your-groq-api-key
CLOUDINARY_CLOUD_NAME=your-cloud-name
CLOUDINARY_API_KEY=your-cloudinary-key
CLOUDINARY_API_SECRET=your-cloudinary-secret
EOF

# 4. Run
npm run dev

⚠️ NeonDB tables must exist. Run schema.sql if not already created. The files table requires UNIQUE (project_id, path) for upsert queries.


πŸ”‘ Environment Variables

Variable Required Description
DATABASE_URL βœ… NeonDB/PostgreSQL connection string
JWT_SECRET βœ… Secret for JWT token signing
NEXT_PUBLIC_APP_URL βœ… Public URL of your deployment
GITHUB_CLIENT_ID βœ… GitHub OAuth App client ID
GITHUB_CLIENT_SECRET βœ… GitHub OAuth App client secret
GOOGLE_CLIENT_ID βœ… Google OAuth client ID
GOOGLE_CLIENT_SECRET βœ… Google OAuth client secret
GROQ_API_KEY βœ… Groq API key for AI chat
CLOUDINARY_CLOUD_NAME ❌ Cloudinary cloud name (falls back to local)
CLOUDINARY_API_KEY ❌ Cloudinary API key
CLOUDINARY_API_SECRET ❌ Cloudinary API secret

πŸ“ Project Structure

codemapers/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ (auth)/login/        # Login page (GitHub/Google)
β”‚   β”œβ”€β”€ (dashbord)/
β”‚   β”‚   β”œβ”€β”€ dashboard/       # Project list + create
β”‚   β”‚   └── project/[id]/    # Main IDE page
β”‚   β”œβ”€β”€ api/                 # API routes
β”‚   β”‚   β”œβ”€β”€ auth/            # GitHub/Google OAuth
β”‚   β”‚   β”œβ”€β”€ ai/chat/         # Groq AI chat
β”‚   β”‚   β”œβ”€β”€ files/           # File CRUD
β”‚   β”‚   β”œβ”€β”€ projects/        # Project CRUD
β”‚   β”‚   └── github/          # GitHub sync
β”‚   └── components/          # UI components
β”‚       β”œβ”€β”€ editor/          # Monaco, Terminal, FileTree, ExpoPreview
β”‚       └── ai/              # ChatSidebar
β”œβ”€β”€ hooks/                   # useFileSystem, useWebContainer
β”œβ”€β”€ lib/                     # db, auth-utils, rate-limiter, cloudinary
└── tests/                   # Vitest test files

πŸ“‹ Keyboard Shortcuts

Shortcut Action
Ctrl + ` Toggle terminal
Ctrl + B Toggle file tree
Ctrl + \ Toggle AI chat
Ctrl + S Save current file

πŸ§ͺ Running Tests

npm test
βœ“ rate-limiter β€” IP-based rate limiting (20 req/min)
βœ“ templates β€” Expo/Vite/Next template generation
βœ“ auth-flow β€” OAuth state validation
βœ“ file-tree β€” FileTree component rendering
βœ“ example β€” Basic component test
βœ“ auth-env β€” Environment validation

πŸ“„ License

MIT License β€” see LICENSE


Built with β˜• & code by Rahul Patle

GitHub Website

About

A dedictaed code for mapping your progress to inhance your coding skill .. local community support with the along with seniors

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages