Skip to content

Latest commit

Β 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Focus Hub 🎯

A modern, AI-powered task and knowledge management application built with React and TypeScript. Focus Hub helps you organize your work items, projects, and ideas with universal AI assistant integration supporting ChatGPT, Google Gemini, Claude, and more.

Focus Hub License Build AI Enabled

✨ Features

πŸ€– Universal AI Integration (New!)

  • Multi-Platform Support: Works with ChatGPT, Google Gemini, Claude, and any REST API
  • Natural Language Interface: Query and manage tasks using conversational AI
  • Intelligent Processing: AI Gateway understands context and intent
  • Real-time Sync: Automatic synchronization between AI and app
  • Offline Support: Queue operations when offline, sync when reconnected

πŸ“Š Dual View Modes

  • Grouped View: Hierarchical organization by categories and subcategories
  • Table View: Flat list with sortable columns and quick overview

🎨 Modern UI/UX

  • Clean, minimalist design inspired by Excalidraw
  • Dark mode support with automatic system detection
  • Smooth animations and transitions
  • Responsive layout for all screen sizes
  • API sync status indicator

πŸ“‚ Organization System

  • Categories: Top-level organization (Personal, Work, Project, etc.)
  • Subcategories: Second-level grouping within categories
  • Items: Individual tasks or knowledge items
  • Tags: Cross-cutting labels for flexible organization

πŸ”„ Drag & Drop

  • Reorder items within categories
  • Move items between categories and subcategories
  • Visual feedback during dragging
  • Different behavior for Grouped vs Table view

πŸ’Ύ Data Management

  • Local browser storage using IndexedDB (Dexie)
  • Import/Export functionality with compression
  • Automatic saving
  • No server required - fully client-side

πŸ“ Rich Item Features

  • Progress tracking (0-100%)
  • External links
  • Notes and descriptions
  • Comments system
  • Tags with autocomplete
  • Real-time search

🎯 Additional Features

  • Notes view for free-form documentation
  • Category management (add, rename, recolor)
  • Subcategory creation
  • Context menus for quick actions
  • Keyboard shortcuts (ESC to close modals)

πŸš€ Getting Started

Prerequisites

  • Node.js 18+ (for native fetch support)
  • npm or yarn

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/focus-hub.git
cd focus-hub
  1. Install dependencies:
# Main app
npm install

# API server dependencies
cd server
npm install

# MCP server dependencies (for Claude)
cd ../mcp-server
npm install
  1. Start the services:

Terminal 1 - React App:

npm start
# Runs on http://localhost:3000

Terminal 2 - API Server (optional, for AI features):

cd server
node index.js
# Runs on http://localhost:3001

Terminal 3 - AI Gateway (optional, for AI features):

cd server
node ai-gateway.js
# Runs on http://localhost:3002
  1. Open http://localhost:3000 in your browser

Production Build

npm run build

This creates an optimized production build in the build/ folder.

πŸ—οΈ Architecture

Tech Stack

Frontend

  • React 18 - UI framework
  • TypeScript - Type safety
  • Tailwind CSS - Styling (custom theme system)
  • Dexie.js - IndexedDB wrapper
  • @dnd-kit - Drag and drop
  • @tanstack/react-table - Table management
  • Lucide React - Icons
  • LZ-String - Data compression

Backend (AI Integration)

  • Express.js - REST API server
  • SQLite3 - Database for API server
  • MCP SDK - Claude Desktop integration
  • OpenAPI 3.0 - API specification
  • Natural Language Processing - Custom query parser

Project Structure

focus-hub/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ WorkTable/       # Main table component
β”‚   β”‚   β”œβ”€β”€ Modals/          # All modal dialogs
β”‚   β”‚   β”œβ”€β”€ Notes/           # Notes view
β”‚   β”‚   β”œβ”€β”€ ApiSync/         # API synchronization UI
β”‚   β”‚   └── SettingsMenu/    # Settings dropdown
β”‚   β”œβ”€β”€ hooks/               # Custom React hooks
β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”œβ”€β”€ database.ts      # IndexedDB operations
β”‚   β”‚   └── apiClient.ts     # API client with offline support
β”‚   β”œβ”€β”€ contexts/            # React contexts (Theme)
β”‚   β”œβ”€β”€ theme/
β”‚   β”‚   └── styles.ts        # Centralized styling system
β”‚   β”œβ”€β”€ types/               # TypeScript definitions
β”‚   └── utils/               # Helper functions
β”œβ”€β”€ server/
β”‚   β”œβ”€β”€ index.js             # REST API server
β”‚   β”œβ”€β”€ ai-gateway.js        # Universal AI gateway
β”‚   β”œβ”€β”€ openapi.yaml         # OpenAPI specification
β”‚   └── focushub.db          # SQLite database
β”œβ”€β”€ mcp-server/
β”‚   └── index.js             # Claude MCP server
β”œβ”€β”€ integrations/
β”‚   β”œβ”€β”€ chatgpt-action.json # ChatGPT configuration
β”‚   └── gemini-extension.json # Gemini configuration
└── docs/
    β”œβ”€β”€ USER_GUIDE.md        # Comprehensive user guide
    β”œβ”€β”€ AI_AGENT_SETUP.md    # AI setup instructions
    └── UNIVERSAL_AI_INTEGRATION.md # Universal AI guide

