Skip to content

LRF0422/Kotion

Repository files navigation

πŸ“š Knowledge Repo

A powerful collaborative knowledge management platform with rich text editing, AI-powered features, and extensive plugin ecosystem. Built with modern web technologies and real-time collaboration capabilities.

✨ Features

🎯 Core Capabilities

  • Rich Text Editor - Powered by Tiptap with collaborative editing support
  • Real-time Collaboration - Multi-user editing with Hocuspocus backend
  • Plugin Architecture - Extensible plugin system for custom functionality
  • AI Integration - AI-powered text generation, image creation, and content transformation
  • Multi-dimensional Tables - Spreadsheet-like tables with multiple view types (Table, Kanban, Gallery)
  • Visual Diagramming - Support for Excalidraw, DrawIO, Mermaid, and mind maps
  • File Management - Built-in file manager for document organization
  • Block References - Cross-document block linking and embedding
  • Internationalization - Full i18n support for multiple languages

πŸ”Œ Available Plugins

Data & Content

  • Bitable - Multi-dimensional tables with views (Table, Kanban, Gallery, Gantt)
  • Database - Database integration and management
  • File Manager - Document and file organization system
  • Block Reference - Cross-reference blocks across documents

AI & Automation

  • AI Plugin - Text generation, image creation, content transformation, and chat interface
  • Weaver OA - Enterprise workflow integration

Visualization & Diagramming

  • Excalidraw - Hand-drawn style diagrams
  • DrawIO - Professional diagramming tool
  • DrawIO v2 - Enhanced DrawIO integration
  • Drawnix - Alternative drawing solution
  • Mermaid - Text-based diagram generation
  • Mindmap Canvas - Interactive mind mapping

Core Features

  • Main Plugin - Core application features and navigation
  • Editor - Enhanced text editing capabilities
  • UI Components - Shared shadcn/ui component library

πŸ“¦ Technology Stack

Frontend

  • React 18 - Modern React with hooks and concurrent features
  • TypeScript 5 - Type-safe development
  • Vite - Fast build tool and dev server
  • Next.js - React framework for landing pages
  • Tailwind CSS - Utility-first CSS framework
  • shadcn/ui - High-quality React components
  • Tiptap - Headless editor framework
  • Hocuspocus - Real-time collaboration backend

Build & Infrastructure

  • Turborepo - High-performance monorepo build system
  • pnpm - Fast, disk space efficient package manager
  • Rollup - Module bundler for libraries
  • Docker - Containerization for deployment

AI Integration

  • DeepSeek AI - AI text generation
  • Vercel AI SDK - Streaming AI responses
  • Image Generation - AI-powered image creation

πŸ“š Project Structure

knowledge-repo/
β”œβ”€β”€ apps/
β”‚   β”œβ”€β”€ vite/                      # Main Vite application
β”‚   β”œβ”€β”€ landing-page/              # Next.js landing page
β”‚   └── landing-page-vite/         # Vite-based landing page
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ core/                     # Core application logic
β”‚   β”œβ”€β”€ editor/                   # Tiptap editor integration
β”‚   β”œβ”€β”€ common/                   # Shared utilities and types
β”‚   β”œβ”€β”€ ui/                       # shadcn/ui components
β”‚   β”œβ”€β”€ icon/                     # Icon library
β”‚   β”œβ”€β”€ plugin-main/              # Main plugin features
β”‚   β”œβ”€β”€ plugin-ai/                # AI capabilities
β”‚   β”œβ”€β”€ plugin-bitable/           # Multi-dimensional tables
β”‚   β”œβ”€β”€ plugin-file-manager/      # File management
β”‚   β”œβ”€β”€ plugin-block-reference/   # Block linking
β”‚   β”œβ”€β”€ plugin-database/          # Database integration
β”‚   β”œβ”€β”€ plugin-excalidraw/        # Excalidraw diagrams
β”‚   β”œβ”€β”€ plugin-drawio/            # DrawIO diagrams
β”‚   β”œβ”€β”€ plugin-drawio-v2/         # DrawIO v2
β”‚   β”œβ”€β”€ plugin-drawnix/           # Drawnix drawing
β”‚   β”œβ”€β”€ plugin-mermaid/           # Mermaid diagrams
β”‚   β”œβ”€β”€ plugin-mindmap-canvas/    # Mind mapping
β”‚   β”œβ”€β”€ plugin-weaver-oa/         # Weaver OA integration
β”‚   β”œβ”€β”€ eslint-config/            # Shared ESLint config
β”‚   β”œβ”€β”€ typescript-config/        # Shared TypeScript config
β”‚   └── rollup-config/            # Shared Rollup config
└── ...

πŸ‘₯ Prerequisites

Make sure you have the following installed:

πŸ› οΈ Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/knowledge-repo.git
    cd knowledge-repo
  2. Install dependencies:

    pnpm install
  3. Build all packages:

    pnpm build
  4. Start development:

    pnpm dev
  5. Start collaboration server (optional):

    pnpm room-server

πŸ’» Development

Build Commands

# Build all packages
pnpm build

# Build specific packages
pnpm build:core           # Core package
pnpm build:editor         # Editor package
pnpm build:ui             # UI components
pnpm build:ai             # AI plugin
pnpm build:bitable        # Bitable plugin
pnpm build:file-manager   # File manager plugin
pnpm build:app            # Main application
pnpm build:landing        # Landing page

Development Commands

# Start all apps in dev mode
pnpm dev

# Start collaboration server
pnpm room-server

# Lint all packages
pnpm lint

# Format code
pnpm format

Adding UI Components

Add new shadcn/ui components to the shared library:

# Example: Add a new component (card, button, tabs, etc.)
pnpm ui:add card
pnpm ui:add button
pnpm ui:add tabs

Clean Commands

# Clean all built packages
pnpm clean:packages

# Clean all node_modules
pnpm clean:lib

🐳 Docker Deployment

Build Docker images for production:

# Build main application
pnpm build:appDocker

# Build landing page
pnpm build:landingDocker

🎯 Plugin Development

Creating a New Plugin

  1. Create a new package in packages/:

    mkdir packages/plugin-yourplugin
    cd packages/plugin-yourplugin
  2. Set up package structure:

    plugin-yourplugin/
    β”œβ”€β”€ src/
    β”‚   β”œβ”€β”€ index.tsx              # Plugin entry
    β”‚   └── components/            # Plugin components
    β”œβ”€β”€ package.json
    β”œβ”€β”€ tsconfig.json
    β”œβ”€β”€ rollup.config.mjs
    └── README.md
    
  3. Define your plugin:

    import { Plugin } from '@kn/core';
    
    export const yourPlugin: Plugin = {
      name: 'yourplugin',
      extensions: [
        // Your Tiptap extensions
      ],
      components: [
        // Your React components
      ]
    };
  4. Register in the application:

    import { yourPlugin } from '@kn/plugin-yourplugin';
    import { App } from '@kn/core';
    
    <App plugins={[yourPlugin]} />

Plugin Best Practices

  • Use TypeScript for type safety
  • Implement i18n for multi-language support
  • Follow the existing plugin structure
  • Add comprehensive README documentation
  • Use shared UI components from @kn/ui
  • Implement proper error handling
  • Add unit tests for complex logic

🌐 Environment Configuration

Create a .env.local file for local development:

# AI Configuration
VITE_AI_IMAGE_API_KEY=your_api_key_here

# Other configurations...

πŸ“– Documentation

For detailed plugin documentation, see:

🀝 Contributing

Contributions are welcome! Here's how you can help:

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

Development Guidelines

  • Follow TypeScript best practices
  • Write meaningful commit messages
  • Add tests for new features
  • Update documentation as needed
  • Ensure all tests pass before submitting PR
  • Follow the existing code style

πŸ“ License

MIT License - feel free to use this project for personal or commercial purposes.

πŸš€ Roadmap

Completed βœ“

  • Rich text editor with Tiptap
  • Real-time collaboration
  • AI text and image generation
  • Multi-dimensional tables (Table, Kanban, Gallery views)
  • Multiple diagramming tools
  • File management system
  • Block reference system
  • Internationalization

In Progress 🚧

  • Gantt chart view for Bitable
  • Calendar view for Bitable
  • Timeline view for Bitable
  • Advanced filtering and sorting
  • Form view for data collection
  • Mobile responsive optimization

Planned πŸ’‘

  • Offline mode support
  • Advanced permissions system
  • Template marketplace
  • API documentation
  • Plugin marketplace
  • Desktop application (Electron)
  • Mobile applications (React Native)

❓ Support

If you encounter any issues or have questions:

  • Open an issue on GitHub
  • Check existing documentation
  • Review plugin-specific README files

πŸŽ‰ Acknowledgments

  • Built with Turborepo
  • UI components from shadcn/ui
  • Editor powered by Tiptap
  • Inspired by modern knowledge management tools

Made with ❀️ by the Knowledge Repo team

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages