Skip to content

AiKiAi-stack/efficio

Repository files navigation

Efficio - Efficiency Tracker

🎯 PDCA-based personal/team efficiency analysis tool - Track work, optimize expression, analyze efficiency patterns

TypeScript React Node.js License

🌐 δΈ­ζ–‡


✨ Features

Feature Description
πŸ“ Work Logging Complete daily work entries in 3 minutes, supports semi-structured input
πŸ€– AI Optimization Auto-optimize work expressions with Anthropic Claude, highlight value
πŸ“Š Structured Analysis Auto task classification, time extraction, tagging, deep work detection
πŸ“ˆ Weekly/Monthly Reports Auto-generate efficiency reports, identify time distribution and patterns
πŸ’‘ Actionable Suggestions Personalized data-driven recommendations to boost efficiency
🌍 Weather Integration Real-time weather display, correlate efficiency with weather conditions
πŸ”Œ Multi AI Provider Support 10+ AI services, including custom OpenAI-compatible endpoints

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Web Input  β”‚ ──▢ β”‚  API    β”‚ ──▢ β”‚  AI Layer    β”‚ ──▢ β”‚ Database β”‚
β”‚  Interface  β”‚     β”‚  Server β”‚     β”‚  Optimize +  β”‚     β”‚ Storage  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β”‚  Structured  β”‚     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                               β”‚
                                               β–Ό
                                      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                      β”‚  Markdown    β”‚
                                      β”‚  Dashboard   β”‚
                                      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸš€ Quick Start

Option 1: Docker Deployment (Recommended for Production)

# 1. Clone the repository
git clone https://github.com/your-org/RecordEvo.git
cd RecordEvo

# 2. Copy environment file
cp .env.example .env

# 3. Edit .env with your credentials
# - SUPABASE_URL
# - SUPABASE_SERVICE_KEY
# - ANTHROPIC_API_KEY

# 4. Start services
docker-compose up -d

# 5. View logs
docker-compose logs -f

Visit http://localhost:3001

Option 2: Development Mode

# 1. Install dependencies
npm install

# 2. Configure environment
cp server/.env.example server/.env
# Edit server/.env with your configuration

# 3. Start development server
npm run dev

Visit:


πŸ“¦ Tech Stack

Backend

Technology Purpose
Node.js + Express Web server framework
TypeScript Type-safe JavaScript
SQLite / Turso Local/Cloud database
Supabase PostgreSQL cloud database (optional)
Anthropic SDK Claude AI integration
OpenAI SDK Multi AI Provider compatible
node-cron Scheduled task management
Zod Runtime type validation

Frontend

Technology Purpose
React 18 UI framework
TypeScript Type safety
Vite Build tool
TailwindCSS Atomic CSS
React Router Route management
Recharts Data visualization

πŸ“‹ API Endpoints

Authentication

Method Endpoint Description
POST /api/auth/login User login

Work Records

Method Endpoint Description
GET /api/records Get record list
POST /api/records Create new record (with AI analysis)
GET /api/records/:id Get single record
DELETE /api/records/:id Delete record

AI Features

Method Endpoint Description
POST /api/optimize AI text optimization
POST /api/analyze AI structured analysis

Summary Reports

Method Endpoint Description
GET /api/summaries/weekly Get weekly summaries
POST /api/summaries/weekly/generate Generate weekly summary
GET /api/trends/monthly Get monthly trends
POST /api/trends/monthly/generate Generate monthly trend

Suggestions

Method Endpoint Description
GET /api/suggestions Get optimization suggestions
POST /api/suggestions/generate Generate suggestions
PATCH /api/suggestions/:id/action Mark suggestion as actioned

Settings

Method Endpoint Description
GET /api/settings/ai-providers Get all AI Providers
POST /api/settings/ai-providers/:provider/config Save Provider config
POST /api/settings/ai-providers/:provider/activate Activate Provider
POST /api/settings/ai-providers/:provider/test Test connection
GET /api/settings/custom-providers Get custom Providers
POST /api/settings/custom-providers Create custom Provider
PUT /api/settings/custom-providers/:id Update custom Provider
DELETE /api/settings/custom-providers/:id Delete custom Provider

πŸ“ Project Structure

