A privacy-first, local-development AI chatbot that helps founders, entrepreneurs, and inventors protect their ideas using the power of Grok (xAI).
IPGuardian-AI brings a natural-language interface to the full intellectual property lifecycle:
- Idea capture & initial patentability assessment
- Prior art reasoning & strategy suggestions
- Patent drafting guidance & claim optimization feedback
- Office action response simulation
- Portfolio management concepts
- Anti-patent-troll defense tactics (IPR ideas, weak patent flagging)
The Home page displays the complete modular prompt system (Meta + Phase-specific prompts) so you can understand exactly how the agent thinks — and copy-paste them into other Grok interfaces if desired.
Important
This is not legal advice. Outputs are AI-generated and may contain errors or hallucinations. Always consult a registered patent attorney/agent before filing anything or making legal decisions.
- Interface: Beautiful, responsive chat interface with mobile-friendly layout.
- Persistence: Persistent chat history (saved in browser
localStorage). - Security: Secure xAI Grok API integration (key stored only in
.env). - Transparency: Home page showing all system prompts transparently.
- UX: Basic error handling, loading indicators, and markdown rendering.
- Prompt chaining across IP lifecycle phases.
- Simulated patentability & obviousness scoring.
- Claim chart & prior art suggestion helpers.
- DOCX/JSON export for drafts.
- Dark mode toggle & PWA support.
- Optional local/offline LLM fallback.
- Frontend: React 18+, Vite, React Router
- Styling: Tailwind CSS
- API: xAI Grok API (OpenAI-compatible endpoint)
- State: React Context +
localStorage - HTTP: Axios
- Formatting:
react-markdown
- Node.js ≥ 18 (LTS recommended)
- npm (or pnpm / yarn)
- A paid xAI Grok API key (from console.x.ai)
Warning
Cost Warning: Every message consumes tokens on xAI's servers. Usage is billed per token (input + output). Monitor your usage in the xAI console.
- Clone the repository
git clone https://github.com/jrq3rq/IPGuardian-AI.git
cd IPGuardian-AI
- Install dependencies
npm install
- Create
.envfile in the root folder:
VITE_GROK_API_KEY=xai-YourActualApiKeyHere
VITE_GROK_MODEL=grok-4-1-fast
VITE_DEBUG=true
Note: Never commit .env — it's already in .gitignore.
4. Start development server
npm run dev
Open http://localhost:5173.
IPGuardian-AI/
├── public/ # Static files served directly (no processing)
│ ├── favicon.ico # Browser tab icon
│ ├── index.html # Main HTML template with <div id="root"></div>
│ ├── manifest.json # PWA metadata (app name, icons, install behavior)
│ └── images/ # Unprocessed static images (Vite serves as-is)
│ ├── logo.png # Main app logo (512×512 for PWA)
│ ├── logo192.png # Smaller PWA icon (192×192)
│ └── ip-bg.jpg # Optional background image
├── src/ # All source code
│ ├── assets/ # Vite-optimized assets (images get hashed & optimized)
│ │ └── ip-bg.jpg # Example optimized background
│ ├── components/ # Reusable UI pieces (building blocks)
│ │ ├── ChatWindow.jsx # Scrollable message list container
│ │ ├── MessageBubble.jsx # Single user/AI message UI
│ │ ├── InputForm.jsx # Text input + send button + loading spinner
│ │ ├── Header.jsx # Top navigation bar / branding
│ │ ├── Footer.jsx # Bottom disclaimer & credits
│ │ ├── ErrorDisplay.jsx # Reusable error alerts/toasts
│ │ ├── PromptDisplay.jsx # Renders individual prompt blocks (for Home page)
│ │ └── Sidebar.jsx # Optional left/right navigation panel
│ ├── context/ # Global state providers (React Context)
│ │ ├── ChatContext.jsx # Manages messages, loading, API key, history
│ │ └── PromptContext.jsx # Manages prompt data/display state (if dynamic)
│ ├── hooks/ # Custom reusable hooks
│ │ ├── useChat.js # Core chat logic: send message, stream response, errors
│ │ ├── useLocalStorage.js # Persist chat history / settings in browser
│ │ └── useApi.js # Abstracts API calls, retries, auth header
│ ├── pages/ # Route-level page components
│ │ ├── Home.jsx # Landing page: welcome + prompt showcase
│ │ ├── Chat.jsx # Main chatbot interface
│ │ └── About.jsx # Info, disclaimers, usage guide
│ ├── services/ # Non-UI business logic
│ │ └── apiService.js # Grok API wrapper (fetch, headers, error handling)
│ ├── styles/ # All CSS (global + component-specific)
│ │ ├── App.css # App-wide overrides (if needed)
│ │ ├── ChatWindow.css # Chat scroll area, bubbles styling
│ │ ├── InputForm.css # Input field + button look
│ │ ├── Home.css # Landing page layout tweaks
│ │ └── index.css # Global resets + Tailwind directives (@tailwind base; etc.)
│ ├── utils/ # Pure helper functions
│ │ ├── formatMessage.js # Process Grok markdown → safe HTML
│ │ └── validatePrompt.js # Basic prompt sanity checks
│ ├── App.jsx # Root layout + React Router setup
│ ├── main.jsx # Vite entry point (renders App)
│ └── index.css # Usually same as global CSS (sometimes merged)
├── .env # Your secrets (never commit!)
├── .env.example # Template for others (shows required vars)
├── .gitignore # Ignores node_modules, dist, .env, etc.
├── package.json # Dependencies & scripts
├── postcss.config.js # Required for Tailwind + PostCSS plugins
├── tailwind.config.js # Tailwind config (content paths, custom theme)
├── vite.config.js # Vite build/dev config (plugins, proxy, etc.)
└── README.md # This file — project docs
- Not a Lawyer: This tool is for education and brainstorming only. AI can miss legal nuances or give incorrect advice.
- Data Privacy: Data is sent to xAI for processing. No invention data is stored on our servers beyond your local browser history.
- API Costs: Grok API is pay-per-use. Long conversations can become expensive quickly.
Ideas, bug reports, and UI improvements are welcome.
- Open an issue to discuss major changes.
- Fork → branch → pull request.
License: MIT License. See LICENSE file for details.
Built to make high-quality IP protection more accessible. Questions? Open an issue or tag @jrq3rq on X.
Would you like me to help you draft a more detailed CONTRIBUTING.md file or a license for this project?