|
1 | 1 | ---
|
2 |
| -title: FirstPrinciples App | AI-Powered Learning Roadmaps |
3 |
| -description: An AI-powered learning roadmap generator that helps users identify specific learning topics and provides personalized learning plans. |
4 |
| -sidebar_position: 1 |
5 |
| -keywords: [firstprinciples, learning, roadmap, education, AI, personalized, Flask, React, OpenAI, Perplexity] |
| 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 | 6 | ---
|
7 | 7 |
|
8 | 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 | 9 |
|
10 |
| -https://github.com/user-attachments/assets/6016c5dd-6c18-415e-b982-fafb56170b87 |
| 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> |
11 | 15 |
|
12 | 16 | ## Features
|
13 | 17 |
|
14 |
| - * **Interactive Chat Interface**: A simple, conversational interface for defining your learning goals. |
15 |
| - * **AI-Powered Topic Narrowing**: The AI asks smart, targeted questions to help you specify what you want to learn. |
16 |
| - * **Session Management**: Each conversation is a managed session, allowing you to have multiple roadmap discussions. |
17 |
| - * **Visual Progress Indicator**: See a visual cue when the AI has gathered enough information to generate your roadmap. |
| 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 |
18 | 24 |
|
19 |
| -## Setup |
| 25 | +## Prerequisites |
20 | 26 |
|
21 |
| -### Getting Started |
| 27 | +* Python 3.8+ and pip |
| 28 | +* Node.js 16+ and npm |
| 29 | +* OpenAI API key |
| 30 | +* Perplexity API key |
22 | 31 |
|
23 |
| -To get the project files, first clone the repository: |
| 32 | +## Installation |
24 | 33 |
|
25 |
| -``` |
| 34 | +```bash |
| 35 | +# Clone the repository |
26 | 36 | git clone https://github.com/william-Dic/First-Principle.git
|
27 | 37 | cd First-Principle
|
28 |
| -``` |
29 | 38 |
|
30 |
| ------ |
31 |
| - |
32 |
| -### Backend Setup |
33 |
| - |
34 |
| -1. Navigate to the Flask server directory: |
35 |
| - ``` |
36 |
| - cd flask-server |
37 |
| - ``` |
38 |
| -2. Install dependencies: |
39 |
| - ``` |
40 |
| - pip install -r requirements.txt |
41 |
| - ``` |
42 |
| -3. Create a `.env` file in the `flask-server` directory with your API keys: |
43 |
| - ``` |
44 |
| - OPENAI_API_KEY = Your_openai_apikey |
45 |
| - PPLX_API_KEY = Your_perplexity_apikey |
46 |
| - PERPLEXITY_API_KEY = Your_perplexity_apikey |
47 |
| - ``` |
48 |
| -4. Run the Flask server: |
49 |
| - ``` |
50 |
| - python server.py |
51 |
| - ``` |
52 |
| - The server will run on http://localhost:5000. |
53 |
| - |
54 |
| ------ |
55 |
| - |
56 |
| -### Frontend Setup |
57 |
| - |
58 |
| -1. Navigate to the client directory: |
59 |
| - ``` |
60 |
| - cd client |
61 |
| - ``` |
62 |
| -2. Install dependencies: |
63 |
| - ``` |
64 |
| - npm install |
65 |
| - ``` |
66 |
| -3. Run the React development server: |
67 |
| - ``` |
68 |
| - npm start |
69 |
| - ``` |
70 |
| - The client will run on http://localhost:3000. |
| 39 | +# Backend setup |
| 40 | +cd flask-server |
| 41 | +pip install -r requirements.txt |
71 | 42 |
|
72 |
| -## Usage |
| 43 | +# Frontend setup |
| 44 | +cd ../client |
| 45 | +npm install |
| 46 | +``` |
73 | 47 |
|
74 |
| -1. Open your browser and go to `http://localhost:3000`. |
75 |
| -2. Use the chat interface to describe what you want to learn. |
76 |
| -3. Answer the AI's follow-up questions to help it narrow down your specific needs. |
77 |
| -4. Once the AI has sufficient information, it will generate your personalized learning roadmap. |
| 48 | +## Configuration |
78 | 49 |
|
79 |
| ------ |
| 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 | +``` |
80 | 56 |
|
81 |
| -## Tech Stack |
| 57 | +## Usage |
82 | 58 |
|
83 |
| - * **Frontend**: React |
84 |
| - * **Backend**: Flask, Python |
85 |
| - * **AI Engine**: OpenAI API, Perplexity API |
| 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