Prerequisites
Before you begin, ensure you have the following installed:- Node.js: Version 18.x or higher
- npm: Version 9.x or higher (comes with Node.js)
- Git: For version control
Project Structure
MkDowner follows a modular React architecture:Installation
- Clone the repository:
- Install dependencies:
Environment Variables
Create a.env file in the project root with the following configuration:
Environment Variables Reference
| Variable | Description | Default |
|---|---|---|
VITE_API_BASE_URL | Backend API endpoint URL | http://localhost:5001 |
All Vite environment variables must be prefixed with
VITE_ to be exposed to the client-side code.Development Workflow
Available Scripts
The following npm scripts are available inpackage.json:
Running the Development Server
Start the development server with hot module replacement:http://localhost:5173 (default Vite port).
Type Checking
Run TypeScript type checking:Linting
Run ESLint to check code quality:Build and Deployment
Production Build
Create an optimized production build:- Runs TypeScript build (
tsc -b) - Creates an optimized Vite build
- Outputs to the
dist/directory
Preview Production Build
Preview the production build locally:Technology Stack
Dependencies
Dev Dependencies
- Build Tool: Vite 7.2.2
- Language: TypeScript 5.9.3
- Linting: ESLint 9.39.1 with TypeScript plugin
- React Plugin: @vitejs/plugin-react 5.1.0
TypeScript Configuration
The project uses a composite TypeScript configuration:tsconfig.app.json (Application Config)
Key TypeScript Features
- Strict Mode: Enabled for maximum type safety
- Module Resolution: Bundler mode for Vite compatibility
- JSX:
react-jsxtransform (no React import needed) - Target: ES2022 for modern JavaScript features
Vite Configuration
The project uses a minimal Vite configuration:Vite Features
- Fast HMR: Hot Module Replacement for instant updates
- Optimized Build: Rollup-based production builds
- ESM-first: Native ES modules support
- Plugin Support: React Fast Refresh enabled
Backend Requirements
The backend should expose the following endpoints:POST /upload- File upload and conversionPOST /md-to-word- Markdown to Word conversion
Next Steps
Custom Hooks
Learn about useFileUpload and useConversionMode hooks
API Integration
Understand the API service and backend communication