πŸ“± Usage Guide

Adding Items

  1. Click "Add Item" button or use category menu
  2. Fill in item details (name, category, tags, etc.)
  3. Items added from a category auto-select that category

Managing Categories

  1. Click settings menu β†’ "Manage Categories"
  2. Add, rename, or change category colors
  3. Categories persist across sessions

Drag & Drop

  • Grouped View: Drag items between categories/subcategories
  • Table View: Reorder items in the list
  • Drag handle appears on hover

Search & Filter

  • Global search across all item fields
  • Filters work in both view modes
  • Real-time results as you type

Import/Export

  • Export: Settings β†’ Export Data
  • Import: Settings β†’ Import Data
  • Data is compressed for smaller file sizes

πŸ€– AI Integration

Quick Setup for AI Assistants

ChatGPT:

  1. Start servers: node server/index.js and node server/ai-gateway.js
  2. Use ngrok: ngrok http 3002
  3. Import OpenAPI spec in ChatGPT Actions
  4. Query: "Show me all tasks in Work category"

Google Gemini:

  1. Upload integrations/gemini-extension.json to AI Studio
  2. Point to http://localhost:3002/api/ai/gemini
  3. Use natural language to manage tasks

Claude Desktop:

  1. Add MCP server to claude_desktop_config.json
  2. Restart Claude Desktop
  3. Use Focus Hub tools directly in Claude

Example AI Queries:

  • "Create a new project for mobile app"
  • "Show me all urgent tasks"
  • "Mark task ABC as completed"
  • "Give me analytics about my work items"

See UNIVERSAL_AI_INTEGRATION.md for detailed setup.

🚒 Deployment

Vercel (Recommended)

  1. Push code to GitHub
  2. Import repository in Vercel
  3. Deploy with default settings

Manual Deployment

  1. Build the project: npm run build
  2. Deploy the build/ folder to any static hosting service
  3. No server configuration needed

πŸ”§ Configuration

Environment Variables

React App (.env)

REACT_APP_API_URL=http://localhost:3001/api  # Optional, for API sync

API Server (server/.env)

PORT=3001                    # API server port
AI_GATEWAY_PORT=3002         # AI gateway port
DB_PATH=./focushub.db        # Database file location

API Endpoints

Endpoint Method Description
/api/health GET Health check
/api/items GET Get all items (with filters)
/api/items POST Create new item
/api/items/:id GET Get specific item
/api/items/:id PUT Update item
/api/items/:id DELETE Delete item
/api/categories GET List all categories
/api/tags GET List all unique tags
/api/analytics GET Get analytics data
/api/sync POST Bulk sync items
/api/ai/query POST Natural language query
/api/ai/health GET AI gateway health check

Customization

  • Categories: Stored in localStorage and synced to API
  • Theme: Auto-detects system preference
  • Data: Stored in browser's IndexedDB with API backup
  • AI Responses: Customizable per platform in gateway server

πŸ“Š Performance

  • Initial Load: ~140KB gzipped
  • Build Size: 2.2MB uncompressed
  • Dependencies: Optimized for production
  • Browser Support: Modern browsers (Chrome, Firefox, Safari, Edge)

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

πŸ› οΈ What's New in v2.0.0

Major Features

  • πŸ€– Universal AI Integration: Support for ChatGPT, Gemini, Claude, and REST APIs
  • πŸ”„ API Server: Complete REST API with SQLite backend
  • 🧠 Natural Language Processing: AI Gateway for intelligent query parsing
  • πŸ“‘ Real-time Sync: Automatic synchronization with offline support
  • 🎨 Improved UI: Consistent styling system and better tag management

Technical Improvements

  • Centralized theme system with consistent naming
  • API client with queue management
  • OpenAPI 3.0 specification
  • MCP server for Claude Desktop
  • Comprehensive test suites

πŸ“ž Support

For issues, questions, or suggestions:


Made with ❀️ by VZ | v2.0.0 | October 2025

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages