A real-time collaborative code editor with terminal aesthetics, AI assistance, and security testing capabilities. Built with React, Node.js, and Socket.IO for secure, hacker-themed collaborative development.
- Room-based Collaboration: Create or join secure rooms with real-time participant management
- Terminal-Themed Interface: Hacker aesthetic with global terminal system for navigation and commands
- Real-time Code Synchronization: Instant code changes across all participants with conflict resolution
- Advanced File System: Integrated file explorer with create, edit, and delete operations
- Global Terminal System: Command-line interface for site navigation, room management, and system commands
- Audit Logs: Real-time monitoring and logging of all system activities and user actions
- AI Code Generation: Generate code using natural language prompts with execution flow visualization
- Security Testing Suite: Built-in security testing tools and vulnerability assessment
- Recent Rooms Persistence: Local storage of recent collaborative sessions for quick access
- Multi-language Support: JavaScript, TypeScript, Python, Java, C++, and more with syntax highlighting
- Responsive Design: Clean, modern interface optimized for collaborative coding sessions
/project-root
β
βββ client/ # React frontend application (Vite)
β βββ public/ # Static assets
β βββ src/
β β βββ components/ # UI components
β β β βββ CodeEditor.jsx # Monaco editor integration
β β β βββ FileExplorer.jsx # File system management
β β β βββ GlobalTerminal.jsx # Command-line interface
β β β βββ PromptInput.jsx # AI code generation input
β β β βββ RoomManager.jsx # Room creation/joining
β β β βββ ParticipantsList.jsx # Real-time participant display
β β β βββ TabSystem.jsx # Multi-file tab management
β β β βββ StatusBar.jsx # Editor status and info
β β β βββ ui/ # Reusable UI components
β β βββ contexts/ # React context providers
β β β βββ FileSystemContext.jsx # File system state management
β β β βββ useFileSystem.js # File system hooks
β β βββ pages/ # Page components
β β β βββ Home.jsx # Landing page
β β β βββ Dashboard.jsx # Main hub with recent rooms
β β β βββ Editor.jsx # Collaborative editor interface
β β β βββ SecurityTesting.jsx # Security testing tools
β β βββ App.jsx # Main app with routing
β β βββ main.jsx # Application entry point
β βββ package.json
β βββ vite.config.js
β
βββ server/ # Node.js backend (Express)
β βββ controllers/ # API controllers
β β βββ RoomController.js # Room management logic
β β βββ UserController.js # User authentication
β β βββ ModelController.js # AI model integration
β βββ routes/ # API routes
β β βββ roomRoutes.js # Room-related endpoints
β β βββ userRoutes.js # User management endpoints
β β βββ AIRouter.js # AI code generation routes
β βββ websocket/ # WebSocket handlers
β β βββ sockets.js # Real-time collaboration
β βββ middleware/ # Express middleware
β β βββ auth.js # Authentication middleware
β βββ model/ # Data models
β β βββ Rooms.js # Room data structure
β β βββ User.js # User data structure
β βββ db/ # Database configuration
β β βββ connection.js # Database connection setup
β βββ utils/ # Utility functions
β βββ main.js # Server entry point
β βββ package.json
β
βββ README.md
- Node.js (v18 or higher)
- npm or yarn
-
Navigate to the server directory:
cd server -
Install dependencies:
npm install
-
Create a
.envfile in the server directory:PORT=3001 MONGODB_URI=mongodb://localhost:27017/overlook JWT_SECRET=your-secret-key
-
Start the server:
npm run dev
The backend will run on http://localhost:3001
-
Navigate to the client directory:
cd client -
Install dependencies:
npm install
-
Start the development server:
npm run dev
The frontend will run on http://localhost:5173
The application uses React Router DOM for navigation with the following routes:
/- Home page with landing content and feature overview/dashboard- Main hub with recent rooms and terminal interface/editor- Collaborative code editor with real-time features/security-testing- Security testing tools and vulnerability assessment
The global terminal system provides command-line navigation and room management:
help- Display available commandshome- Navigate to home pagedashboard- Navigate to dashboardeditor- Navigate to editorsecurity- Navigate to security testingcreate-room- Create a new collaborative roomjoin-room <room-id>- Join an existing roomlist-rooms- Display available roomsclear- Clear terminal output
- Open the application in your browser
- Use the terminal command
create-roomor click "Create Room" in the dashboard - A unique room ID will be generated and displayed
- Share the room ID with collaborators
- Use the terminal command
join-room <room-id>or enter the room ID in the dashboard - The system will connect you to the collaborative session
- All participants will be notified of your arrival
- Code changes sync in real-time across all participants
- Use the file explorer to create and manage project files
- The Monaco editor provides syntax highlighting, IntelliSense, and multi-language support
- Audit logs track all activities and changes in the session
- Create new files and folders through the file explorer
- Edit files with full syntax highlighting
- Tab-based interface for managing multiple open files
- All file operations sync across participants
- Enter a natural language prompt in the AI assistant panel
- Click "Generate Code" or press Enter
- View the execution flow and progress in the prompt input area
- Generated code appears in the editor and syncs to all participants
- Navigate to the security testing page
- Use built-in tools to scan for vulnerabilities
- Review security reports and recommendations
- Terminal-themed interface maintains consistent aesthetic
- Recently accessed rooms are automatically saved to local storage
- Quick access from the dashboard for resuming previous sessions
- Persistent across browser sessions
POST /api/rooms/create- Create a new collaborative roomPOST /api/rooms/join/:roomId- Join an existing roomGET /api/rooms/:roomId- Get room information and participantsPOST /api/rooms/leave/:roomId- Leave a roomGET /api/rooms- Get all active rooms
POST /api/users/login- User authenticationPOST /api/users/register- User registrationGET /api/users/profile- Get user profile information
POST /api/ai/generate- Generate code from natural language prompts
GET /api/files/:roomId- Get room file structurePOST /api/files/:roomId- Create or update filesDELETE /api/files/:roomId/:filePath- Delete files
join-room- Join a collaborative roomleave-room- Leave current roomcode-change- Send incremental code changesfile-operation- File system operations (create, edit, delete)terminal-command- Execute terminal commandsaudit-log- Send audit log entries
room-joined- Confirmation of room join with participant listroom-left- Confirmation of room departurecode-updated- Receive code synchronization updatesfile-updated- File system change notificationsuser-joined- New participant joined notificationuser-left- Participant departure notificationterminal-output- Terminal command responsesaudit-update- Real-time audit log updateserror- Error messages and notifications
The project follows clean architecture with clear separation of concerns:
- Frontend: React 18 with Vite, featuring component-based architecture and context providers
- Backend: Express.js with modular controllers, routes, and middleware
- WebSocket: Socket.IO for real-time bidirectional communication
- File System: Context-based state management for collaborative file operations
- Terminal System: Command-line interface integrated throughout the application
- Security: Built-in security testing and audit logging capabilities
- Real-time Collaboration: WebSocket-based synchronization with operational transformation
- Terminal Integration: Global command system with navigation and room management
- File System Context: React context for managing collaborative file operations
- Audit Logging: Comprehensive activity tracking and real-time monitoring
- Security Testing: Integrated security assessment tools
- Persistent Sessions: Local storage for recent rooms and user preferences
- AI Integration: Replace mock AI in
ModelController.jswith preferred AI service - Authentication: Enhance JWT implementation in
middleware/auth.js - Database: Implement persistent storage for rooms, users, and file data
- Security Tools: Extend security testing capabilities in
SecurityTesting.jsx - Terminal Commands: Add custom commands in
GlobalTerminal.jsx - Themes: Modify Tailwind configuration for custom terminal aesthetics
- Start both backend and frontend servers
- Open multiple browser tabs/windows
- Test terminal commands:
help,create-room,join-room - Create a room and verify real-time synchronization
- Test file operations in the file explorer
- Verify audit logs display system activities
- Test AI code generation and execution flow
- Use security testing tools
- Run
npm testin both client and server directories - Test WebSocket connections and real-time features
- Verify file system operations across multiple clients
- Test terminal command parsing and execution
- Validate audit log accuracy and real-time updates