Oko UI is a modern React-based web application built with Vite and TypeScript. It features a component library built with Storybook, comprehensive testing setup, and a robust development environment.
- React 18 with TypeScript
- Vite for fast development and building
- Storybook for component development and documentation
- TanStack Router for type-safe routing
- TanStack Query for data fetching
- TanStack Form with Zod validation
- Gravity UI components and utilities
- Comprehensive testing setup:
- Vitest for unit testing
- Playwright for end-to-end testing
- Storybook testing
- Docker for containerization
- Automated deployment with upgrade script
- SSL security with Certbot
- Nginx for reverse proxy and caching
- Modern development tools:
- ESLint for code linting
- Prettier for code formatting
- Stylelint for CSS/SCSS linting
- Husky for git hooks
- Conventional commits
src/
├── components/ # Reusable UI components
├── constants/ # Application constants
├── data-sources/ # Data source configurations
├── entires/ # Entry points
├── hooks/ # Custom React hooks
├── packages/ # Internal packages
├── routes/ # Route definitions
├── services/ # Service layer
├── stories/ # Storybook stories
├── styles/ # Global styles
├── types/ # TypeScript type definitions
└── utils/ # Utility functions
- Node.js 22
- PNPM 10
# Install dependencies
pnpm install
# Start development server
pnpm dev
# Run tests
pnpm test
pnpm test:watch # Watch mode
pnpm test:unit # Unit tests only
pnpm test:playwright # E2E tests
# Start Storybook
pnpm storybook
# Type checking
pnpm typecheck
# Linting
pnpm lintThe development server includes a proxy configuration for API requests to /api, redirecting them to https://oko.shbov.ru/api.
For detailed deployment instructions, see DEPLOYMENT.md.
Quick deployment steps:
- Install Docker, Nginx, and Certbot
- Clone the repository
- Copy environment files
- Set up Nginx and SSL
- Run
./upgrade.sh
The application uses a multi-stage Docker build to compile the Vite application and serve it using Nginx. The docker-compose.yml file orchestrates the deployment, exposing port 3000 for the web server. Nginx is configured to handle API requests and serve static files efficiently.