A modern React application for tracking Dota 2 statistics with a comprehensive tech stack including GraphQL, testing, and code quality tools.
- React 19 - UI library with TypeScript
- Vite - Lightning-fast build tool
- TailwindCSS - Utility-first CSS framework
- Radix UI - Unstyled, accessible component library
- Apollo Client - GraphQL client for state management
- React Hook Form - Performant form management
- Zod - TypeScript-first schema validation
- @hookform/resolvers - Validation resolvers
- TanStack Table (React Table) - Headless table component
- GraphQL - Query language and runtime for APIs
- TypeScript - Type-safe JavaScript
- Biome - Fast formatter and linter
- pnpm - Fast, disk space efficient package manager
- Vitest - Lightning-fast unit test framework
- @vitest/ui - UI for test results
- @vitest/coverage-v8 - Code coverage
- Playwright - E2E testing framework
src/
├── components/ # Reusable components
│ ├── LoginForm.tsx
│ └── UsersTable.tsx
├── pages/ # Page components
│ └── Home.tsx
├── lib/ # Utility functions and configurations
│ ├── apollo-client.ts
│ └── schemas.ts
├── __tests__/ # Unit tests
├── App.tsx
└── main.tsx
e2e/ # End-to-end tests
├── home.spec.ts
Configuration files:
├── vite.config.ts
├── vitest.config.ts
├── tailwind.config.js
├── postcss.config.js
├── biome.json
└── playwright.config.ts
- Node.js 18+
- pnpm
# Install dependencies
pnpm install# Start dev server
pnpm dev
# Run in watch mode
pnpm build --watch# Build for production
pnpm build# Run unit tests
pnpm test
# Run tests with UI
pnpm test:ui
# Generate coverage report
pnpm test:coverage
# Run E2E tests
pnpm test:e2e# Lint and fix code
pnpm lint
# Format code
pnpm formatCreate a .env file based on .env.example:
VITE_GRAPHQL_ENDPOINT=http://localhost:4000/graphqlThis application expects a GraphQL backend running at http://localhost:4000/graphql (configurable via environment variables).
type Query {
users: [User!]!
user(id: ID!): User
}
type User {
id: ID!
name: String!
email: String!
}
type Mutation {
login(email: String!, password: String!): AuthToken!
}
type AuthToken {
token: String!
user: User!
}- Follow Biome linting rules
- Write tests for new features
- Ensure all tests pass before submitting
MIT