HosteDay Documentation Official Documentation

Complete Guide to Hosteday for VS Code

Installation, secure OAuth & SSH token authentication, schema & dynamic routes explorer, hosteday_config.json & Firebase sync, GitHub starter generator, API Playground, IntelliSense, and Realtime monitor.

Complete Guide to Hosteday for VS Code (hosteday.hosteday-vscode)

The official Hosteday for VS Code extension connects your editor directly to the Hosteday Control Plane (dash.hosteday.com) so you can browse environments, SQL schemas, and dynamic routes; sync hosteday_config.json and Firebase files; scaffold full starter projects and CRUD code; test endpoints in the built-in REST API Playground; and stream live Reverb WebSocket events without leaving VS Code.


1. Installation & Quick Start

A. Install via Quick Open or Visual Studio Marketplace

Open Quick Open (Ctrl+P on Windows/Linux or Cmd+P on macOS) and run:

ext install hosteday.hosteday-vscode

B. Install via Terminal CLI

code --install-extension hosteday.hosteday-vscode

C. Offline / Direct .vsix Installation

curl -L -o hosteday-vscode-{{vscode_ext_bare_version}}.vsix \
  https://github.com/mustafa3max/hosteday-vscode/releases/download/{{vscode_ext_version}}/hosteday-vscode-{{vscode_ext_bare_version}}.vsix

code --install-extension hosteday-vscode-{{vscode_ext_bare_version}}.vsix

2. Authentication & Security

A. Browser OAuth (Hosteday: Sign In)

  • Opens https://dash.hosteday.com/ide/connect?state=<uuid>&device_name=<editor>&scheme=<scheme> in your browser.
  • Automatically detects the editor URI scheme (vscode://, vscode-insiders://, cursor://, windsurf://).
  • Enforces strict CSRF protection via crypto.timingSafeEqual with a 10-minute state expiration window on /auth-callback.

B. Access Token (Hosteday: Sign In with Access Token)

  • Built for Remote SSH and GitHub Codespaces environments where a local browser cannot invoke the IDE URI handler.
  • Validates the token immediately via GET /api/ide/me before storing the session.

C. Encrypted Storage & Origin Lock

  • Tokens are stored exclusively in OS-encrypted vscode.SecretStorage and revoked server-side via DELETE /api/ide/tokens/current on Hosteday: Sign Out.
  • Enforces Origin Lock and Path Traversal Guard so Authorization and X-Api-Token headers are never sent to any host outside https://dash.hosteday.com or *.hosteday.com.

3. Environments, Schema & Routes Explorer

The Hosteday Activity Bar view displays:

  1. A clickable SDK Target selector at the top of the tree.
  2. Create Full Starter Project once a language target is selected.
  3. All active owner and team environments with role badges (owner, admin, developer), status indicators, and a (Linked) tag for the active workspace environment.
  4. Expanding an environment reveals:
    • Tables & Schema: SQL column types, primary keys (PK), and nullable flags.
    • Dynamic Routes: Merged /schema and /routes endpoints (GET, POST, PUT, PATCH, DELETE) with auth/public status.

4. Project Language Target, Config & Firebase Sync

A. Mandatory Language Lock (hosteday.projectType)

Config and Firebase download actions remain locked until you explicitly select your target language via Hosteday: Select Project Language / Type (flutter, kotlin, python, web).

B. hosteday_config.json Paths (Hosteday: Download Config)

Platform Target Path Behavior
Flutter assets/hosteday_config.json Creates assets/ automatically if missing
Kotlin / Android app/src/main/assets/hosteday_config.json Creates assets/ inside app/src/main/ when present
Python hosteday_config.json Placed at workspace root
Web hosteday_config.json Placed at workspace root

C. Firebase Files (Hosteday: Setup Firebase Files — No Auto-Mkdir Rule)

Firebase client files strictly follow the No Auto-Mkdir rule (written only into existing platform directories):

  • Flutter: android/app/google-services.json (or android/google-services.json), ios/Runner/GoogleService-Info.plist, web/firebase-config.json, and web/firebase-messaging-sw.js with your real firebaseConfig injected automatically.
  • Kotlin / Android: app/google-services.json (or android/app/google-services.json).
  • Web: firebase-config.json and firebase-messaging-sw.js in public/ or workspace root.
  • Python: Disabled since Firebase client config files apply to Flutter, Kotlin, and Web targets.

5. Create Full Starter Project from Official GitHub Examples

  • Downloads live examples via the GitHub Git Trees API from:
    • mustafa3max/hosteday-flutter
    • mustafa3max/hosteday-kotlin
    • mustafa3max/hosteday-python
  • Strict Empty Workspace Guard: Displays a modal confirmation (modal: true) before clearing any non-empty workspace folder.
  • Automatic Latest SDK Resolution:
    • Flutter: Replaces local path: ../ in pubspec.yaml with the latest version from pub.dev.
    • Kotlin: Updates build.gradle.kts from JitPack / Maven Central.
    • Python: Updates requirements.txt and pyproject.toml from PyPI.
  • Automatically injects hosteday_config.json and Firebase files and opens the main entry file.

6. Unified Hosteday > Menus, Code Scaffolding & Schema Drift Detector

Two unified Hosteday submenus keep actions cleanly scoped:

  • Explorer (Explorer > Hosteday):
    • Download Config (hosteday_config.json)
    • Setup Firebase Files (Android / iOS / Web)
    • New Component / Feature... (Bootstrap Service, BaseHostedayController, Auth Service, Realtime Manager, Table Feature Modules protected by One-Time Creation Guard)
    • Select Project Language / Type
  • Editor (Editor > Hosteday) & Shortcut Ctrl+Alt+H / Cmd+Alt+H:
    • Contextual Code Actions... adapts to editor_entrypoint vs editor_code_file contexts.
    • Schema Drift Detector: Compares your local model fields against the live environment schema and highlights missing or changed columns.

7. Built-in Interactive REST API Playground (Hosteday: Open API Playground)

  • Executes requests inside the Extension Host (zero CORS restrictions, enforced Origin Lock, and automatic X-Api-Token injection without exposing secrets to the Webview).
  • Auto-fills JSON request bodies from the live table schema, with smart user_id handling after quick sign-in (POST /api/auth/login).
  • Includes a Laravel filter builder (filters[column]=value), syntax-highlighted JSON response viewer, Copy Response JSON, and Copy as SDK Code.

8. Smart IntelliSense & Hover Docs

Supports dart, kotlin, python, typescript, and javascript:

  • Autocompletes table names and dynamic routes inside Hosteday.client.* and Hosteday.http.* calls.
  • Autocompletes column names inside filters and body payloads.
  • Shows live Markdown Hover cards summarizing table columns, SQL types, and available routes.

9. Live Realtime Monitor (Hosteday: Listen to Realtime Channel)

  • Connects directly over WebSockets to your environment's Laravel Reverb / Pusher v7 node:
    wss://{realtime_host}:{realtime_port}/app/{realtime_app_key}?protocol=7&client=hosteday_vscode&version=1.0.0&flash=false
    
  • Sends pusher:ping heartbeats every 120 seconds automatically.
  • Streams formatted JSON event payloads live in Output > Hosteday Realtime.
  • Stop listening and clean up timers anytime with Hosteday: Stop Realtime Listener.

10. Complete Commands & Settings Reference

A. Configuration Settings (3)

Key Type Default Description
hosteday.dashboardUrl string "https://dash.hosteday.com" Control plane base URL (Origin-locked to *.hosteday.com)
hosteday.linkedEnvironmentId string "" Hosteday environment UUID linked to the current workspace
hosteday.projectType enum ("", flutter, kotlin, python, web) "" Explicitly selected project language target for config, Firebase, and starter generation

B. Registered Commands (17 — category: "Hosteday")

Command ID Title Description
hosteday.signIn Sign In Sign in via Browser OAuth with CSRF state verification
hosteday.signInWithToken Sign In with Access Token Manual token sign-in for SSH and GitHub Codespaces
hosteday.signOut Sign Out Revoke token server-side and clear SecretStorage
hosteday.refresh Refresh Environments & Schema Refresh environments, tables, routes, and IntelliSense cache
hosteday.selectProjectType Select Project Language / Type Select target project language (flutter, kotlin, python, web)
hosteday.createStarterProject Create Full Starter Project Download a full starter project from official GitHub examples
hosteday.linkEnvironment Link Workspace to Environment Link the workspace to an environment and write hosteday_config.json
hosteday.fetchHostedayConfig Download Config (hosteday_config.json) Download hosteday_config.json to the standard platform path
hosteday.fetchFirebaseConfigs Setup Firebase Files (Android / iOS / Web) Download Firebase configs and firebase-messaging-sw.js
hosteday.syncConfigFiles Fetch & Place Config & Firebase Files Sync config and Firebase files into existing platform folders
hosteday.explorerNewMenu New Component / Feature... Scaffold Hosteday components with one-time creation guard
hosteday.generateTableCode Generate Model & Repository for Table Generate Model and Repository files for a table
hosteday.codeWizard Contextual Code Actions... Context-aware code wizard (Ctrl+Alt+H / Cmd+Alt+H) & Schema Drift Detector
hosteday.openApiPlayground Open API Playground Open the built-in interactive REST API Playground
hosteday.listenRealtime Listen to Realtime Channel Stream live Reverb/Pusher events in OutputChannel
hosteday.stopRealtime Stop Realtime Listener Close WebSocket listener and clean up timers
hosteday.openDashboard Open Dashboard Open dash.hosteday.com in the browser