Questgraph is a React SPA (Single Page Application) built with Vite and deployed on Cloudflare Workers.
The project provides an interface for working with graphs/quests using modern visualization libraries and real-time data.
- Framework: React 19 + Vite 5
- UI Libraries:
- Material-UI (MUI) v7
- MUI X Tree View
- React Flow (@xyflow/react) for graph visualization
- react-spring for animations
- State & Data:
- TanStack Query (React Query) for server state management
- TanStack Router for routing
- Supabase (real-time + database)
- Dexie.js (IndexedDB)
- Yjs + y-indexeddb for CRDT and collaborative editing
- Styling:
- Tailwind CSS v4
- Emotion (CSS-in-JS)
- Forms: React Hook Form
- Testing:
- Jest + Testing Library (unit tests)
- Cypress (E2E tests)
- Deployment: Cloudflare Workers (via Wrangler)
npm install
# or
yarn install
# or
pnpm install
# or
bun install| Command | Description |
|---|---|
npm run dev |
Start local development server (Vite) |
npm run build |
Build production version |
npm run preview |
Preview production build locally |
npm run deploy |
Deploy to Cloudflare Workers |
npm run test |
Run unit tests (Jest) |
npm run cypress:open |
Open Cypress for E2E testing |
npm run cypress:run |
Run E2E tests in headless mode |
npm run type-check |
TypeScript type checking |
npm run lint |
Run ESLint |
npm run gen-types |
Generate TypeScript types from Supabase |
After installing dependencies, start the development server:
npm run devOpen http://localhost:5173 in your browser.
The main application code is in the src/ directory:
src/pages/— application pagessrc/components/— reusable componentssrc/hooks/— custom React hookssrc/lib/— utility libraries and configurationssrc/routes/— routing configuration
npm run build # Build to dist/ directory
npm run preview # Preview the buildnpm run deployThis command uses wrangler pages deploy to publish your application to Cloudflare Workers.
Note: Make sure you have Cloudflare access configured via
wrangler loginand have created a project in Cloudflare Pages.
npm run testJest configuration is in jest.config.cjs. Tests are located alongside tested files or in __tests__/.
# Interactive mode
npm run cypress:open
# Headless mode
npm run cypress:runCypress configuration is in cypress.config.ts.
Copy .env.example to .env.local and fill in the required values:
- Supabase URL and keys
- Other project secrets
To automatically generate TypeScript types from your Supabase schema:
npm run gen-typesThis will create/update src/supabase.ts with current types.
questgraph/
├── src/
│ ├── components/ # React components
│ ├── hooks/ # Custom hooks
│ ├── layouts/ # Layout components
│ ├── lib/ # Utilities and configurations
│ ├── pages/ # Application pages
│ ├── routes/ # Routing
│ └── utils/ # Helper functions
├── cypress/ # E2E tests
├── public/ # Static assets
├── __mocks__/ # Mocks for tests
├── index.html # HTML template
├── vite.config.ts # Vite configuration
├── tsconfig.json # TypeScript configuration
├── tailwind.config.ts # Tailwind configuration
├── wrangler.json # Cloudflare Workers configuration
└── package.json
- Vite Documentation
- React Documentation
- Material-UI Documentation
- React Flow Documentation
- Supabase Documentation
- Cloudflare Workers Documentation
Contributions are welcome! Please create issues and pull requests to improve the project.
This project is licensed under the MIT License.