feat: introduce smart features for semantic search and related notes using Qdrant.
This commit is contained in:
@@ -22,6 +22,7 @@ We are decoupling the **Domain Logic** (the "What") from the **Infrastructure**
|
|||||||
| **API Framework** | **Axum** | Actix-Web |
|
| **API Framework** | **Axum** | Actix-Web |
|
||||||
| **Database** | **SQLite (via SQLx)** | PostgreSQL |
|
| **Database** | **SQLite (via SQLx)** | PostgreSQL |
|
||||||
| **Search** | **SQLite FTS5** | Meilisearch |
|
| **Search** | **SQLite FTS5** | Meilisearch |
|
||||||
|
| **Vector Search** | **Qdrant** | Pgvector |
|
||||||
| **Authentication** | **Axum Login** | OIDC (Keycloak/Authelia) |
|
| **Authentication** | **Axum Login** | OIDC (Keycloak/Authelia) |
|
||||||
| **Frontend** | **React + Tailwind + Shadcn/ui** | Vue + Radix |
|
| **Frontend** | **React + Tailwind + Shadcn/ui** | Vue + Radix |
|
||||||
|
|
||||||
@@ -79,6 +80,7 @@ Plaintext
|
|||||||
- `POST /api/v1/notes` - Create a new note (Accepts Markdown).
|
- `POST /api/v1/notes` - Create a new note (Accepts Markdown).
|
||||||
- `PATCH /api/v1/notes/:id` - Partial updates.
|
- `PATCH /api/v1/notes/:id` - Partial updates.
|
||||||
- `GET /api/v1/search?q=query` - Full-text search via FTS5.
|
- `GET /api/v1/search?q=query` - Full-text search via FTS5.
|
||||||
|
- `GET /api/v1/notes/:id/related` - Get semantically related notes.
|
||||||
|
|
||||||
## Guidelines & Principles
|
## Guidelines & Principles
|
||||||
|
|
||||||
|
|||||||
12
README.md
12
README.md
@@ -11,6 +11,7 @@ A modern, self-hosted note-taking application built with performance, security,
|
|||||||
- **Rich Text**: Markdown support for note content.
|
- **Rich Text**: Markdown support for note content.
|
||||||
- **Version History**: Track changes, view history, note diffs, download versions, and restore previous states.
|
- **Version History**: Track changes, view history, note diffs, download versions, and restore previous states.
|
||||||
- **Organization**: Tagging system for easy filtering.
|
- **Organization**: Tagging system for easy filtering.
|
||||||
|
- **Smart Features**: Semantic search and automatically generated related notes using local embeddings.
|
||||||
- **Theme**: Dark and Light mode support.
|
- **Theme**: Dark and Light mode support.
|
||||||
- **Responsive**: Mobile-friendly UI built with Tailwind CSS.
|
- **Responsive**: Mobile-friendly UI built with Tailwind CSS.
|
||||||
- **Architecture**:
|
- **Architecture**:
|
||||||
@@ -25,6 +26,7 @@ A modern, self-hosted note-taking application built with performance, security,
|
|||||||
- **Language**: Rust
|
- **Language**: Rust
|
||||||
- **Framework**: Axum
|
- **Framework**: Axum
|
||||||
- **Database**: SQLite (Default) or Postgres (Supported via feature flag)
|
- **Database**: SQLite (Default) or Postgres (Supported via feature flag)
|
||||||
|
- **Vector Database**: Qdrant (for Smart Features)
|
||||||
- **Dependency Injection**: Manual wiring for clear boundaries
|
- **Dependency Injection**: Manual wiring for clear boundaries
|
||||||
|
|
||||||
### Frontend
|
### Frontend
|
||||||
@@ -80,6 +82,16 @@ cargo run -p notes-api --no-default-features --features notes-infra/postgres
|
|||||||
```
|
```
|
||||||
*Note: Ensure your `DATABASE_URL` is set to a valid Postgres connection string.*
|
*Note: Ensure your `DATABASE_URL` is set to a valid Postgres connection string.*
|
||||||
|
|
||||||
|
**Feature Flags (Smart Features):**
|
||||||
|
|
||||||
|
The application includes "Smart Features" (semantic search, related notes) enabled by default. These require `fastembed`, `qdrant-client`, and `async-nats`.
|
||||||
|
|
||||||
|
To build/run **without** smart features (for faster compilation or lighter deployment):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cargo run -p notes-api --no-default-features --features sqlite
|
||||||
|
```
|
||||||
|
|
||||||
#### Frontend
|
#### Frontend
|
||||||
|
|
||||||
1. Navigate to `k-notes-frontend`.
|
1. Navigate to `k-notes-frontend`.
|
||||||
|
|||||||
Reference in New Issue
Block a user