A web-based terminal emulator with an integrated file system, built using xterm.js and Node.js. This project provides a fully functional terminal experience in the browser with persistent file storage and multiple tab support.
- xterm.js Integration: Full-featured terminal emulator with cursor support and theming
- Multiple Tabs: Support for up to 8 concurrent terminal sessions
- Dark/Light Theme: Toggle between light and dark modes
- Complete Unix-like Commands: Support for essential file operations
ls- List directory contentsmkdir- Create directoriestouch- Create filescd- Change directorypwd- Print working directorymv- Move/rename files and directoriescp- Copy files and directoriesrm- Remove files and directoriesecho- Display textcat- Display file contents
- Ace Editor Integration: Full-featured code editor with syntax highlighting
- File Editing: Create and edit files directly in the terminal interface
- Multiple File Support: Edit various file types with appropriate syntax highlighting
- SQLite Database: Persistent file system storage using Sequelize ORM
- Save/Load State: Preserve your file system between sessions
- Local File Upload: Add files from your local machine to the terminal file system
- Download Terminal Logs: Export your terminal session history
- File System Export: Save your entire virtual file system as a downloadable archive
- Express.js Backend: RESTful API for file system operations
- CORS Support: Cross-origin resource sharing enabled
- SQLite Integration: Lightweight database for data persistence
- Frontend: HTML5, CSS3, JavaScript (ES6+)
- Terminal: xterm.js - Terminal emulator for the web
- Editor: Ace Editor - Code editor
- Backend: Node.js with Express.js
- Database: SQLite with Sequelize ORM
- File Handling: JSZip for archive operations
-
Clone the repository:
git clone [repository-url] cd Mini_Terminal -
Install dependencies:
npm install
-
Start the server:
npm start
-
Open your browser and navigate to:
http://localhost:3000
- Type commands in the terminal just like a regular Unix terminal
- Use
helpto see available commands - Use
man <command>for detailed command documentation
- Click "Open New Terminal Tab" to create additional terminal sessions
- Click "Close Current Terminal Tab" to close the active tab
- Switch between tabs using the navigation buttons
- Click "Save Terminal File System" to persist your current state
- Your file system will automatically load when you restart the application
- Use "Add Local File" to upload files from your computer
- Click the - Click the moon (🌙) icon to switch to dark mode
- Click the sun (☀️) icon to switch back to light mode
Mini_Terminal/
├── src/ # Core terminal functionality
│ ├── terminal_core_generator.js # Terminal initialization and setup
│ ├── terminal_setup_core_and_commands.js # Command implementations
│ ├── editor_utils.js # Text editor integration
│ └── editor_utils.css # Editor styling
├── lib/ # External libraries
├── routes/ # Express.js API routes
├── server.js # Main server file
├── index.html # Main application interface
├── index.css # Application styling
├── package.json # Node.js dependencies
└── README.md # This file
POST /api/fs/save- Save the current file system stateGET /api/fs/load- Load the saved file system state
- Vicayo Zhang
- Aryan Ghosh
- Stella Dey
Built for CS 326 - A collaborative project demonstrating web-based terminal emulation and file system management.