An interactive web application for learning and testing knowledge about insects. The application features dynamic quizzes, user progression tracking, and social features.
- Multiple choice and text input quiz modes
- Dynamic question loading with region and season-specific butterflies
- Real-time image loading from iNaturalist API
- Progress tracking during quiz sessions
- Detailed results analysis after completion
- User profiles with statistics and achievements
- Social features (following other users)
- Achievement system with multiple badges:
- Profile customization with avatars
- User activity tracking and statistics
- Detailed statistics for administrators
- CSV export functionality for data analysis
- User management system
- Content moderation capabilities
- Real-time notifications system
- Asynchronous question loading
- Responsive design for mobile and desktop
- Image optimization and caching
- CSRF protection
- Email verification system
- Django
- Celery for asynchronous tasks
- PostgreSQL database
- Redis for caching
- HTML5/CSS3
- JavaScript
- Chart.js for data visualization
- Responsive design with media queries
- AJAX for dynamic content loading
- iNaturalist API for butterfly images and data
- Email service for notifications
quiz_app/
├── models/
│ ├── Species.py
│ ├── Quiz.py
│ └── User.py
├── views/
│ ├── quiz.py
│ ├── user.py
│ └── admin.py
├── static/
│ ├── css/
│ ├── js/
│ └── images/
├── templates/
│ ├── quiz/
│ ├── user/
│ └── admin/
├── tasks/
│ └── celery_tasks.py
└── utils/
├── image_utils.py
└── quiz_utils.py
- Clone the repository:
git clone https://github.com/MBertoncini/BioLog.git
cd BioLog- Create and activate virtual environment:
python -m venv venv
source venv/bin/activate # Linux/Mac
venv\Scripts\activate # Windows- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
cp .myenv.example .env- Initialize the database:
python manage.py migrate
python manage.py loaddata initial_data.json- Start the development server:
python manage.py runserver- Python 3.8+
- PostgreSQL 12+
- Redis 6+
- Node.js 14+ (for building frontend assets)
The application requires several environment variables:
DEBUG=True
SECRET_KEY=your_secret_key
DATABASE_URL=postgres://user:password@localhost:5432/dbname
REDIS_URL=redis://localhost:6379/0
INATURALIST_API_KEY=your_api_key
EMAIL_HOST=smtp.yourprovider.com
EMAIL_PORT=587
EMAIL_HOST_USER=your_email
EMAIL_HOST_PASSWORD=your_passwordTo set up the development environment:
- Install development dependencies:
pip install -r requirements-dev.txt- Set up pre-commit hooks:
pre-commit install- Run tests:
python manage.py test- 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