Skip to content

Notes Service ​

Port: 8083 (HTTP) · 9093 (gRPC)
Database: omninet_notes

The notes service manages the full lifecycle of notes, categories, and todos. It communicates with the storage service via gRPC for file attachments.

Features ​

  • Rich Notes CRUD — Create, read, update, delete, search, and paginate notes.
  • Categories — User-defined categories with colors. Default categories provisioned via Kafka on registration.
  • Todos — Todo tasks with status workflows (TODO, IN_PROGRESS, DONE), reminders, and background schedulers.
  • File Attachments — Notes can have file attachments uploaded via the storage service (gRPC).
  • 30-Day Recycle Bin — Soft-deleted notes are retained for 30 days before permanent deletion.
  • Favourites & Pins — Notes can be pinned (top of list) or added to favourites.
  • Full-Text Search — Search notes by title and content.
  • Duplicate — Clone a note with one click.
  • Redis Caching — Frequently accessed notes and category lists are cached.

REST API ​

Notes ​

MethodPathDescription
GET/api/v1/notesList notes (paginated)
GET/api/v1/notes/{id}Get note by ID
POST/api/v1/notesCreate note (JSON or multipart)
PUT/api/v1/notes/{id}Update note
DELETE/api/v1/notes/{id}Move to recycle bin
POST/api/v1/notes/{id}/restoreRestore from bin
DELETE/api/v1/notes/{id}/permanentPermanent delete
GET/api/v1/notes/searchFull-text search
GET/api/v1/notes/binList recycle bin
POST/api/v1/notes/{id}/duplicateDuplicate note
PATCH/api/v1/notes/{id}/pinToggle pin
PATCH/api/v1/notes/{id}/favouriteToggle favourite

Categories ​

MethodPathDescription
GET/api/v1/category/active-categoryList active categories
POST/api/v1/category/saveCreate or update category
DELETE/api/v1/category/{id}Delete category

Todos ​

MethodPathDescription
GET/api/v1/todosList todos
POST/api/v1/todosCreate todo
PUT/api/v1/todos/{id}Update todo
DELETE/api/v1/todos/{id}Delete todo
PATCH/api/v1/todos/{id}/statusToggle status

Note Request (Multipart) ​

Notes can be created with or without a file attachment via multipart/form-data:

POST /api/v1/notes
Content-Type: multipart/form-data

notes = {"title":"My Note","content":"...","category":{"id":1}}
file  = <binary>

The notes part is a JSON string parsed by the controller via ObjectMapper. This avoids Spring's HttpMediaTypeNotSupportedException which occurs when @RequestBody is used with multipart requests.

Todo Status Schema ​

json
{
  "id": 1,
  "name": "TODO"
}

TodoStatus uses @JsonFormat(shape = JsonFormat.Shape.OBJECT) and a @JsonCreator factory method that handles:

  • Map input: { "id": 2, "name": "In Progress" }
  • Integer input: 2
  • String input: "IN_PROGRESS"

Released under the MIT License.