ๆบ่ฝๆฅๅไธๅพ ๅ่งๅ โ Integrated Calendar, Todo & AI-Powered Scheduling
">https://img.shields.io/badge/node-%3E%3D18-green.svg">
A full-stack calendar and task management application built on the Eisenhower Priority Matrix. It offers both algorithm-based and LLM-powered intelligent scheduling to help you plan your time efficiently.
- Create, delete, and toggle multiple calendars with custom names & colors
- Import iCal (
.ics) files โ auto-creates a dedicated calendar and batch-imports events - Full RRULE (RFC 5545) support for recurring events
- Automatic priority classification by urgency & importance (1โ4 scale):
- P1 Urgent & Important โ Red
- P2 Important โ Orange
- P3 Urgent โ Blue
- P4 Normal โ Green
- Status flow: Todo โ Scheduled โ Done
- Deadline countdown with overdue highlighting
- Estimated duration, description, and full metadata
- Algorithm Scheduler โ Greedy strategy ordered by priority & deadline; avoids existing events; respects work hours (7:00โ23:00); inserts 15-min breaks every 2 hours; 30-day planning horizon
- LLM Scheduler โ Supports OpenAI / DeepSeek / Ollama / LM Studio / custom providers; generates context-aware schedules via natural language
- Smart Splitting โ Tasks > 90 min are auto-split with breaks; labeled
(1/N),(2/N), etc.; produces independent todo records when applied - Pre-schedule validation: time conflicts, late-night shifts, deadline violations
- One-click apply โ auto-marks todos as scheduled and displays on calendar
- Customizable LLM prompt templates for fine-tuning scheduling strategy
- Light / Dark / System theme options
- Full component-level dark mode support
- Chinese / English switch
- Calendar locale auto-adjusts with language
- Drag to move events; drag edges to resize
- Click empty area to quick-create an event
- Scheduled todos shown with
[Todo]prefix and custom color - Export weekly calendar to Excel (week view + event detail sheets)
- LLM API keys stored with AES-256-GCM encryption
- API never returns key plaintext
| Layer | Technology |
|---|---|
| Frontend | React 18 ยท TypeScript ยท Ant Design 5 ยท FullCalendar 6 |
| Backend | Express ยท TypeScript ยท sql.js (SQLite WASM) |
| Build | Vite 6 |
| LLM | OpenAI / DeepSeek / Ollama |
- Node.js โฅ 18 (LTS recommended) โ Download
- OS: Windows (batch scripts provided); macOS / Linux work via CLI
- Double-click
install.batto install dependencies - Double-click
start.batto launch the app
start.batauto-installs dependencies ifnode_modulesis missing, starts backend & frontend, and opens the browser when ready.
# Clone the repository
git clone https://github.com/ADA-quart/Intelligent-To-Do-Calendar.git
cd Intelligent-To-Do-Calendar
# Install dependencies
npm install
# (Optional) Configure environment
cp .env.example .env
# Start dev servers
npm run dev:allOpen http://localhost:5173 in your browser.
โโโ .env.example # Environment variable template
โโโ index.html # Vite HTML entry
โโโ install.bat # One-click install (Windows)
โโโ start.bat # One-click start (Windows)
โโโ uninstall.bat # One-click uninstall (Windows)
โโโ package.json
โโโ vite.config.ts
โโโ tsconfig.json
โโโ server/
โ โโโ index.ts # Express server entry
โ โโโ db/
โ โ โโโ index.ts # sql.js database wrapper
โ โ โโโ schema.sql # Database schema
โ โโโ llm/
โ โ โโโ provider.ts # LLM interface definition
โ โ โโโ openai-compatible.ts # OpenAI / DeepSeek implementation
โ โ โโโ ollama.ts # Ollama / LM Studio implementation
โ โโโ routes/
โ โ โโโ calendar.ts # Calendar & event API + iCal import + Excel export
โ โ โโโ todo.ts # Todo API (auto priority)
โ โ โโโ schedule.ts # Schedule API + LLM config
โ โ โโโ settings.ts # App settings API
โ โโโ services/
โ โ โโโ scheduler.ts # Algorithm scheduling engine
โ โ โโโ llm-scheduler.ts # LLM scheduling engine
โ โ โโโ ical-parser.ts # iCal file parser
โ โโโ utils/
โ โโโ crypto.ts # AES-256-GCM encryption utility
โ โโโ debug.ts # Debug logger
โโโ src/
โ โโโ main.tsx # React entry
โ โโโ App.tsx # Root component (sidebar navigation)
โ โโโ api/
โ โ โโโ client.ts # Axios API client
โ โโโ types/
โ โ โโโ index.ts # TypeScript type definitions
โ โโโ utils/
โ โ โโโ priority.ts # Priority calculation
โ โโโ contexts/
โ โ โโโ ThemeContext.tsx # Theme management (light/dark/system)
โ โโโ i18n/
โ โ โโโ index.tsx # i18n init
โ โ โโโ zh.ts # Chinese translations
โ โ โโโ en.ts # English translations
โ โโโ components/
โ โโโ CalendarView.tsx # Calendar view
โ โโโ TodoList.tsx # Todo list
โ โโโ TodoForm.tsx # Todo form
โ โโโ TodoSplitModal.tsx # Todo split modal
โ โโโ SchedulePanel.tsx # Smart scheduling panel
โ โโโ ImportModal.tsx # iCal import modal
โ โโโ SettingsModal.tsx # Settings (LLM/prompts/theme/language)
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/health |
Service health check |
| Method | Endpoint | Description |
|---|---|---|
| GET | /calendars |
List all calendars |
| POST | /calendars |
Create a calendar |
| DELETE | /calendars/:id |
Delete a calendar and its events |
| GET | /events |
List events (supports start/end range) |
| POST | /events |
Create an event |
| PUT | /events/:id |
Update an event |
| DELETE | /events/:id |
Delete an event |
| POST | /import |
Import iCal file |
| GET | /export-week |
Export weekly calendar as Excel (.xlsx) |
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
List todos (filter by status/priority) |
| POST | / |
Create a todo (auto-calculates priority) |
| POST | /:id/split |
Split a todo into time segments |
| PUT | /:id |
Update a todo |
| DELETE | /:id |
Delete a todo |
| Method | Endpoint | Description |
|---|---|---|
| POST | /generate |
Generate a schedule (algorithm / llm) |
| POST | /apply |
Apply a generated schedule |
| GET | /llm-config |
Get LLM config (no API key) |
| POST | /llm-config/test |
Test LLM connectivity |
| POST | /llm-config |
Create LLM config |
| PUT | /llm-config/:id/activate |
Activate a config |
| DELETE | /llm-config/:id |
Delete a config |
| GET | /prompt-template |
Get prompt template |
| PUT | /prompt-template |
Update prompt template |
| POST | /prompt-template/reset |
Reset to default template |
Copy .env.example to .env and customize:
cp .env.example .env| Variable | Description | Default |
|---|---|---|
PORT |
Backend server port | 3000 |
CRYPTO_SECRET |
API key encryption secret | smart-calendar-default-secret-key |
โ ๏ธ Production: Always set a strongCRYPTO_SECRET. Never use the default value.
| Service | Port |
|---|---|
| Frontend (Vite dev server) | 5173 |
| Backend (Express API) | 3000 (configurable via PORT) |
- Engine: sql.js (SQLite WASM โ no native compilation or system SQLite required)
- File:
data/calendar.db(auto-created on first run) - Auto-save: every 5 seconds + on shutdown
- Write strategy: atomic (temp file + rename)
| Provider | Default Model | API Key Required |
|---|---|---|
| OpenAI | gpt-4o-mini | Yes |
| DeepSeek | deepseek-chat | Yes |
| Ollama | llama3 | No (local) |
| LM Studio | โ | No (local) |
| Custom | โ | Depends |
npm run build # Build frontend to dist/
npm start # Start server (serves both API and static files)In production, Express automatically serves the dist/ directory โ a single process on port 3000 provides the complete application.
| Command | Description |
|---|---|
npm run dev |
Start frontend dev server (Vite) |
npm run dev:server |
Start backend dev server (tsx watch) |
npm run dev:all |
Start both frontend & backend concurrently |
npm run build |
Build frontend for production |
npm start |
Start production server |
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License โ see the LICENSE file for details.
ไธๆฌพ้ๆๆฅๅ็ฎก็ใๅพ ๅ่งๅไธๆบ่ฝ่ฐๅบฆ็ๅ จๆ ๅบ็จใๅบไบ Eisenhower ๅ่ฑก้ไผๅ ็บง็ฉ้ต๏ผๆไพ็ฎๆณ่ชๅจๆ็จไธ LLM ๆบ่ฝๆ็จไธค็งๆจกๅผ๏ผๅธฎๅฉไฝ ้ซๆ่งๅๆถ้ดใ
- ๅคๆฅๅ็ฎก็ โ ่ชๅฎไนๅ็งฐไธ้ข่ฒ๏ผๆฏๆ iCal ๅฏผๅ ฅ๏ผๅฎๆด RRULE ้ๅคไบไปถๆฏๆ
- ๅ่ฑก้ๅพ ๅ โ ๆ็ดงๆฅๅบฆไธ้่ฆๅบฆ่ชๅจๅฝ็ฑป P1โP4 ไผๅ ็บง๏ผๆชๆญขๆฅๆๅ่ฎกๆถ
- ๆบ่ฝ่ฐๅบฆ โ ็ฎๆณ่ฐๅบฆ๏ผ่ดชๅฟ็ญ็ฅ๏ผไธ LLM ่ฐๅบฆ๏ผOpenAI / DeepSeek / Ollama / LM Studio๏ผ
- ๆบ่ฝๆๅ โ ่ถ ่ฟ 90 ๅ้็้ฟไปปๅก่ชๅจๆๅ๏ผๅบ็จๅ็ๆ็ฌ็ซๅพ ๅ่ฎฐๅฝ
- ๆทฑ่ฒๆจกๅผ โ ๆต ่ฒ / ๆทฑ่ฒ / ่ท้็ณป็ป
- ๅฝ้ ๅ โ ไธญ่ฑๆๅๆข
- ๆฅๅไบคไบ โ ๆๆฝ็งปๅจ/่ฐๆดๆถ้ฟ๏ผๅฟซ้ๅๅปบ๏ผExcel ๅจๅๅฏผๅบ
- ๅฎๅ จ โ API ๅฏ้ฅ AES-256-GCM ๅ ๅฏๅญๅจ
git clone https://github.com/ADA-quart/Intelligent-To-Do-Calendar.git
cd Intelligent-To-Do-Calendar
npm install
npm run dev:allWindows ็จๆทๅฏ็ดๆฅๅๅป install.bat โ start.bat ไธ้ฎๅฏๅจใ