An intelligent learning assistant that creates personalized, hierarchical study paths for any topic, provides curated resources, and generates comprehensive PDF notes.
Project Context: This tool was developed as a proof-of-concept during Samadhan 2.0, a national-level hackathon organized by India's Ministry of Education and AICTE. The hackathon challenged innovators to build solutions ("Samadhan") for student-centric problems. This standalone application was originally designed as a core feature for a larger, full-stack learning platform but was completed in this form due to the time constraints of the event.
- AI-Powered Hierarchical Roadmaps: Enter any subject, skill, or topic, and the AI generates a detailed, nested learning path in the style of roadmap.sh.
- Interactive Visual Tree: Displays the roadmap as a clickable, easy-to-read visual flowchart.
- Curated Learning Resources: For each topic in the roadmap, the app provides:
- The top-viewed YouTube tutorial.
- A list of the top online articles from a live Google Search.
- AI-Generated PDF Study Notes: Creates comprehensive, well-structured notes for any topic, formatted into a professional PDF document for offline study.
- Frontend: Streamlit
- AI Model: Google Gemini 1.5 Pro
- APIs:
- Google Custom Search API
- YouTube Data API v3
- PDF Generation: ReportLab
- Visualization: Mermaid diagrams via
streamlit-mermaid
-
Clone the repository:
git clone <repository-url> cd your-project-folder
-
Create a virtual environment (recommended):
python -m venv venv venv\Scripts\activate # On Windows # source venv/bin/activate # On Mac/Linux
-
Install dependencies from
requirements.txt:pip install -r requirements.txt
-
Set up your API keys:
- Create a file at
.streamlit/secrets.toml - Add your three required keys to this file.
- Create a file at
-
Google Gemini API Key:
- Get it from Google AI Studio.
- Ensure it is linked to a Google Cloud project with billing enabled and the Vertex AI API activated.
-
Google Cloud API Key (for YouTube and Custom Search):
- Get it from the Google Cloud Console.
- In your project, enable the YouTube Data API v3 and the Custom Search API.
-
Programmable Search Engine ID:
- Create a search engine at the Programmable Search Engine website.
- Configure it to "Search the entire web" and copy the Search Engine ID.
Your final .streamlit/secrets.toml file should look like this:
GEMINI_API_KEY = "your-gemini-api-key"
YOUTUBE_API_KEY = "your-google-cloud-api-key"
SEARCH_ENGINE_ID = "your-search-engine-id"-
Run the application:
streamlit run app.py
-
Enter any topic you want to learn (e.g., "Machine Learning," "History of Rome," "Quantum Physics").
-
Click "Generate My Study Roadmap."
-
Click on any sub-topic in the interactive list to get curated resources.
All required Python libraries are listed in the requirements.txt file.
- API Errors (
400,404): This is the most common issue. Double-check that all three keys in yoursecrets.tomlfile are correct and that the necessary APIs are enabled in your Google Cloud project. Ensure billing is active for the project linked to your Gemini key. - Roadmap Visibility: If the visual tree is too small, you can adjust the
heightparameter in thest_mermaid()function call inapp.py.
This project is open source and available under the MIT License.
Developed for the โค๏ธ of learning during the Samadhan 2.0 Hackathon