A robust, cross-platform foundation for running DOS applications using js-dos WebAssembly technology. This project works seamlessly across different platforms (Windows, macOS, Linux) and devices (desktop, mobile, tablet).
- Interactive DOS Prompt: Boots directly to a fully functional DOS command prompt
- Cross-Platform: Works on Windows, macOS, Linux, iOS, and Android
- Progressive Web App (PWA): Install as a native app with offline support
- Deep Linking: Load specific applications directly via URL (e.g.,
?app=secondreality) - Offline Functionality: Works completely offline after first visit
- Modern Tech Stack: Built with React 19, TypeScript, and Vite
- WebAssembly Performance: Leverages js-dos v8.3.20 for near-native DOS emulation
- Full Keyboard Support: All standard DOS keyboard inputs including function keys and special characters
- Audio Support: Sound Blaster and AdLib emulation with proper audio output
- Responsive Design: Optimized for desktop, tablet, and mobile devices
- Touch Controls: Mobile-friendly on-screen keyboard for touch devices
- Type-Safe: Full TypeScript support with comprehensive type definitions
- Service Worker Caching: Fast loading with intelligent cache management
- Quick Start
- Live Demo
- PWA Features
- Technology Stack
- Project Structure
- Development
- Deployment
- Configuration
- Usage
- Browser Compatibility
- Troubleshooting
- License
- Node.js 18+ (recommended: 24.4.1 or later)
- npm 9+ or yarn 1.22+
- Clone the repository:
git clone https://github.com/cameronrye/doskit.git
cd doskit- Install dependencies:
npm install- Start the development server:
npm run dev- Open your browser and navigate to
http://localhost:5173
The DOS emulator will automatically load and present an interactive DOS prompt!
Try it now: https://doskit.net/
The live demo is automatically deployed from the main branch using GitHub Actions. Every push to main triggers a new deployment.
DosKit is a fully-featured Progressive Web App that can be installed on your device and works offline!
- Installable: Install DosKit as a native app on desktop and mobile
- Offline Support: Works completely offline after first visit
- Fast Loading: Service worker caches assets for instant loading
- Native Experience: Standalone mode without browser UI
- Auto-Updates: Automatic updates when new versions are available
- Connection Status: Real-time online/offline indicator
Desktop (Chrome/Edge/Brave):
- Visit the live demo
- Click the install icon (⊕) in the address bar
- Click "Install" to add to your desktop
Mobile (Android):
- Visit the live demo in Chrome
- Tap "Add to Home screen" from the menu
- Launch from your home screen
Mobile (iOS):
- Visit the live demo in Safari
- Tap Share → "Add to Home Screen"
- Launch from your home screen
DosKit includes Progressive Web App (PWA) capabilities for offline functionality and app-like experience. See the main documentation sections above for PWA-related features.
- React 19.2.0 - Modern UI framework with latest features
- TypeScript 5.9.3 - Type-safe JavaScript
- Vite 7.1.14 - Next-generation frontend tooling (Rolldown variant)
- js-dos 8.3.20 - WebAssembly DOS emulator
- Fast Development: Hot Module Replacement (HMR) for instant feedback
- Modern Build: Optimized production builds with code splitting
- Developer Experience: Excellent TypeScript integration and tooling
- Experimental Rolldown: This project uses the experimental Rolldown variant of Vite 7 for improved build performance. Rolldown is a Rust-based bundler that aims to replace Rollup in Vite. While experimental, it provides faster builds and better tree-shaking. For production use, you may want to switch to the stable Vite release by changing
viteto the standard version inpackage.json.
- Latest Stable: Most recent version with bug fixes and improvements
- WebAssembly: High-performance emulation (80-90% of native speed)
- Cross-Platform: Works in all modern browsers and Node.js
- Multiple Backends: Supports both DOSBox and DOSBox-X
- Active Development: Regular updates and community support
- Type Safety: Catch errors at compile time
- Better IDE Support: Autocomplete and inline documentation
- Maintainability: Easier to refactor and scale
doskit/
├── docs/ # Documentation
│ └── js-dos-llm-reference.md # Comprehensive js-dos API reference
├── public/ # Static assets (logos, favicons)
├── src/
│ ├── components/ # React components
│ │ ├── DosPlayer.tsx # Main DOS emulator component
│ │ └── DosPlayer.css # Component styles
│ ├── config/ # Configuration files
│ │ ├── dosbox.conf.ts # DOSBox configurations
│ │ └── jsdos.config.ts # js-dos settings
│ ├── dos-apps/ # DOS applications and games
│ ├── hooks/ # Custom React hooks
│ ├── types/ # TypeScript type definitions
│ │ └── js-dos.d.ts # js-dos type definitions
│ ├── utils/ # Utility functions
│ ├── App.tsx # Main application component
│ ├── App.css # Application styles
│ ├── main.tsx # Application entry point
│ └── index.css # Global styles
├── .gitignore
├── eslint.config.js # ESLint configuration
├── index.html # HTML entry point
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── vite.config.ts # Vite configuration
└── README.md # This file
# Show all available scripts with descriptions
npm run help
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
# Run linter
npm run lint
# Run tests
npm run test
# Run tests with UI
npm run test:ui
# Run tests once (CI mode)
npm run test:run
# Run tests with coverage
npm run test:coverageTip: Run
npm run helpanytime to see a formatted list of all available commands!
- Start the dev server:
npm run dev - Make changes: Edit files in
src/ - See changes instantly: Vite HMR updates the browser automatically
- Test: Interact with the DOS prompt to verify functionality
- Build: Run
npm run buildto create production bundle
DosKit is configured for automatic deployment to GitHub Pages.
- Enable GitHub Pages in repository settings (Settings → Pages → Source: GitHub Actions)
- Push to main branch:
git push origin main - Monitor deployment: Check the Actions tab
- Visit your site:
https://cameronrye.github.io/doskit/
The site automatically rebuilds and deploys on every push to main.
DosKit uses fully automated releases with release-please:
- Use conventional commits:
feat:,fix:, etc. - Merge PR to main: That's it!
- release-please bot: Automatically creates a Release PR
- Merge Release PR: Automatic GitHub release with artifacts
See docs/RELEASE-PROCESS.md for details on conventional commits.
DosKit uses DOSBox configuration files to customize the DOS environment. The default configuration is located in src/config/dosbox.conf.ts.
Key Configuration Options:
import { defaultDosboxConfig } from './config/dosbox.conf';
// Use the default configuration
<DosPlayer dosboxConf={defaultDosboxConfig} />Custom Configuration Example:
const customConfig = `
[cpu]
core=auto
cycles=max
[autoexec]
@echo off
echo Welcome to My DOS App!
mount c .
c:
myapp.exe
`;
<DosPlayer dosboxConf={customConfig} />Customize the emulator behavior with js-dos options in src/config/jsdos.config.ts:
import { DosPlayer } from './components/DosPlayer';
<DosPlayer
options={{
theme: 'dark',
volume: 0.7,
fullScreen: false,
autoStart: true,
}}
/>Available Options:
theme: 'dark' or 'light'volume: 0.0 to 1.0fullScreen: Enable fullscreen modeautoStart: Auto-start emulator on loadbackend: 'dosbox' or 'dosboxX'mouseCapture: Auto-capture mouse input- See
src/types/js-dos.d.tsfor complete options
DosKit automatically detects mobile devices and applies optimized settings:
- Larger touch controls
- On-screen keyboard with common DOS keys
- Optimized aspect ratio for mobile screens
The simplest way to use DosKit is to run the development server:
npm run devThis will start a DOS prompt that you can interact with directly in your browser.
DosKit supports loading specific applications directly via URL parameters, making it easy to share links to specific DOS applications:
Load Second Reality:
https://doskit.net/?app=secondreality
Load Impulse Tracker:
https://doskit.net/?app=impulsetracker
Features:
- Shareable Links: URLs automatically update when you select an app
- Bookmarkable: Save direct links to your favorite DOS applications
- Browser Navigation: Back/forward buttons work correctly
- Refresh-Safe: Page refreshes maintain the loaded application
- Error Handling: Invalid app IDs show helpful error messages
To run DOS applications or games:
- Create a custom DOSBox configuration:
const gameConfig = `
[autoexec]
@echo off
mount c .
c:
cd MYGAME
game.exe
`;-
Place your DOS files in the public directory or use the
initFsoption to load files programmatically. -
Update the DosPlayer component:
<DosPlayer dosboxConf={gameConfig} />Access the Command Interface for programmatic control:
import { useState } from 'react';
import { DosPlayer } from './components/DosPlayer';
import type { CommandInterface } from './types/js-dos';
function MyApp() {
const [ci, setCi] = useState<CommandInterface | null>(null);
const handleReady = (commandInterface: CommandInterface) => {
setCi(commandInterface);
// Now you can control DOS programmatically
commandInterface.simulateKeyPress(13); // Press Enter
};
return <DosPlayer onReady={handleReady} />;
}Available Commands:
ci.pause()/ci.resume()- Control emulationci.mute()/ci.unmute()- Audio controlci.screenshot()- Capture screenci.fsReadFile()/ci.fsWriteFile()- File system access- See
src/types/js-dos.d.tsfor complete API
DosKit works on all modern browsers that support WebAssembly:
- Chrome/Edge 90+ (Recommended)
- Firefox 88+
- Safari 15+
- Opera 76+
- Chrome Mobile (Android)
- Safari Mobile (iOS 15+)
- Firefox Mobile
- Samsung Internet
- WebAssembly support (required)
- JavaScript enabled
- Minimum 2GB RAM recommended
- Modern GPU for WebGL rendering (optional but recommended)
| Feature | Chrome 90+ | Firefox 88+ | Safari 15+ | Edge 90+ | Mobile |
|---|---|---|---|---|---|
| WebAssembly | Yes | Yes | Yes | Yes | Yes |
| Service Workers | Yes | Yes | Yes | Yes | Yes |
| PWA Install | Yes | Yes | Yes | Yes | Yes |
| Fullscreen API | Yes | Yes | Yes | Yes | Partial |
| Keyboard Lock | Yes | No | No | Yes | No |
| Audio | Yes | Yes | Yes | Yes | Yes |
| Touch Controls | N/A | N/A | N/A | N/A | Yes |
| Offline Mode | Yes | Yes | Yes | Yes | Yes |
Tested on various devices with Second Reality demo:
| Device | Browser | Load Time | FPS | Notes |
|---|---|---|---|---|
| Desktop (i7, 16GB) | Chrome 120 | ~2s | 60 | Optimal |
| MacBook Pro M1 | Safari 17 | ~2s | 60 | Excellent |
| Desktop (i5, 8GB) | Firefox 121 | ~3s | 55-60 | Very Good |
| iPad Pro 2021 | Safari 17 | ~3s | 50-60 | Good |
| iPhone 13 | Safari 17 | ~4s | 45-55 | Good |
| Android (mid-range) | Chrome 120 | ~5s | 40-50 | Acceptable |
| Android (low-end) | Chrome 120 | ~8s | 25-35 | Playable |
Load times include network fetch and initialization. FPS varies by DOS application complexity.
- iOS Safari < 15: Limited WebAssembly support
- Internet Explorer: Not supported (no WebAssembly)
- Older Android browsers: May have performance issues
- Keyboard Lock API: Only supported in Chrome/Edge (not critical for functionality)
Problem: js-dos failed to load from CDN.
Solutions:
- Check your internet connection
- Verify CDN is accessible: https://v8.js-dos.com/latest/js-dos.js
- Check browser console for CORS or network errors
- Try refreshing the page
- Clear browser cache
Problem: Emulator loads but shows black screen.
Solutions:
- Check browser console for errors
- Verify WebAssembly is supported:
typeof WebAssembly !== 'undefined' - Try a different browser
- Disable browser extensions that might interfere
- Check if hardware acceleration is enabled
Problem: Emulator runs slowly.
Solutions:
- Reduce CPU cycles in DOSBox config:
cycles=10000 - Enable hardware acceleration in browser settings
- Close other browser tabs
- Try a different rendering backend:
renderBackend: 'canvas' - Reduce screen resolution if possible
Problem: Keyboard input not registering.
Solutions:
- Click inside the emulator window to focus it
- Check if browser has focus (not in another tab)
- Try clicking the "Play" button if visible
- On mobile, use the on-screen keyboard
- Check browser console for errors
Problem: No sound from DOS applications.
Solutions:
- Audio is automatically unmuted when the emulator is ready (as of latest version)
- Check browser audio is not muted (system volume and browser tab)
- Verify volume setting:
volume: 0.7in options - Click inside emulator to ensure user interaction (required by browsers)
- Check if DOS application has sound enabled in its settings
- Verify DOSBox sound card configuration (Sound Blaster, GUS, etc.)
- Check browser console for audio-related errors
Note: Modern browsers require user interaction before audio can play. The emulator automatically unmutes audio when you interact with it (click play or click inside the emulator window).
Problem: On-screen keyboard missing on mobile.
Solutions:
- Verify you're on a mobile device (check user agent)
- Check mobile configuration is applied
- Try portrait and landscape orientations
- Refresh the page
- Check
softKeyboardLayoutin config
Problem: App not updating to latest version.
Solutions:
- Click "Update Available" notification when it appears
- Hard refresh: Ctrl+Shift+R (Windows/Linux) or Cmd+Shift+R (Mac)
- Clear browser cache and reload
- Unregister service worker in DevTools > Application > Service Workers
- Close all tabs and reopen
Problem: DOS application files fail to download.
Solutions:
- Check internet connection
- Verify GitHub/CDN is accessible
- Check browser console for CORS errors
- Try again later (may be rate limited)
- Check if using VPN or proxy that might block requests
Problem: Browser using too much memory.
Solutions:
- Close other browser tabs
- Reduce DOSBox memory:
memsize=16in config - Clear browser cache
- Restart browser
- Use a 64-bit browser if available
Enable detailed logging in development:
// Logs are automatically enabled in development mode
// Check browser console for detailed information
// Use logger utility for custom logging:
import { logger } from "./utils/logger";
logger.debug("Debug message");- Reduce CPU cycles for better battery life on mobile
- Enable hardware acceleration in browser settings
- Use cache-first mode for offline performance
- Close unused tabs to free up memory
- Disable browser extensions that might interfere
If you encounter issues not covered here:
- Check the browser console for error messages
- Review js-dos documentation: https://js-dos.com
- Check existing issues: https://github.com/cameronrye/doskit/issues
- Open a new issue: Include browser version, OS, and console errors
- Read ARCHITECTURE.md: For technical details
- Include:
- Browser and version
- Operating system
- Error messages from console
- Steps to reproduce
This project is licensed under the MIT License - see the LICENSE file for details.
- js-dos: GPL-2.0 License - https://github.com/caiiiycuk/js-dos
- React: MIT License
- DOSBox: GPL-2.0 License
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
- js-dos by caiiiycuk - For the amazing WebAssembly DOS emulator
- DOSBox team - For the original DOS emulation
- React team - For the excellent UI framework