|
| 1 | +--- |
| 2 | +title: FirstPrinciples | AI Learning Roadmap Generator |
| 3 | +description: An AI-powered learning roadmap generator that uses conversational AI to help users identify specific learning topics and provides personalized step-by-step learning plans |
| 4 | +sidebar_position: 12 |
| 5 | +keywords: [firstprinciples, learning, roadmap, education, AI, personalized, flask, react, openai, perplexity] |
| 6 | +--- |
| 7 | + |
| 8 | +**FirstPrinciples App** is an AI-powered tool that transforms your broad learning goals into structured, personalized roadmaps. Through an interactive chat, the AI engages you in a conversation, asking targeted questions to refine your learning needs before generating a detailed plan. The application is built to help you learn more efficiently by providing a clear path forward. |
| 9 | + |
| 10 | +<video |
| 11 | + controls |
| 12 | + className="w-full aspect-video rounded-xl" |
| 13 | + src="https://github.com/user-attachments/assets/6016c5dd-6c18-415e-b982-fafb56170b87" |
| 14 | +></video> |
| 15 | + |
| 16 | +## Features |
| 17 | + |
| 18 | +* **Interactive Chat Interface** for defining and refining learning goals through conversation |
| 19 | +* **AI-Powered Topic Narrowing** with smart, targeted questions to specify learning objectives |
| 20 | +* **Session Management** allowing multiple roadmap discussions and progress tracking |
| 21 | +* **Visual Progress Indicators** showing when sufficient information has been gathered |
| 22 | +* **Personalized Learning Plans** with structured, step-by-step roadmaps |
| 23 | +* **Conversational AI Flow** combining OpenAI and Perplexity APIs for intelligent interactions |
| 24 | + |
| 25 | +## Prerequisites |
| 26 | + |
| 27 | +* Python 3.8+ and pip |
| 28 | +* Node.js 16+ and npm |
| 29 | +* OpenAI API key |
| 30 | +* Perplexity API key |
| 31 | + |
| 32 | +## Installation |
| 33 | + |
| 34 | +```bash |
| 35 | +# Clone the repository |
| 36 | +git clone https://github.com/william-Dic/First-Principle.git |
| 37 | +cd First-Principle |
| 38 | + |
| 39 | +# Backend setup |
| 40 | +cd flask-server |
| 41 | +pip install -r requirements.txt |
| 42 | + |
| 43 | +# Frontend setup |
| 44 | +cd ../client |
| 45 | +npm install |
| 46 | +``` |
| 47 | + |
| 48 | +## Configuration |
| 49 | + |
| 50 | +Create `.env` file in the `flask-server` directory: |
| 51 | +```ini |
| 52 | +OPENAI_API_KEY=your_openai_api_key |
| 53 | +PPLX_API_KEY=your_perplexity_api_key |
| 54 | +PERPLEXITY_API_KEY=your_perplexity_api_key |
| 55 | +``` |
| 56 | + |
| 57 | +## Usage |
| 58 | + |
| 59 | +1. **Start Backend**: |
| 60 | + ```bash |
| 61 | + cd flask-server |
| 62 | + python server.py |
| 63 | + ``` |
| 64 | + Server runs on http://localhost:5000 |
| 65 | + |
| 66 | +2. **Start Frontend**: |
| 67 | + ```bash |
| 68 | + cd client |
| 69 | + npm start |
| 70 | + ``` |
| 71 | + Client runs on http://localhost:3000 |
| 72 | + |
| 73 | +3. **Generate Roadmap**: |
| 74 | + - Open http://localhost:3000 in your browser |
| 75 | + - Describe what you want to learn in the chat interface |
| 76 | + - Answer AI follow-up questions to refine your learning goals |
| 77 | + - Receive a personalized, structured learning roadmap |
| 78 | + |
| 79 | +## Code Explanation |
| 80 | + |
| 81 | +* **Frontend**: React application with conversational chat interface and progress indicators |
| 82 | +* **Backend**: Flask server managing API calls, session state, and conversation flow |
| 83 | +* **AI Integration**: Combines OpenAI API for conversational flow and Perplexity API for intelligent topic analysis |
| 84 | +* **Session Management**: Tracks conversation state and learning goal refinement |
| 85 | +* **Roadmap Generation**: Creates structured, actionable learning plans based on user input |
| 86 | +* **Conversational Flow**: Implements goal-oriented dialogue to narrow down learning objectives |
| 87 | + |
| 88 | +## Links |
| 89 | + |
| 90 | +- [GitHub Repository](https://github.com/william-Dic/First-Principle.git) |
| 91 | +- [Demo Video](https://github.com/user-attachments/assets/6016c5dd-6c18-415e-b982-fafb56170b87) |
0 commit comments