Shiftly is a React + TypeScript single-page application built with Vite. It is deployed to GitHub Pages under theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/dmaman86/shiftly/llms.txt
Use this file to discover all available pages before exploring further.
/shiftly/ base path, which means the local dev server mirrors that sub-path at http://localhost:5173/shiftly. This guide walks you through every step needed to get a fully working local environment — from prerequisites to a running dev server.
Prerequisites
Before cloning the repository, make sure you have the following tools installed:- Node.js 18+ — required by the Vite toolchain and all dependencies.
- Bun (recommended) — used in the
predeployand CI scripts. Install from bun.sh. - Git — to clone the repository.
predeploy and CI pipeline steps are written with bun run commands. You can still use npm for day-to-day development if Bun is not available.
Getting Started
Install dependencies
Install all project dependencies. Bun is recommended for speed and consistency with the CI environment.
Start the development server
Launch the Vite development server with hot-module replacement enabled:
Available Scripts
All scripts are defined inpackage.json and can be run with bun run <script> or npm run <script>.
| Script | Description |
|---|---|
dev | Starts the Vite development server with HMR at http://localhost:5173/shiftly |
build | Compiles and bundles the app for production into the dist/ directory |
preview | Serves the production build locally for inspection before deployment |
lint | Runs ESLint across the entire project using the flat config |
typecheck | Runs tsc --project tsconfig.app.json --noEmit — type-checks src/ without emitting files |
test | Runs the Vitest test suite in watch mode (re-runs on file changes) |
test:ui | Runs Vitest with the browser-based UI explorer at http://localhost:51204/__vitest__/ |
test:coverage | Generates a V8 coverage report (text, JSON, HTML) under coverage/ |
test:ci | Runs the full test suite once (vitest run) — used in CI pipelines |
predeploy | Automatically runs before deploy: executes typecheck → lint → test:ci → build |
deploy | Publishes the dist/ directory to the gh-pages branch via gh-pages |
The
predeploy script is a lifecycle hook that runs automatically whenever you execute bun run deploy or npm run deploy. It sequentially runs typecheck, lint, test:ci, and build — all four must pass before the app is published to GitHub Pages. This guarantees that only type-correct, lint-clean, fully-tested builds are ever deployed.Vite Configuration
Thevite.config.ts file configures the build tool, dev server, path aliases, and Vitest test runner.
Key highlights
Base URL — The app is hosted at/shiftly/, which matches the GitHub Pages deployment path. This is required for all asset URLs to resolve correctly in production:
@/ alias maps to the src/ directory, enabling clean imports across the codebase:
@vitejs/plugin-react plugin provides JSX transformation and Fast Refresh:
/shiftly → /shiftly/ redirect so the router initialises correctly without a trailing slash:
vendor-react, vendor-redux, vendor-mui-core, vendor-mui-icons, vendor-mui-pickers, vendor-ui, vendor-utils, vendor-i18n) to optimise browser caching and keep individual file sizes manageable. The chunk size warning limit is raised to 600 kB.
Test configuration — Vitest is configured directly inside vite.config.ts:
TypeScript Configuration
Shiftly uses two separatetsconfig files to keep application code and test code cleanly separated.
tsconfig.app.json
Covers only the application source code under src/, explicitly excluding src/test/:
typecheck script targets this config, so test utilities and Vitest globals do not pollute the application’s type environment.
tsconfig.test.json
Covers the entire src/ tree (including tests) and adds Vitest, Node, and @testing-library/jest-dom to the types array:
describe, it, expect, and all jest-dom matchers without needing explicit imports.