A modern, beautiful translation app built with Next.js, TypeScript, and Tailwind CSS.
- 🌍 Support for 100+ languages
- ⚡ Fast and responsive UI
- 🎨 Modern design with dark mode support
- 📱 Mobile-friendly interface
- 🔄 Easy language swapping
- ✨ Beautiful gradient backgrounds
First, install the dependencies:
npm install
# or
yarn install
# or
pnpm installThen, run the development server:
npm run dev
# or
yarn dev
# or
pnpm devOpen http://localhost:3000 with your browser to see the result.
- Framework: Next.js 14 with App Router
- Language: TypeScript for type safety
- Styling: Tailwind CSS with Apple design system
- UI Components: Custom components with shadcn/ui patterns
- Icons: Lucide React
- PWA: Service Worker, Web App Manifest
- Audio: Web Speech API, Speech Synthesis API
- Storage: LocalStorage with custom hooks
- Fonts: Apple system fonts (-apple-system, SF Pro Display)
air-translate/
├── app/
│ ├── api/translate/ # Translation API endpoint
│ ├── globals.css # Global styles with Apple design system
│ ├── layout.tsx # Root layout with PWA metadata
│ └── page.tsx # Main translation interface
├── components/
│ ├── ui/ # Reusable UI components
│ ├── TranscriptManager.tsx # Transcript management
│ └── SettingsModal.tsx # Settings interface
├── hooks/
│ └── useTranscripts.ts # Transcript state management
├── lib/
│ ├── storage.ts # Local storage utilities
│ └── utils.ts # Utility functions
├── public/
│ ├── manifest.json # PWA manifest
│ ├── sw.js # Service worker
│ ├── robots.txt # SEO robots file
│ └── sitemap.xml # SEO sitemap
├── scripts/
│ └── generate-icons.js # PWA icon generation guide
└── Configuration files
- Node.js 18+
- npm or yarn
- Modern browser with Web Speech API support
- AirPods or compatible Bluetooth headphones (optional)
-
Clone and install dependencies:
git clone <repository-url> cd air-translate npm install
-
Start development server:
npm run dev
-
Open in browser:
http://localhost:3000
-
On iOS Safari:
- Tap the Share button
- Select "Add to Home Screen"
- The app will install as a native-like experience
-
On Android Chrome:
- Tap the menu (three dots)
- Select "Add to Home Screen"
- Confirm installation
npm run dev- Start development server with hot reloadnpm run build- Build optimized production bundlenpm run start- Start production servernpm run lint- Run ESLint for code quality
- Select Languages: Choose source and target languages from dropdowns
- Grant Permissions: Allow microphone and audio access when prompted
- Start Listening: Tap the microphone button to begin speech recognition
- Speak: Talk in the source language (e.g., Spanish)
- Hear Translation: Listen to the translation in your AirPods
- View History: Check the transcript history for past translations
- Language Swapping: Use the swap button to quickly reverse language direction
- Export Data: Download your translation history as JSON
- Import Data: Restore previous translation history
- Settings: Configure audio preferences and notifications
- Share: Share individual translations using native sharing
Create a .env.local file for production:
NEXT_PUBLIC_GOOGLE_TRANSLATE_API_KEY=your_api_key_here
NEXT_PUBLIC_APP_URL=https://your-domain.comTo enable real translation (currently simulated):
- Get a Google Cloud Translation API key
- Add it to your environment variables
- Update the
/app/api/translate/route.tsfile
- Offline Support: Basic functionality works without internet
- App-like Experience: Full-screen, no browser UI
- Push Notifications: Ready for future notification features
- Background Sync: Service worker handles data synchronization
- Install Prompts: Automatic installation suggestions
- Clarity: Clear visual hierarchy and typography
- Deference: Content is the focus, UI supports it
- Depth: Layered interfaces with proper shadows and blur
- Accessibility: WCAG 2.1 AA compliance
- Responsive: Adapts to all screen sizes
- Primary: Apple Blue (#007AFF)
- Background: System colors with dark mode support
- Text: High contrast for readability
- Accents: Subtle grays and blues
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Follow the existing code style and Apple design guidelines
- Add tests for new functionality
- Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Apple Human Interface Guidelines
- Google Web Speech API
- Next.js and Vercel team
- Tailwind CSS community
- Lucide icon library