Skip to content

Deep Linking

Cameron Rye edited this page Nov 19, 2025 · 1 revision

Deep Linking

DosKit supports loading specific applications directly via URL parameters, making it easy to share links to specific DOS applications.

Basic Usage

Load Specific Applications

https://doskit.net/?app=secondreality
https://doskit.net/?app=impulsetracker

The app parameter specifies which DOS application to load automatically.

Features

Shareable Links

URLs automatically update when you select an app, making it easy to share:

  1. Select an application in DosKit
  2. Copy the URL from your browser's address bar
  3. Share the link with others
  4. They'll see the same application when they open the link

Bookmarkable

Save direct links to your favorite DOS applications:

  • Bookmark ?app=secondreality to quickly access Second Reality
  • Bookmark ?app=impulsetracker to jump straight to Impulse Tracker
  • Create a collection of bookmarks for different applications

Browser Navigation

The back and forward buttons work correctly:

  • Click back to return to the previous application
  • Click forward to go to the next application
  • Browser history is preserved

Refresh-Safe

Page refreshes maintain the loaded application:

  • Refresh the page and the same app stays loaded
  • No need to re-select the application
  • State is preserved across refreshes

Error Handling

Invalid app IDs show helpful error messages:

  • If the app ID doesn't exist, you'll see a clear error
  • The app selector will open automatically
  • You can choose a different application

Implementation

URL Format

https://doskit.net/?app=<app-id>

Where <app-id> is the unique identifier for the DOS application.

Available App IDs

Current applications:

  • secondreality - Second Reality (1993 demo by Future Crew)
  • impulsetracker - Impulse Tracker (1995 music tracker)

Programmatic Usage

You can also set the app programmatically:

import { setAppFromUrl, getAppFromUrl } from './utils/urlRouting';

// Get current app from URL
const appId = getAppFromUrl();

// Set app in URL
setAppFromUrl('secondreality');

Advanced Usage

Custom URL Parameters

You can extend the URL routing to support additional parameters:

// Example: Add timestamp parameter
https://doskit.net/?app=secondreality&time=120

Integration with Other Features

Deep linking works seamlessly with:

  • PWA installation - installed apps remember the last URL
  • Offline mode - cached apps load from URL even offline
  • Mobile devices - share links via mobile share sheet

Best Practices

For Developers

  1. Use descriptive app IDs - Make them memorable and meaningful
  2. Validate app IDs - Check if the app exists before loading
  3. Handle errors gracefully - Show helpful messages for invalid IDs
  4. Update URL on app change - Keep URL in sync with current app

For Users

  1. Share specific apps - Use deep links instead of just the homepage
  2. Bookmark favorites - Save direct links to frequently used apps
  3. Check the URL - Verify the app ID is correct before sharing

Troubleshooting

App Not Loading from URL

  1. Check the app ID is spelled correctly
  2. Verify the app exists in the application registry
  3. Check browser console for errors
  4. Try loading the app manually first

URL Not Updating

  1. Check that URL routing is enabled
  2. Verify browser supports History API
  3. Check for JavaScript errors in console

Future Enhancements

Planned features for deep linking:

  • Timestamp support - Start at specific time: ?app=demo&time=120
  • Save state links - Share links with saved state
  • Configuration parameters - Pass DOSBox config via URL
  • QR code generation - Generate QR codes for mobile sharing

Related Documentation


Made with ❤️ by Cameron Rye

Clone this wiki locally