Skip to content

Ly-GGboy/AI-Library

Repository files navigation

AI Library

English δΈ­ζ–‡ζ–‡ζ‘£

AI Library is a modern document management system developed by AI, focusing on providing an elegant reading experience and efficient knowledge management.

✨ Features

πŸ“± Responsive Layout

Responsive Layout Perfect adaptation for both desktop and mobile devices, providing a consistent reading experience.

πŸŒ“ Dark Mode

Dark Mode Automatically follows system settings to protect your eyes. Supports light, dark, and eye-protection modes.

πŸ” Real-time Search

Real-time Search Quickly locate documents, supporting both title and content search.

Feature Details

Reading Experience

  • Immersive Reading Mode
    • Intelligently hide non-essential UI elements
    • Automatically adjust content width and margins
    • Support for keyboard shortcuts
    • Real-time display of reading progress
    • Chapter navigation remains visible
    • Support for auto-scrolling
  • Multiple Theme Support
    • Light theme
    • Dark theme
    • Eye-protection mode
  • Reading Settings
    • Font size adjustment
    • Line height adjustment
    • Paragraph spacing settings
    • Page width control
  • Large Screen Optimization
    • Support for 24-40 inch display adaptation
    • Smart column layout
    • Optimized image display

Document Management

  • Support for Multiple Document Formats
    • Markdown documents
    • PDF files
  • Tree Directory Structure
  • Real-time Document Search
  • Recent Access Records
  • Reading Position Memory
  • Reading Time Statistics

User Experience

  • Responsive Design
  • Multiple Theme Support
  • Elegant Transition Animations
  • Gesture Operation Support
  • Keyboard Shortcut Support

System Features

  • HTTP/2 Support
  • High-performance Backend API
  • Real-time Search Engine
  • Multi-level Cache Optimization
  • Automatic Maintenance Tasks

Technology Stack

Frontend

  • Vue 3 (Composition API)
  • TypeScript
  • Tailwind CSS
  • Vite
  • Pinia State Management
  • Vue Router

Backend

  • FastAPI
  • Uvicorn (HTTP/2 Support)
  • Python 3.10+
  • SQLite Database
  • Asynchronous IO Processing

Deployment

  • HTTPS/HTTP2
  • Docker Support
  • Cloudflare Tunnel

Environment Requirements

Development Environment

  • Node.js 16+
  • Python 3.10+
  • pip
  • yarn/npm
  • Git

Production Environment

  • Linux/macOS/Windows
  • Docker (optional)

Installation Guide

1. Clone the Project

git clone https://github.com/yourusername/ai-library.git
cd ai-library

2. Backend Setup

# Create Python virtual environment
python -m venv py310
source py310/bin/activate  # Linux/macOS
# or
.\py310\Scripts\activate  # Windows

# Install dependencies
pip install -r requirements.txt

# Generate SSL certificate (for development environment)
openssl req -x509 -newkey rsa:4096 -keyout server/key.pem -out server/cert.pem -days 365 -nodes

3. Frontend Setup

cd client
yarn install  # or npm install

# Development environment configuration
cp .env.example .env.local

Development Guide

Start Development Server

  1. Backend Server
cd server
PYTHONPATH=/path/to/project/server python run.py
  1. Frontend Server
cd client
yarn dev  # or npm run dev

Development Mode

API Interfaces

Document Interfaces

  • GET /api/docs/tree - Get document directory tree
  • GET /api/docs/content/{path} - Get document content
  • GET /api/docs/metadata/{path} - Get document metadata
  • GET /api/docs/recent - Get recently accessed documents
  • GET /api/docs/breadcrumb/{path} - Get document breadcrumb navigation

Search Interfaces

  • GET /api/search?q={query} - Search documents
  • POST /api/search/rebuild-index - Rebuild search index

Project Structure

.
β”œβ”€β”€ client/                 # Frontend code
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/    # Vue components
β”‚   β”‚   β”œβ”€β”€ stores/        # Pinia state management
β”‚   β”‚   β”œβ”€β”€ services/      # API services
β”‚   β”‚   └── styles/        # Global styles
β”‚   └── public/            # Static resources
β”œβ”€β”€ server/                # Backend code
β”‚   β”œβ”€β”€ app/              # FastAPI application
β”‚   β”‚   β”œβ”€β”€ routers/      # API routes
β”‚   β”‚   β”œβ”€β”€ services/     # Business logic
β”‚   β”‚   └── models/       # Data models
β”‚   β”œβ”€β”€ static/           # Static files
β”‚   └── tests/            # Test cases
└── docs/                 # Documentation directory

Contribution Guide

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

License

MIT License

Contact

About

https://ailibrary.space/

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors