Modern EdTech UI application built with React, TypeScript, and Vite
- Node.js >= 18.0.0
- pnpm >= 8.0.0
-
Clone the repository
git clone https://github.com/yourusername/edtech-ui.git cd edtech-ui
-
Install dependencies
pnpm install
-
Set up environment variables
# Copy the environment template pnpm prepare-env # Or manually copy cp env.template .env
-
Start development server
pnpm dev
This project supports multiple environments with dedicated configuration:
- Development (
dev
) - Local development - Staging (
stage
) - Pre-production testing - Production (
prod
) - Live environment
# Development (default)
pnpm prepare-env
pnpm dev
# Staging
pnpm prepare-env:stage
pnpm dev:stage
# Production
pnpm prepare-env:prod
env.template
- Development environment templateenv.stage.template
- Staging environment templateenv.prod.template
- Production environment template
Copy the appropriate template to create your environment files:
.env
(development).env.staging
(staging).env.production
(production)
pnpm dev # Start development server
pnpm dev:stage # Start development server with staging config
pnpm build # Production build (includes type-check and lint)
pnpm build:dev # Development build
pnpm build:stage # Staging build
pnpm build:prod # Production build
pnpm preview # Preview production build
pnpm preview:stage # Preview staging build
pnpm preview:prod # Preview production build
pnpm start # Build and preview (production)
pnpm test # Run tests once
pnpm test:watch # Run tests in watch mode
pnpm test:coverage # Run tests with coverage report
pnpm test:ui # Run tests with UI
pnpm test:e2e # Run end-to-end tests (placeholder)
pnpm lint # Check code with ESLint
pnpm lint:fix # Fix ESLint issues
pnpm lint:staged # Lint staged files (used by husky)
pnpm format # Format code with Prettier
pnpm format:check # Check code formatting
pnpm type-check # TypeScript type checking
pnpm type-check:watch # Type checking in watch mode
pnpm clean # Clean build outputs
pnpm clean:cache # Clean all caches
pnpm clean:all # Clean everything including node_modules
pnpm reinstall # Clean install (removes node_modules and reinstalls)
pnpm pre-commit # Run type-check, lint, and tests (CI pipeline)
edtech-ui/
βββ src/ # Source code
β βββ components/ # React components
β βββ pages/ # Page components
β βββ layouts/ # Layout components
β βββ hooks/ # Custom React hooks
β βββ store/ # State management
β βββ services/ # API services
β βββ lib/ # Utility libraries
β βββ utils/ # Utility functions
β βββ types/ # TypeScript definitions
β βββ constants/ # Application constants
β βββ routes/ # Route definitions
β βββ features/ # Feature modules
β βββ test/ # Test utilities
βββ public/ # Static assets
βββ env.*.template # Environment templates
βββ tailwind.config.js # Tailwind configuration
βββ vite.config.ts # Vite configuration
βββ vitest.config.ts # Testing configuration
βββ tsconfig.json # TypeScript configuration
βββ package.json # Project configuration
- React 19 - UI framework
- TypeScript - Type safety
- Vite - Build tool and dev server
- Zustand - Lightweight state management
- @tanstack/react-query - Server state management
- Tailwind CSS - Utility-first CSS framework
- Framer Motion - Animation library
- Radix UI - Accessible component primitives
- Lucide React - Icon library
- React Hook Form - Form library
- Zod - Schema validation
- ESLint - Code linting
- Prettier - Code formatting
- Vitest - Testing framework
- MSW - API mocking
- Husky - Git hooks
- lint-staged - Staged file linting
VITE_APP_NAME
- Application nameVITE_APP_VERSION
- Application versionVITE_APP_DESCRIPTION
- Application description
VITE_API_BASE_URL
- API base URLVITE_API_TIMEOUT
- API request timeout
VITE_ENABLE_DEV_TOOLS
- Enable development toolsVITE_ENABLE_MSW
- Enable Mock Service WorkerVITE_ENABLE_ANALYTICS
- Enable analyticsVITE_ENABLE_ERROR_REPORTING
- Enable error reporting
VITE_GOOGLE_ANALYTICS_ID
- Google Analytics IDVITE_SENTRY_DSN
- Sentry error reporting DSNVITE_STRIPE_PUBLIC_KEY
- Stripe public key
VITE_GOOGLE_CLIENT_ID
- Google OAuth client IDVITE_FACEBOOK_APP_ID
- Facebook app IDVITE_GITHUB_CLIENT_ID
- GitHub OAuth client ID
# Build with production environment
pnpm build:prod
# The build output will be in the `dist` directory
# Development build
pnpm build:dev
# Staging build
pnpm build:stage
# Production build
pnpm build:prod
- Install dependencies:
pnpm install
- Set up environment:
pnpm prepare-env
- Start development:
pnpm dev
- Run tests:
pnpm test
- Check code quality:
pnpm pre-commit
- All code must pass TypeScript type checking
- All code must pass ESLint rules
- All code must be formatted with Prettier
- All tests must pass
- Minimum test coverage requirements apply
MIT License - see the LICENSE file for details.
Happy Coding! π