Skip to content

devstroop/web-ide

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

WebIDE

A modern, lightweight web-based IDE built with Rust and React.

License Backend Frontend


✨ Features

  • Monaco Editor - VS Code editing experience in the browser
  • Multi-file Editing - Tabs, split views, markdown preview
  • Integrated Terminal - Full PTY terminal with multiple sessions
  • Git Integration - Status, commit, push, pull, branch management
  • File Management - Tree view, create, rename, delete, search
  • Workspace Support - Multiple isolated project workspaces
  • Theme Support - Light/Dark/System theme modes
  • Fast & Lightweight - Rust backend with minimal resource usage

πŸ“Έ Screenshots

Coming soon


πŸš€ Quick Start

Using Docker (Recommended)

# Clone the repository
git clone https://github.com/your-org/web-ide.git
cd web-ide

# Start with Docker Compose
docker compose up

# Open in browser
open http://localhost:8080

Development Setup

# Terminal 1: Start Backend
cd backend
cp .env.example .env
cargo run

# Terminal 2: Start Frontend (with hot reload)
cd frontend
npm install
npm run dev

# Open http://localhost:5173

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         Browser                              β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚  React 19 + TypeScript + Vite                       β”‚    β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚    β”‚
β”‚  β”‚  β”‚ Monaco  β”‚ β”‚ xterm.jsβ”‚ β”‚ File    β”‚ β”‚ Git     β”‚   β”‚    β”‚
β”‚  β”‚  β”‚ Editor  β”‚ β”‚ Terminalβ”‚ β”‚ Tree    β”‚ β”‚ Panel   β”‚   β”‚    β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚    β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚    β”‚
β”‚  β”‚  β”‚ Zustand State β”‚ shadcn/ui β”‚ Tailwind CSS    β”‚   β”‚    β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚                          β”‚ HTTP/WS/Socket.IO                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Rust Backend                              β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚  Axum HTTP Server                                   β”‚    β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚    β”‚
β”‚  β”‚  β”‚ File    β”‚ β”‚ Git     β”‚ β”‚Terminal β”‚ β”‚ WS      β”‚   β”‚    β”‚
β”‚  β”‚  β”‚ API     β”‚ β”‚ API     β”‚ β”‚ PTY     β”‚ β”‚ Events  β”‚   β”‚    β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚    β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚    β”‚
β”‚  β”‚  β”‚ SQLite   β”‚ git2     β”‚ portable-pty β”‚ tokio  β”‚   β”‚    β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚                          β”‚                                   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                           β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”
                    β”‚  Workspace  β”‚
                    β”‚  Directory  β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“ Project Structure

web-ide/
β”œβ”€β”€ backend/                 # Rust backend (Axum)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ api/            # HTTP API handlers
β”‚   β”‚   β”œβ”€β”€ db/             # SQLite database
β”‚   β”‚   β”œβ”€β”€ git/            # Git operations (git2)
β”‚   β”‚   β”œβ”€β”€ terminal/       # PTY terminal (portable-pty)
β”‚   β”‚   β”œβ”€β”€ ws/             # WebSocket handlers
β”‚   β”‚   └── main.rs
β”‚   β”œβ”€β”€ migrations/         # SQLx migrations
β”‚   └── Cargo.toml
β”œβ”€β”€ frontend/               # React frontend (Vite)
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ api/            # API client layer
β”‚   β”‚   β”œβ”€β”€ components/     # React components
β”‚   β”‚   β”œβ”€β”€ hooks/          # Custom hooks
β”‚   β”‚   β”œβ”€β”€ stores/         # Zustand stores
β”‚   β”‚   └── main.tsx
β”‚   β”œβ”€β”€ package.json
β”‚   └── vite.config.ts
β”œβ”€β”€ docs/                   # Documentation
β”‚   β”œβ”€β”€ README.md          # Documentation index
β”‚   β”œβ”€β”€ backend/           # Backend architecture docs
β”‚   └── frontend/          # Frontend architecture docs
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ CHANGELOG.md
└── README.md

πŸ”§ Configuration

Backend Environment

Variable Default Description
PORT 8080 HTTP server port
WORKSPACE_DIR /workspace Base workspace directory
DATABASE_URL sqlite:webide.db SQLite database path
RUST_LOG info Log level

Frontend Environment

Variable Default Description
VITE_API_URL http://localhost:8080 Backend API URL
VITE_FILE_WATCHER_ENABLED false Enable file watcher WebSocket

πŸ“‘ API Overview

REST Endpoints

Endpoint Description
GET /api/workspaces List all workspaces
GET /api/workspaces/:key/files List files in workspace
PUT /api/workspaces/:key/files/content Save file
GET /api/workspaces/:key/git/status Git status
POST /api/workspaces/:key/git/commit Git commit

Real-time

Protocol Endpoint Purpose
WebSocket /ws/:key File watcher events
Socket.IO /socket.io Terminal I/O

Full API documentation: issues/ISSUES.md


🐳 Docker

Production

# Full stack (backend + frontend)
docker compose up webide

# Access at http://localhost:8080

Development

# Backend only + Frontend dev server with hot reload
docker compose --profile dev up

# Backend at :8080, Frontend at :5173

πŸ§ͺ Testing

# Backend tests
cd backend
cargo test

# Frontend tests
cd frontend
npm test

πŸ“ Documentation


🀝 Contributing

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

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published