street-lingo/STRUCTURE.md

109 lines
2.8 KiB
Markdown

# Project Structure
This project is organized as a monorepo with multiple frontend applications and a shared backend.
## Directory Structure
```
learn-indo/
├── apps/
│ ├── indonesian-app/ # Indonesian language learning app
│ │ ├── src/
│ │ │ ├── components/
│ │ │ │ ├── SpeechInterface.vue
│ │ │ │ └── ScenarioView.vue
│ │ │ ├── App.vue
│ │ │ └── main.js
│ │ ├── package.json
│ │ ├── vite.config.js
│ │ └── index.html
│ │
│ └── german-app/ # German language learning app
│ ├── src/
│ │ ├── components/
│ │ │ └── GermanSpeechInterface.vue
│ │ ├── views/
│ │ │ ├── HomeView.vue
│ │ │ └── ScenarioView.vue
│ │ ├── App.vue
│ │ └── main.js
│ ├── package.json
│ ├── vite.config.js
│ └── index.html
├── backend/ # Shared FastAPI backend
│ ├── languages/
│ │ ├── indonesian/
│ │ └── german/
│ ├── core/
│ ├── main.py
│ └── pyproject.toml
├── package.json # Root workspace configuration
└── start-street-lingo.sh # Development startup script
```
## Applications
### Indonesian App
- **Port**: 3000
- **URL**: http://localhost:3000
- **Features**: Indonesian language learning with speech recognition and AI conversation
### German App
- **Port**: 3001
- **URL**: http://localhost:3001
- **Features**: German language learning with speech recognition and AI conversation
### Backend API
- **Port**: 8000
- **URL**: http://localhost:8000
- **Features**: Shared API serving both frontend applications
## Development Commands
### Root Level Commands
```bash
# Install dependencies for all apps
npm run install:all
# Start all services (backend + both frontends)
npm run dev:all
# Build all frontend apps
npm run build:all
# Start individual services
npm run dev:indonesian
npm run dev:german
npm run dev:backend
```
### Individual App Commands
```bash
# Indonesian app
cd apps/indonesian-app
npm install
npm run dev
# German app
cd apps/german-app
npm install
npm run dev
```
### Quick Start
```bash
# Use the convenience script
./start-street-lingo.sh
```
## API Endpoints
- **Indonesian scenarios**: `/api/scenarios/indonesian`
- **German scenarios**: `/api/scenarios/german`
- **WebSocket - Indonesian**: `/ws/speech/indonesian`
- **WebSocket - German**: `/ws/speech/german`
- **Conversation feedback**: `/api/conversation-feedback`
- **Suggestions**: `/api/suggestions`
- **Translation**: `/api/translate`