Deep Thinker is an AI-powered thought exploration tool that helps users visualize and expand their ideas using a canvas-based interface. It leverages OpenAI's GPT models to generate related thoughts and facilitate interactive conversations.
- Interactive canvas for visualizing thoughts
- AI-powered thought generation
- Drag-and-drop thought bubbles
- Zoom and pan functionality
- Chat interface for conversing with the AI assistant
- Token usage tracking and management
Before you begin, ensure you have met the following requirements:
- Node.js (v14 or later)
- npm (v6 or later)
- An OpenAI API key
-
Clone the repository:
git clone https://github.com/CalvinMagezi/mts-deepthinker.git cd deep-thinker
-
Install dependencies:
npm install
-
Create a
.env
file in the root directory and add your OpenAI API key:VITE_OPENAI_API_KEY=your_api_key_here
To run the project in development mode:
npm run dev
This will start the development server. Open your browser and navigate to http://localhost:5173
to view the application.
To build the project for production:
npm run build
To preview the production build:
npm run preview
src/
: Contains the main source codecomponents/
: React componentsutils/
: Utility functions and AI-related codetypes.ts
: TypeScript type definitionsApp.tsx
: Main application componentmain.tsx
: Entry point of the application
public/
: Static assetsvite.config.ts
: Vite configuration filetailwind.config.js
: Tailwind CSS configurationtsconfig.json
: TypeScript configuration
App.tsx
: The main component that orchestrates the entire application.Canvas.tsx
: Renders the thought canvas and manages connections between thoughts.ThoughtBubble.tsx
: Represents individual thoughts on the canvas.ChatWindow.tsx
: Provides an interface for conversing with the AI assistant.TokenDisplay.tsx
: Shows token usage statistics.
ai.ts
: Contains functions for interacting with the OpenAI API.tokenCalculator.ts
: Handles token calculations and cost estimations.tokenManager.ts
: Manages token usage and storage.
We welcome contributions to the Deep Thinker project. Here are some guidelines to get you started:
- Fork the repository and create your branch from
main
. - If you've added code that should be tested, add tests.
- Ensure your code lints and passes all tests.
- Issue a pull request with a comprehensive description of changes.
- Follow the existing code style and use TypeScript for type safety.
- Use functional components and React hooks.
- Leverage Tailwind CSS for styling components.
- Write meaningful commit messages and keep pull requests focused on a single feature or bug fix.
This project is open source and available under the MIT License.
If you have any questions or feedback, please open an issue on the GitHub repository.
Happy thinking with Deep Thinker!