A comprehensive web application for learning German, featuring lessons from A1 to C2 levels, interactive exercises, and audio support.
- Structured Learning Path: Progress from A1 (beginner) to C2 (proficiency) levels
- Interactive Lessons: Engaging content with text, audio, and video
- Vocabulary Builder: Learn and practice new words with translations
- Interactive Exercises: Test your knowledge with various exercise types
- Progress Tracking: Monitor your learning journey
- Responsive Design: Works on desktop, tablet, and mobile devices
- Docker Support: Easy containerization for development and production
- Cloud Ready: One-click deployment to Render
- Python 3.9+
- pip (Python package manager)
- Virtual environment (recommended)
- Docker and Docker Compose (for containerized development)
-
Clone the repository
git clone https://github.com/Mustafa1998-tech/german-learn-platform cd german-learning-platform -
Create .env file
cp .env.example .env # Edit .env with your configuration -
Build and start containers
docker-compose up --build -d
-
Run migrations
docker-compose exec web python manage.py migrate -
Create superuser
docker-compose exec web python manage.py createsuperuser -
Access the application
- Main site: http://localhost:8000/
- Admin panel: http://localhost:8000/admin/
- PostgreSQL: localhost:5432
- PgAdmin (if enabled): http://localhost:5050
-
Clone the repository
git clone https://github.com/yourusername/german-learning-platform.git cd german-learning-platform -
Create and activate a virtual environment
# On Windows python -m venv venv .\venv\Scripts\activate # On macOS/Linux python3 -m venv venv source venv/bin/activate
-
Install dependencies
pip install -r requirements.txt
-
Set up environment variables
cp .env.example .env # Edit .env with your configuration -
Apply migrations
python manage.py migrate
-
Create a superuser (admin) account
python manage.py createsuperuser
-
Import initial data
python manage.py import_youtube_courses
-
Generate audio files (requires internet connection)
python manage.py generate_audio
With Docker:
docker-compose up --buildWithout Docker:
python manage.py runserver- Main site: http://localhost:8000/
- Admin panel: http://localhost:8000/admin/
- API Documentation: http://localhost:8000/api/docs/
# With Docker
docker-compose exec web python manage.py test
# Without Docker
python manage.py test# Run flake8
flake8
# Run black
black .german_learning_platform/
├── .github/ # GitHub workflows and issue templates
├── courses/ # Main app
│ ├── management/commands/ # Custom management commands
│ ├── migrations/ # Database migrations
│ ├── static/ # Static files (CSS, JS, images)
│ ├── templates/ # HTML templates
│ ├── admin.py # Admin configuration
│ ├── apps.py # App configuration
│ ├── models.py # Database models
│ ├── urls.py # URL routing
│ └── views.py # View functions
├── german_learning_platform/ # Project configuration
│ ├── __init__.py
│ ├── asgi.py
│ ├── settings/
│ │ ├── __init__.py
│ │ ├── base.py # Base settings
│ │ ├── development.py # Development settings
│ │ └── production.py # Production settings
│ ├── urls.py # Main URL configuration
│ └── wsgi.py
├── media/ # User-uploaded files
├── static/ # Global static files
├── nginx/ # Nginx configuration
│ └── nginx.conf
├── .dockerignore # Files ignored by Docker
├── .env.example # Example environment variables
├── .gitignore # Git ignore file
├── docker-compose.yml # Docker Compose configuration
├── Dockerfile # Dockerfile for production
├── Dockerfile.dev # Dockerfile for development
├── manage.py # Django management script
├── README.md # This file
├── requirements.txt # Development dependencies
└── requirements_prod.txt # Production dependencies
- Click the "Deploy to Render" button above
- Connect your GitHub repository
- Select the appropriate plan (Free tier available)
- Click "Create Web Service"
- Add your environment variables in the Render dashboard
Create a .env file in the root directory with the following variables:
# Django
DEBUG=0
SECRET_KEY=your-secret-key-here
ALLOWED_HOSTS=.onrender.com,your-custom-domain.com
# Database
DB_NAME=german_learning
DB_USER=postgres
DB_PASSWORD=your-secure-password
DB_HOST=db
DB_PORT=5432
DATABASE_URL=postgresql://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}
# Email (optional)
EMAIL_HOST=smtp.example.com
EMAIL_PORT=587
EMAIL_USE_TLS=True
EMAIL_HOST_USER=your-email@example.com
EMAIL_HOST_PASSWORD=your-email-password
DEFAULT_FROM_EMAIL=noreply@example.comWhen you push changes to your repository, Render will automatically rebuild and redeploy your application.
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
-
import_youtube_courses: Imports initial data (levels, lessons, exercises)python manage.py import_youtube_courses
-
generate_audio: Generates audio files for lessons using gTTSpython manage.py generate_audio # Options: # --force: Regenerate all audio files # --lesson-id: Generate audio for a specific lesson
For production deployment, consider using:
- Web server: Nginx or Apache
- Application server: Gunicorn or uWSGI
- Database: PostgreSQL or MySQL
- Media storage: AWS S3 or similar
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Django - The web framework used
- Bootstrap 5 - Frontend framework
- gTTS - Google Text-to-Speech
- Font Awesome - Icons
Note: This project is for educational purposes. The content is auto-generated and may contain inaccuracies.
