JetBrains-Research / JetBrains-Research/Python-Solution-Preference

[016] Notes Application (MVP)

Đang mở
#16 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
2
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

## Overview

A single-user notes application for quickly creating, editing, and viewing text notes. All notes belong to a single shared space protected by a fixed password.

Build this as a Python backend service with no UI; expose the functionality below through an HTTP API.

**Credentials**: Password is exactly `my-notes-are-mine` (case-sensitive, not changeable).

**Persistence**: Notes persist across server restarts.

**Constraints**:
- No organization features (folders, tags, pinning)
- No rich text formatting (only plain text with line breaks)
- No attachments, exports, or imports
- No multi-user accounts or sync

## Password Protection

Every request must include the password.

**Behavior**:
- Missing password is rejected with an error ("Password is required" or similar)
- Wrong password is rejected with an error ("Incorrect password" or similar)
- No note data (titles, previews, counts, timestamps) is accessible without the correct password

## Notes List

All notes can be listed.

**Each note in the list includes**:
- **Title**: First non-empty line of the note body, trimmed of whitespace. If body is empty/whitespace-only, show placeholder like "New Note"
- **Preview**: Single-line snippet from the body following the title line, truncated with ellipsis if long
- **Timestamp**: Last edited time in exact format `YYYY-MM-DD hh:mm` (24-hour, UTC)

**Sorting**: Notes sorted by last edited timestamp, descending (most recent first).

## Create & Edit Note

**Creating**: Creating a note starts it with an empty body.

**Editing**: A note's body can be updated. Line breaks preserved.

- The last edited timestamp updates on each save

**Empty notes**: A note with empty body remains valid and listed (uses placeholder title).

## Search

Notes can be filtered by a search query.

**Matching**: Case-insensitive substring match against title OR body.

**Behavior**:
- Filtered results maintain last-edited-time sort order
- Empty query shows all notes

## Delete Note

Notes can be deleted.

**Behavior**:
- Deletion immediately removes the note from all listings and search results
- Deletion is permanent; no trash, undo, or recovery

## Note Identity

Each note has a stable identifier that returns the same note when requested again. Access to individual notes respects the password protection.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

No files, tests, or entry points are named, so first identify the Python HTTP service entry point and how persistence is handled. Read the existing project structure before defining the API operations for authentication, note creation, editing, listing, searching, and deletion. Done means persisted notes satisfy the specified password checks, formatting, sorting, search, timestamps, and stable identity behavior.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
api, backend, database
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.