RecordEvo/
β”œβ”€β”€ client/                 # Frontend React application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ App.tsx        # Main application component
β”‚   β”‚   β”œβ”€β”€ api.ts         # API client
β”‚   β”‚   └── pages/
β”‚   β”‚       β”œβ”€β”€ Dashboard.tsx      # Dashboard
β”‚   β”‚       β”œβ”€β”€ TaskTracker.tsx    # Task tracking
β”‚   β”‚       β”œβ”€β”€ RecordsHistory.tsx # History records
β”‚   β”‚       └── Settings.tsx       # Settings page
β”‚   β”œβ”€β”€ package.json
β”‚   └── vite.config.ts
β”‚
β”œβ”€β”€ server/                 # Backend Express service
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ index.ts       # Entry point
β”‚   β”‚   β”œβ”€β”€ routes/        # API routes
β”‚   β”‚   β”‚   β”œβ”€β”€ auth.ts
β”‚   β”‚   β”‚   β”œβ”€β”€ records.ts
β”‚   β”‚   β”‚   β”œβ”€β”€ optimize.ts
β”‚   β”‚   β”‚   β”œβ”€β”€ analyze.ts
β”‚   β”‚   β”‚   β”œβ”€β”€ summaries.ts
β”‚   β”‚   β”‚   β”œβ”€β”€ trends.ts
β”‚   β”‚   β”‚   β”œβ”€β”€ suggestions.ts
β”‚   β”‚   β”‚   └── settings.ts
β”‚   β”‚   └── lib/           # Core libraries
β”‚   β”‚       β”œβ”€β”€ ai.ts              # AI service
β”‚   β”‚       β”œβ”€β”€ ai-providers.ts    # AI Provider management
β”‚   β”‚       β”œβ”€β”€ config-manager.ts  # Configuration management
β”‚   β”‚       β”œβ”€β”€ database.ts        # Database service
β”‚   β”‚       β”œβ”€β”€ database-adapter.ts# Database adapter interface
β”‚   β”‚       β”œβ”€β”€ sqlite-adapter.ts  # SQLite implementation
β”‚   β”‚       β”œβ”€β”€ turso-adapter.ts   # Turso implementation
β”‚   β”‚       └── cron.ts            # Scheduled tasks
β”‚   β”œβ”€β”€ sql/
β”‚   β”‚   └── sqlite-schema.sql      # Database Schema
β”‚   └── package.json
β”‚
β”œβ”€β”€ scripts/                # Utility scripts
β”œβ”€β”€ docker-compose.yml      # Docker orchestration
β”œβ”€β”€ Dockerfile             # Docker image
β”œβ”€β”€ .env.example           # Environment variables example
└── package.json           # Root project configuration

🎯 Supported AI Providers

Pre-defined Providers

Provider Description
Anthropic Claude US AI company, Claude series models
OpenAI GPT GPT-4/ChatGPT
DeepSeek Chinese large model, cost-effective
Zhipu AI GLM series models
Kimi Moonshot AI, long-text processing
NVIDIA NIM NVIDIA GPU cloud, Llama and more
vLLM Open-source model inference framework
Aliyun Bailian Tongyi Qianwen Qwen series
Volcengine Doubao/Ark large models
MiniMax Chinese MiniMax large models
OpenRouter Aggregates multiple AI providers

Custom Provider

Support adding any OpenAI-compatible API endpoint, just provide:

  • Provider name
  • API Key
  • API Endpoint
  • Model name

πŸ”§ Environment Variables

# Required configuration
SUPABASE_URL=your_supabase_url          # Supabase project URL
SUPABASE_SERVICE_KEY=your_service_key   # Supabase service key
ANTHROPIC_API_KEY=your_anthropic_key    # Anthropic API Key

# Optional configuration
PORT=3001                               # Server port
NODE_ENV=production                     # Runtime environment
ALLOWED_ORIGINS=http://localhost:5173   # CORS allowed origins

# AI Provider configuration (as needed)
OPENAI_API_KEY=your_openai_key
DEEPSEEK_API_KEY=your_deepseek_key
ZHIPU_API_KEY=your_zhipu_key
# ... more Provider configurations

# Database mode (optional: memory | sqlite | turso)
DATABASE_MODE=sqlite
SQLITE_DB_PATH=./data/efficiency.db

πŸ“… Roadmap

Phase Time Content Status
Phase 1 Week 1-2 MVP - Basic recording system βœ… Completed
Phase 2 Week 3-4 Structured data extraction βœ… Completed
Phase 3 Week 5-6 Weekly Summary Agent βœ… Completed
Phase 4 Week 7-8 Monthly trend analysis βœ… Completed
Phase 5 Week 9-10 Dashboard βœ… Completed
Phase 6 Week 11-12 Optimization suggestions βœ… Completed
Phase 7 Week 13+ SQLite/Turso support βœ… Completed
Phase 8 Week 14+ Custom AI Provider βœ… Completed

πŸ›‘οΈ Security Notes

  • ⚠️ Do NOT commit .env files to version control
  • πŸ”’ Use HTTPS in production
  • πŸ”‘ Rotate API keys regularly
  • 🚫 Restrict CORS origins

πŸ“ Design Principles

  1. Only build features you'll use long-term - Avoid over-engineering
  2. Structure over fancy UI - Data value > Visual effects
  3. AI output must have decision value - Every output needs actionable guidance
  4. System must be evolvable - Iterative development in phases

πŸ§ͺ Testing

# Run tests
npm test

# Test coverage
npm run test:coverage

# Watch mode
npm run test:watch

🀝 Contributing

  1. Fork this 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

MIT License - See LICENSE file for details


πŸ™ Acknowledgments


Made with ❀️ by RecordEvo Team

⭐ Star this repo | πŸ› Report Issues

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors