Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

122 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

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}/../var
    attachments-dir: ${app.storage.base-dir}/attachments
    backups-dir: ${app.storage.base-dir}/backups
    data-dir: ${app.storage.base-dir}/data
    db-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: postgresql
  datasource:
    url: jdbc:postgresql://localhost:5432/notekeeper
    username: your_username
    password: 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:

String key = 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: true
      bot-token: YOUR_BOT_TOKEN
      chat-id: YOUR_CHAT_ID

DingTalk Notifications:

app:
  integrations:
    dingtalk:
      enabled: true
      webhook: YOUR_WEBHOOK_URL
      secret: YOUR_SECRET

5. Backup Settings

Configure in Settings UI or application.yml:

app:
  backup:
    auto-enabled: true
    cron: "0 0 2 * * *"  # Daily at 2 AM
    retention-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

About

Opensource project like Evernote or DS Note

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages