English | 繁體中文 | 简体中文 | 日本語 | 한국어 | Español
A modern, immersive, and highly interactive learning platform where users can explore knowledge through AI-generated wiki pages and intelligent questioning.
Interactive interface of AI Learning Wiki, showcasing the Cash-Out Refinance topic page
- AI-generated comprehensive wiki pages with rich formatting
- Intelligent "Related Topics" sidebar for exploring connected concepts
- Smart linking and progressive knowledge building
- Context-aware content generation
- Natural language question input on every page
- Context-aware answers based on current topic and learning path
- Smart suggestions for related questions
- Automatic detection of existing vs. new topics to avoid duplication
- Save learning sessions and custom knowledge bases
- Breadcrumb navigation showing learning path history
- Bookmarking favorite wiki pages
- Search across all generated content
- Responsive design optimized for desktop and tablet
- Clean, minimal design with elegant gradients and smooth transitions
- Behind-the-scenes mindmap structure organizing the knowledge graph
- Intelligent content generation guided by knowledge structure
- Persistent SQLite database storage for all pages and sessions
- Multi-database support for organizing different learning libraries
- Export-ready wiki pages
- Node.js 18+ installed
- An OpenAI API key from OpenAI Platform
- Clone the repository and install dependencies:
npm install- Configure your OpenAI API:
- Copy the sample environment file:
cp .env.sample .env.local- Edit
.env.localand add your OpenAI API key:
OPENAI_API_KEY=sk-your-openai-api-key-here- Optional: Customize the model (default: gpt-5):
OPENAI_MODEL=gpt-4o # Options: gpt-5, gpt-4o, gpt-4o-mini, gpt-4-turbo-preview, gpt-3.5-turbo- Optional: Use a different API endpoint (for Azure OpenAI or other providers):
OPENAI_API_BASE_URL=https://api.openai.com/v1 # default OpenAI endpoint- Run the development server:
npm run dev- Open http://localhost:3000 in your browser
- Start Learning: Enter any topic in the search box to generate a comprehensive wiki page
- Ask Questions: Use the question input to dive deeper into any concept
- Explore Related Topics: Click on related topics in the sidebar or page content
- Bookmark Pages: Save important pages for quick access later
- Track Progress: View your learning path in the sidebar breadcrumbs
- Search: Find previously generated content using the search function
- Frontend: Next.js 16, React 19, TypeScript
- Styling: Tailwind CSS 4 with custom gradients and animations
- Icons: Lucide React
- Markdown: React Markdown for rich content rendering
- AI: OpenAI API (supports GPT-5, GPT-4o, GPT-4o-mini, and GPT-3.5-turbo)
- Storage: Server-side SQLite database with better-sqlite3
TopicSearch: Initial topic entry interfaceWikiPage: Rich wiki page display with markdown renderingQuestionInput: Prominent question input for every pageSidebar: Navigation, bookmarks, and learning path
lib/ai-service.ts: AI-powered wiki generation and question answeringlib/storage.ts: Storage API client layer for pages, sessions, bookmarks, and mindmaplib/db.ts: SQLite database layer with better-sqlite3lib/types.ts: TypeScript type definitionsapp/api/generate/route.ts: API endpoint for AI content generationapp/api/pages/route.ts: CRUD endpoint for wiki pagesapp/api/sessions/route.ts: Learning sessions managementapp/api/bookmarks/route.ts: Bookmarks managementapp/api/mindmap/route.ts: Knowledge graph management
- User enters topic or question
- Check if content already exists in SQLite database via API
- If not, generate new content via AI API
- Update mindmap structure to maintain knowledge graph
- Save to SQLite database via API and update UI
- Track in learning session for navigation
Edit .env.local to customize:
- Model selection:
OPENAI_MODEL(default: gpt-5)- Options: gpt-5, gpt-4o, gpt-4o-mini, gpt-4-turbo-preview, gpt-3.5-turbo
- Note: gpt-5 requires special access from OpenAI
- API endpoint:
OPENAI_API_BASE_URL(for Azure OpenAI or other providers)
Edit app/api/generate/route.ts for advanced settings:
- Temperature (default: 0.7 for non-GPT-5 models)
- Max completion tokens (default: 16000)
- Response format (JSON object)
- Request timeout (default: 2 minutes)
- Modify
app/globals.cssfor global styles - Update Tailwind classes in components for visual changes
- Gradients use blue-indigo-purple palette
Edit prompts in lib/ai-service.ts to customize:
- Wiki page structure and tone
- Related topics suggestions
- Question answering style
- Invisible graph structure organizing all topics
- Parent-child relationships between pages
- Depth tracking for knowledge hierarchy
- Smart linking based on context
- Automatic session creation on first topic
- Breadcrumb navigation (last 10 pages)
- Page count tracking
- Session persistence in SQLite database
- Survives browser restarts and page refreshes
- Exact match detection for topics
- Similar question detection
- Reuse existing content when possible
- Consistent page IDs based on title + timestamp
# Run development server
npm run dev
# Build for production
npm run build
# Start production server
npm start
# Lint code
npm run lintModern browsers with:
- ES6+ JavaScript support
- CSS Grid and Flexbox
- Fetch API
- Recommended: Latest Chrome, Firefox, Safari, or Edge
This project is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0) - see the LICENSE file for details.
The AGPL-3.0 is a free, copyleft license that requires anyone who runs a modified version of this software on a server to make the modified source code available to users.
Contributions are welcome! Please feel free to submit a Pull Request.