WildLearn is a web-based educational platform designed to help users identify and learn about wildlife (plants and animals). Users can upload images of nature, and the system uses advanced AI to analyze the image, identify the species, and generate an engaging, educational description suitable for a younger audience.
The goal: Empower young people to connect with nature through the magic of AI, fostering a deeper appreciation for the natural world.
- AI-Powered Species Identification: Identify plants and animals from images using Google Gemini.
- Witty & Engaging Descriptions: Get fun, educational descriptions tailored for ~15-year-olds, including scientific names and ecological roles.
- Personal Gallery: Track your discoveries and build a personalized nature journal.
- Featured Species: Explore a curated list of interesting species on the homepage.
- User Accounts: Secure signup and login with email verification to save your history.
The project follows a generic Model-View-Controller (MVC) pattern powered by Flask (Python) on the backend.
- Technology: HTML5, CSS3, JavaScript.
- Templating: Jinja2 templates (
templates/). - Pages:
index.html: Homepage featuring "featured species".upload.html: Image upload interface.my_species.html: Gallery of user's uploaded images.login.html,connect.html,verify_email.html: Authentication flows.
- Core: Flask (
app.py) handles routing and logic. - Session Management: Redis via
Flask-Sessionfor server-side sessions. - Authentication:
Flask-Loginfor session management andbcryptfor password hashing. - Email:
smtplibhandles verification emails.
- Database: SQLite (
site.db) managed via SQLAlchemy.- User Model: Credentials and verification status.
- Image Model: Links to Supabase URLs and AI-generated descriptions.
- File Storage: Supabase Storage. Images are uploaded to a persistent cloud bucket.
- Service: Google Gemini (via
google.generativeai). - Logic: Located in
ai_scripts/gen_script.py. The AI first detects if the image contains a species, then generates the educational content.
app.py: Main entry point. Configures app, DB, routes.ai_scripts/:gen_script.py: Interface with Google Gemini API.supabase_connect.py: Logic for uploading files to Supabase bucket.confirmation_email.py&generate_token.py: Utils for email auth flow.to_dict.py: Helper to parse text files into Python dictionaries.
auth/:config.py: Environment configuration.
templates/: HTML templates.static/: CSS, JS, and static assets.instance/: Instance-specific configuration (ignored by git).uploads/: Temporary local storage for uploads.
- Sign Up (
/connect): User submits credentials. System creates an unverified account and sends an email. - Verification (
/confirm/<token>): User clicks link. Account is marked verified. - Login (
/login): Validated users access their profile and gallery.
- Upload: User POSTs an image.
- Storage: Image is uploaded to Supabase.
- AI Analysis: Google Gemini checks for species and generates a description.
- Save: Result is saved to SQLite linked to the user.
- Display: User sees the result.
-
Clone the repository:
git clone https://github.com/your-username/WildLearn.git cd WildLearn -
Install dependencies: Ensure you have
redis-serverinstalled on your system.# On Ubuntu/Debian sudo apt-get update && sudo apt-get install -y redis-server # Install Python deps pip install -r requirements.txt
-
Environment Setup: You will need to set up your environment variables for:
- Supabase (URL and Key)
- Google Gemini API Key
- Email configuration (for sending confirmations)
(See
auth/config.pyfor required keys) -
Run the application: Start Redis (if not running as a service) and then the Flask app:
redis-server --daemonize yes python app.py
- Mobile App Development (iOS/Android)
- Gamification (badges, challenges, leaderboards)
- Augmented Reality (AR) Integration
- Citizen Science Integration
For questions, bug reports, or collaboration inquiries, please contact: Solomon Stead - solomonstead@gmail.com