Skip to content

Repository files navigation

NoteKeeper

Open-source Evernote alternative with powerful features for notes and todos management.

Features

  • 📝 Notes Management - Create, edit, organize notes with Markdown support
  • Todo Management - Task tracking with priorities, due dates, reminders
  • 📁 Folder Organization - Hierarchical folder/subfolder structure
  • 🔍 Full-text Search - Quick search across all notes and todos
  • 📅 Calendar View - Visual calendar for tasks with due dates
  • 📊 Analytics - Statistics and insights
  • Favorites - Mark important items
  • 📦 Archive - Archive completed items
  • 🗑️ Trash - Soft delete with recovery
  • 🔐 Encryption - Encrypt sensitive notes
  • 📎 Attachments - File attachments for notes and todos
  • 🔄 Backup & Restore - Automatic backups with configurable retention
  • 🔔 Reminders - Email/Telegram/DingTalk notifications
  • 👥 Sharing - Share notes and todos with other users
  • 🌙 Dark Mode - Theme switching
  • ⌨️ Keyboard Shortcuts - Customizable hotkeys
  • 📱 Responsive Design - Works on desktop and mobile

Tech Stack

Backend

  • Java 25
  • Spring Boot 4.1
  • MyBatis
  • SQLite (default) / PostgreSQL
  • Maven

Frontend

  • React 18
  • TypeScript
  • Tailwind CSS
  • Vite

Prerequisites

  • Java 25+
  • Node.js 18+
  • Maven 3.6+

Configuration

1. Storage Paths

Edit note-keeper-service/src/main/resources/application.yml:

app:
storage:
base-dir: ${user.dir}/../varattachments-dir: ${app.storage.base-dir}/attachmentsbackups-dir: ${app.storage.base-dir}/backupsdata-dir: ${app.storage.base-dir}/datadb-path: ${app.storage.data-dir}/notekeeper.db

Directory structure:

var/
├── data/ # SQLite database
├── attachments/ # Uploaded files
└── backups/ # Backup archives

2. Database

SQLite (default):

spring:
datasource:
url: jdbc:sqlite:${app.storage.db-path}

PostgreSQL:

spring:
profiles:
active: postgresqldatasource:
url: jdbc:postgresql://localhost:5432/notekeeperusername: your_usernamepassword: your_password

Run schema migration:

psql -U your_username -d notekeeper -f note-keeper-service/src/main/resources/schema-postgresql.sql

3. Encryption (Optional but Recommended)

Generate encryption key using Java:

cd note-keeper-service
mvn compile exec:java -Dexec.mainClass="xyz.crearts.note.keeper.service.EncryptionService" -Dexec.classpathScope=compile

Or manually in code:

Stringkey = EncryptionService.generateKey();
System.out.println(key); // Copy this key

Set the key in application.yml:

app:
encryption:
key: "your-generated-base64-key-here"

Or use environment variable:

export ENCRYPTION_KEY="your-generated-base64-key-here"

Important:

  • Without a fixed key, encrypted notes will be unreadable after restart
  • Store key securely (password manager, secrets vault)
  • Key is 256-bit AES (Base64 encoded = 44 characters)
  • Once set, never change it or you'll lose access to encrypted notes

4. Authentication

Default credentials (development only):

  • Username: admin
  • Password: Auto-generated on first start (check logs)

Production: Configure OAuth (Google) or LDAP.

4. Integrations (Optional)

Telegram Notifications:

app:
integrations:
telegram:
enabled: truebot-token: YOUR_BOT_TOKENchat-id: YOUR_CHAT_ID

DingTalk Notifications:

app:
integrations:
dingtalk:
enabled: truewebhook: YOUR_WEBHOOK_URLsecret: YOUR_SECRET

5. Backup Settings

Configure in Settings UI or application.yml:

app:
backup:
auto-enabled: truecron: "0 0 2 * * *"# Daily at 2 AMretention-days: 30

Installation

Backend

cd note-keeper-service
mvn clean install
mvn spring-boot:run

Server starts on http://localhost:8080

Frontend

cd note-keeper-web
npm install
npm run dev

Or build production:

mvn clean install -pl note-keeper-web

Frontend served by backend at http://localhost:8080

GraalVM native image

Needs GraalVM 25+ with native-image. On Windows use x64 Native Tools Command Prompt.

One binary = React UI + Spring API. From repo root:

mvn -Pnative native:compile
./note-keeper-service/target/note-keeper -Djavax.xml.accessExternalDTD=all

Docker image (Buildpacks, JDK 25+):

mvn -pl note-keeper-service -am -Pnative spring-boot:build-image

CI image (multi-stage GraalVM):

docker build -f Dockerfile.native -t note-keeper-native .
docker run -d -p 9082:8080 \
-e SPRING_PROFILES_ACTIVE=sqlite \
-v /volume1/docker/note-keeper/etc:/app/etc:ro \
-v /volume1/docker/note-keeper-native/var:/app/var:rw \
--name note-keeper-native note-keeper-native

Gitea: HTTP registry devops.local:5000 (REGISTRY_USER / REGISTRY_PASSWORD). JVM deploy.yml — minipc build+push → NAS 9081. Native deploy-native.yml — minipc build+push → NAS 9082.

API Documentation

Access OpenAPI docs at: http://localhost:8080/swagger-ui.html

Key endpoints:

  • GET /api/v1/notes - List notes
  • POST /api/v1/notes - Create note
  • GET /api/v1/todos - List todos
  • POST /api/v1/backup/export - Export backup
  • POST /api/v1/backup/import - Import backup

Keyboard Shortcuts

Customize in Settings > Shortcuts:

  • Ctrl+N - New note
  • Ctrl+T - New todo
  • Ctrl+K - Search
  • Ctrl+B - Toggle sidebar
  • Esc - Exit fullscreen

Development

Project Structure

note-keeper/
├── note-keeper-service/ # Spring Boot backend
│ ├── src/main/java/
│ │ └── xyz/crearts/note/keeper/
│ │ ├── controller/ # REST controllers
│ │ ├── service/ # Business logic
│ │ ├── mapper/ # MyBatis mappers
│ │ ├── dto/ # Data transfer objects
│ │ └── config/ # Configuration
│ └── src/main/resources/
│ ├── application.yml # Configuration
│ ├── schema.sql # Database schema
│ └── mapper/ # MyBatis XML
├── note-keeper-web/ # React frontend
│ ├── src/
│ │ ├── pages/ # Page components
│ │ ├── components/ # Reusable components
│ │ ├── utils/ # Utilities
│ │ └── types/ # TypeScript types
│ └── package.json
└── var/ # Runtime data (auto-created)
├── data/
├── attachments/
└── backups/

Adding New Features

  1. Backend: Add controller → service → mapper → DTO
  2. Frontend: Add page/component → update API calls
  3. Update schema if needed
  4. Test both modules

Troubleshooting

Database not created:

  • Check var/data/ directory exists
  • Verify write permissions
  • Check logs for SQLite errors

Attachments not uploading:

  • Verify var/attachments/ exists
  • Check file size limits
  • Review backend logs

Backup fails:

  • Ensure var/backups/ is writable
  • Check disk space
  • Review cron expression format

License

MIT License

Releases

Packages

Contributors

Languages