- Created backend directory with FastAPI project structure - Created frontend directory with React + TypeScript + Vite - Configured Python virtual environment and installed dependencies (fastapi, uvicorn, kokoro, soundfile, python-multipart) - Verified espeak-ng system dependency is installed - Configured Node.js project with TypeScript, React, and Vite - Set up Tailwind CSS for styling - Set up environment variable configuration for both projects - Created comprehensive README documentation Requirements: 9.6, 10.2, 11.1
61 lines
1001 B
Markdown
61 lines
1001 B
Markdown
# Text to Audiobook Frontend
|
|
|
|
React TypeScript frontend for the Text to Audiobook application.
|
|
|
|
## Setup
|
|
|
|
### Prerequisites
|
|
|
|
- Node.js 20.19+ or 22.12+
|
|
- npm or yarn
|
|
|
|
### Installation
|
|
|
|
1. Install dependencies:
|
|
```bash
|
|
npm install
|
|
```
|
|
|
|
2. Create environment file:
|
|
```bash
|
|
cp .env.example .env
|
|
```
|
|
|
|
3. Update `.env` with your backend URL (default: `http://localhost:8000`)
|
|
|
|
## Development
|
|
|
|
Start the development server:
|
|
```bash
|
|
npm run dev
|
|
```
|
|
|
|
The application will be available at `http://localhost:5173`
|
|
|
|
## Build
|
|
|
|
Build for production:
|
|
```bash
|
|
npm run build
|
|
```
|
|
|
|
Preview production build:
|
|
```bash
|
|
npm run preview
|
|
```
|
|
|
|
## Project Structure
|
|
|
|
```
|
|
src/
|
|
├── api/ # API client modules
|
|
├── components/ # React components
|
|
├── App.tsx # Main application component
|
|
├── main.tsx # Application entry point
|
|
└── index.css # Global styles (Tailwind)
|
|
```
|
|
|
|
## Environment Variables
|
|
|
|
- `VITE_API_BASE_URL` - Backend API base URL (default: http://localhost:8000)
|