Skip to content

leftthumbs/Claude

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Todo + OneNote App

A to-do application that integrates with Microsoft OneNote to import tasks from your notes.

Features

  • Full Todo Management: Create, read, update, and delete tasks
  • Priority Levels: Set tasks as low, medium, or high priority
  • Due Dates: Assign due dates to tasks with overdue highlighting
  • Tags: Organize tasks with hashtags
  • Filtering: View all, active, completed, or OneNote-imported tasks
  • OneNote Integration:
    • Browse notebooks, sections, and pages
    • Import tasks from OneNote pages
    • Automatic parsing of checkboxes, to-do items, and task patterns
    • Track which tasks came from OneNote

Tech Stack

  • Backend: Node.js with Express.js and TypeScript
  • Frontend: Vanilla HTML/CSS/JavaScript
  • OneNote Integration: Microsoft Graph API with MSAL

Setup

1. Install Dependencies

npm install

2. Configure OneNote Integration (Optional)

To enable OneNote sync, register an app in Azure Portal:

  1. Go to Azure Portal
  2. Navigate to Azure Active Directory > App registrations
  3. Click "New registration"
  4. Name: "Todo OneNote App"
  5. Supported account types: "Accounts in any organizational directory and personal Microsoft accounts"
  6. Redirect URI: http://localhost:3000/api/onenote/auth/callback
  7. After creation, note down the Application (client) ID
  8. Go to "Certificates & secrets" and create a new client secret
  9. Go to "API permissions" and add:
    • Microsoft Graph > Delegated permissions:
      • Notes.Read
      • Notes.ReadWrite
      • User.Read

Create a .env file:

cp .env.example .env

Fill in your Azure credentials:

AZURE_CLIENT_ID=your_client_id
AZURE_CLIENT_SECRET=your_client_secret
AZURE_TENANT_ID=common

3. Build and Run

Development mode:

npm run dev

Production mode:

npm run build
npm start

The app will be available at http://localhost:3000

Usage

Managing Todos

  1. Add a todo: Type in the input field, select priority and optional due date, click "Add"
  2. Complete a todo: Click the checkbox next to the task
  3. Delete a todo: Hover over a task and click "Delete"
  4. Filter todos: Use the tabs (All, Active, Completed, From OneNote)
  5. Clear completed: Click "Clear completed" at the bottom

Importing from OneNote

  1. Click "Connect OneNote" in the header
  2. Sign in with your Microsoft account
  3. Browse your notebooks in the sidebar
  4. Click on a notebook to see sections
  5. Click on a section to see pages
  6. Hover over a page and click "Import" to preview tasks
  7. Review the detected tasks and click "Import Tasks"

Task Detection

The app detects tasks from OneNote pages using:

  • OneNote checkboxes (to-do tags)
  • Markdown checkboxes: - [ ] task or - [x] completed
  • Keywords: TODO:, TASK:
  • Action words at start of list items: buy, call, email, send, etc.

Tags and Due Dates

In OneNote, you can include:

  • Tags: #work #urgent
  • Due dates: due: 1/15/2025 or by: 01-15-25
  • Priority indicators: urgent, high priority, low priority

API Endpoints

Todos

  • GET /api/todos - Get all todos
  • GET /api/todos/pending - Get pending todos
  • GET /api/todos/completed - Get completed todos
  • GET /api/todos/:id - Get single todo
  • POST /api/todos - Create todo
  • PUT /api/todos/:id - Update todo
  • PATCH /api/todos/:id/toggle - Toggle completion
  • DELETE /api/todos/:id - Delete todo
  • DELETE /api/todos/completed/all - Clear completed

OneNote

  • GET /api/onenote/auth/status - Check auth status
  • GET /api/onenote/auth/url - Get OAuth URL
  • GET /api/onenote/notebooks - List notebooks
  • GET /api/onenote/sections - List sections
  • GET /api/onenote/pages - List pages
  • GET /api/onenote/pages/:id/content - Get page content
  • GET /api/onenote/pages/:id/preview-tasks - Preview tasks from page
  • POST /api/onenote/sync/page/:id - Import tasks from page
  • POST /api/onenote/sync/section/:id - Import from all pages in section

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors