Files
ServerKit/frontend
Juan DenisandClaude Opus 4.8 ddff69020b feat(workspaces): active-workspace selector + ambient X-Workspace-Id header (#33)
Makes the workspace scoping foundation user-visible — the research flagged the missing 'current workspace' context as the core gap #33 had to close.

- WorkspaceSwitcher (sidebar): self-contained selector that reads/writes an
  active_workspace_id in localStorage, fetched from the user's workspaces. Hides
  for single-workspace installs and drops a stale selection on load.
- services/api/client.js: sends the active workspace ambiently as X-Workspace-Id
  on every request (endpoints that don't honor it ignore it); cleared on logout.
- Switching reloads so all lists re-fetch under the new scope.

Backend resolve_workspace_id is lenient (prior commit) so a stale header can
never break the apps/servers lists. Verified: frontend lint-clean + production
build; the header->scoping path is covered by the backend API tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-01 08:54:01 -04:00
..

React Dashboard Template

A modern React dashboard application boilerplate built with Vite, featuring routing, charts, and a sidebar layout for building data-driven web interfaces.

Features

  • React 18 with functional components and hooks
  • Vite for fast development and building
  • React Router for client-side routing
  • Recharts for data visualization
  • Lucide React for icons
  • ESLint for code linting
  • Responsive sidebar layout
  • Dashboard page with sample components

Getting Started

Prerequisites

  • Node.js 16+ and npm

Installation

  1. Clone or download this template
  2. Install dependencies:
npm install

Development

Start the development server:

npm run dev

The app will be available at http://localhost:41921.

Building for Production

Build the app for deployment:

npm run build

The output will be in the dist/ directory.

Preview Production Build

npm run preview

Project Structure

src/
├── App.jsx              # Main app with routing
├── main.jsx             # Entry point
├── index.css            # Global styles
├── components/
│   └── Sidebar.jsx      # Navigation sidebar
├── layouts/
│   └── DashboardLayout.jsx  # Main layout wrapper
└── pages/
    └── Dashboard.jsx    # Main dashboard page

Customization

  • Modify components in src/components/
  • Add new pages in src/pages/
  • Update routes in App.jsx
  • Customize styles in index.css or component files

Environment Variables

Create a .env file in the root for environment variables:

VITE_API_URL=https://api.example.com

Access them in code via import.meta.env.VITE_API_URL.

Contributing

See the documentation files for AI agent permissions and guidelines.