Skip to content

HrxuAlbert/Work-Planner

Repository files navigation

Work Planner

Work Planner is a local-first desktop tool for academic work planning, execution tracking, and research workflow management.

It is designed to help researchers and students organize long-term projects, daily tasks, deadlines, and execution records in a lightweight local environment.

Motivation

Academic research often involves multiple parallel projects, uncertain deadlines, fragmented tasks, and long feedback cycles. This tool was built to support a more structured research workflow, with an emphasis on planning, execution, and reflection rather than simple task listing.

Key Features

  • Local-first desktop application.
  • Task and project management for academic work.
  • Execution tracking for daily research routines.
  • SQLite-based local data storage.
  • Built with Electron, React, TypeScript, and SQLite.

Research Workflow Context

This project is not a research paper artifact. Instead, it is a side engineering project for improving academic productivity and long-term research execution.

It reflects my interest in building practical tools that support research planning, project management, and sustained execution across multiple academic tasks.

Quick Start

Prerequisites

  • Node.js 18+ (recommend 20+)
  • npm or yarn
  • For AI features: OpenAI API key or Ollama running locally

Install & Run (Development)

cd Work_Planning_Agent
npm install
npm run dev

This starts Vite dev server and Electron in development mode.

Note: If running from within an Electron-based IDE (e.g., Cursor, VS Code), the ELECTRON_RUN_AS_NODE environment variable may be set. The dev script handles this automatically. If you encounter issues, unset it manually: unset ELECTRON_RUN_AS_NODE && npm run dev.

Build Desktop App

# Build for macOS
npm run package:mac

# Build for current platform
npm run package

Built app will be in the release/ directory. On macOS, you'll find a .dmg file.

Run Tests

npm test

AI Configuration

OpenAI-compatible API

  1. Open Settings in the app
  2. Select "OpenAI" as provider
  3. The app auto-detects OPENAI_API_KEY from your system environment
  4. Or manually enter your API key in the settings
  5. Configure base URL and model name as needed

Key precedence: Manual entry in Settings > Environment variable

Ollama (Local LLM)

  1. Install and run Ollama
  2. Pull a model: ollama pull llama3.2
  3. Open Settings, select "Ollama"
  4. Default endpoint: http://localhost:11434

Without AI

The app works fully without AI. Task parsing uses basic line splitting, and planning uses the deterministic scheduling engine.

Tech Stack

  • Electron - Desktop shell
  • React 18 - UI framework
  • TypeScript - Type safety
  • Vite - Build tool with HMR
  • SQLite (better-sqlite3) - Local database
  • Tailwind CSS - Styling
  • Zustand - State management
  • date-fns - Date utilities
  • Lucide React - Icons
  • electron-builder - Packaging

Project Structure

src/
├── main/                  # Electron main process
│   ├── main.ts           # App entry, window creation
│   ├── preload.ts        # IPC bridge (contextIsolation)
│   ├── database.ts       # SQLite schema & initialization
│   ├── ipc-handlers.ts   # All IPC handler registration
│   └── services/
│       ├── ai-service.ts          # AI abstraction (OpenAI + Ollama)
│       ├── scheduling-service.ts  # Deterministic planning engine
│       ├── recurrence-service.ts  # Recurring task logic
│       ├── report-service.ts      # Weekly report generation
│       └── seed-data.ts           # Demo data
├── renderer/              # React frontend
│   ├── App.tsx
│   ├── main.tsx
│   ├── index.css          # Tailwind + custom styles
│   ├── components/        # Reusable UI components
│   ├── pages/             # Page-level components
│   ├── store/             # Zustand state management
│   ├── lib/               # Utilities
│   └── types/             # TypeScript declarations
├── shared/
│   └── types.ts           # Shared type definitions
└── tests/                 # Test files

Keyboard Shortcuts

The app is designed to be keyboard-friendly. Navigation is via the sidebar.

Data Location

Data is stored in the Electron user data directory:

  • macOS: ~/Library/Application Support/work-planner/work-planner.db
  • Windows: %APPDATA%/work-planner/work-planner.db
  • Linux: ~/.config/work-planner/work-planner.db

License

MIT

About

Local-first desktop tool for academic work planning, execution tracking, and research workflow management.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages