Welcome to API Practice English! 🎉
This application is an interactive tool to practice and improve your English skills through movie dialogues. You can search for dialogues, practice your pronunciation and fluency, and track your progress over time.
- Search Dialogues: Find movie dialogues using keywords or IMDb IDs.
- Practice Dialogues: Submit audio recordings to receive feedback on your pronunciation and fluency.
- Practice History: Track your progress and view your practice history.
Before you begin, make sure you have the following installed:
- Python 3.8+
- FastAPI
- FFmpeg (for audio processing)
-
Clone the repository:
git clone https://github.com/phytter/api-practice-english.git cd api-practice-english -
Install the dependencies using
pip:pip install -r requirements.txt
-
Install FFmpeg:
sudo apt-get install ffmpeg
-
Configure the necessary environment variables (e.g.,
MONGO_URI,AUDIO_PROCESSOR_API_KEY).
To start the application, run the following command:
uvicorn app.main:app --reloadThe application will be available at http://127.0.0.1:8000.
To run the tests, use the command:
pytest- Complete DDD Implementation:
- Introduce proper Value Objects for concepts like email, score ranges ✅
- Implement Domain Events for important state changes (level up, achievement unlocked)
- Define Aggregates with clear boundaries and invariants
- Improve Error Handling:
- Create domain-specific exceptions
- Implement a consistent error handling strategy across layers
- Implement CQRS Pattern:
- Separate command (write) and query (read) responsibilities
- Optimize read models for UI requirements
- Implement Domain Services:
- Move complex business logic that doesn't belong in entities to domain services
- Ensure business layer only orchestrates domain operations
- Performance Optimizations:
- Add caching for frequently accessed data
- Optimize MongoDB queries with proper indexes
- Implement async dialog processing with microsservices
- Add Comprehensive Testing:
- Unit tests for domain logic and validation rules
- Integration tests for repositories
- Documentation Improvements:
- Document domain model with diagrams
- Add comprehensive API documentation
- Document architectural decisions
Contributions are welcome! Feel free to open issues or submit pull requests.
Enjoy practicing your English with movie dialogues! 🎬📚
This project is licensed under the MIT License. See the LICENSE file for more details.