@burakboduroglu/penote 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/AGENTS.md ADDED
@@ -0,0 +1,223 @@
1
+ # AGENTS.md
2
+
3
+ > Guide for AI agents working in this repository.
4
+ > Read this file before making any change.
5
+
6
+ ---
7
+
8
+ ## Project Summary
9
+
10
+ **penote** (CLI: `penote`, npm: `@burakboduroglu/penote`) is an **agentic
11
+ learning docs** library: programming notes in Markdown, organised by
12
+ language/topic, reachable via a zero-dependency Node.js CLI and a
13
+ browser-based Web UI.
14
+
15
+ The GitHub repository, the npm scope and the CLI binary are all **penote**.
16
+
17
+ - **No build step for the notes tooling.** Node.js 18+ is the only runtime
18
+ requirement for the published CLI and Web UI.
19
+ - **Use `bun` for every local command** (`bun library/cli.js …`, `bun run dev`).
20
+ Never write `npm`, `pnpm`, or `yarn` in docs or scripts. The published binary
21
+ still targets Node.js built-ins, so do not introduce bun-only APIs.
22
+ - **Content is king.** The value of this repo is in the `.md` notes, not the
23
+ tooling.
24
+ - **CLI entry point:** `library/cli.js` (binary name: `penote`)
25
+ - **Web UI entry point:** `library/index.html`
26
+ - **Human-facing repo docs** (README, CONTRIBUTING, SECURITY, …) are English.
27
+ **Note bodies** stay Turkish (see below).
28
+
29
+ ---
30
+
31
+ ## Repository Structure
32
+
33
+ ```
34
+ penote/ # GitHub repo / local folder name
35
+ ├── Java-Notes/ # Lombok, JPA/Hibernate, Spring Boot
36
+ ├── Javascript-Notes/ # Array methods, closures, async, regex
37
+ ├── Python-Notes/ # Basics, advanced topics, DB operations
38
+ ├── SQL-Notes/ # Basic queries, advanced SQL, psql terminal
39
+ ├── MongoDB-Notes/ # Basic CRUD and querying
40
+ ├── library/
41
+ │ ├── cli.js # CLI tool (Node.js, no dependencies)
42
+ │ └── index.html # Web UI (vanilla HTML/JS/CSS)
43
+ ├── assets/
44
+ │ ├── penote-logo.svg # App icon; SVG is the source of truth
45
+ │ ├── social-preview.svg # GitHub link preview card (1280x640)
46
+ │ ├── social-preview.png # Rendered from the SVG; uploaded by hand
47
+ │ ├── demo.svg # README terminal card (1000x620)
48
+ │ └── demo.png # Rendered from the SVG
49
+ ├── .github/ # Issue forms, PR template, CI / publish workflows
50
+ ├── AGENTS.md
51
+ ├── CHANGELOG.md
52
+ ├── CODE_OF_CONDUCT.md
53
+ ├── CONTRIBUTING.md
54
+ ├── LICENSE
55
+ ├── README.md
56
+ ├── SECURITY.md
57
+ └── package.json # npm package metadata for `@burakboduroglu/penote`
58
+ ```
59
+
60
+ ---
61
+
62
+ ## Adding or Editing Notes
63
+
64
+ ### Naming Convention
65
+
66
+ | Rule | Example |
67
+ | -------------------------------------------- | ---------------------------------------- |
68
+ | Lowercase, words separated by `_` | `python_basic_1.md` |
69
+ | Suffix with `_1`, `_2` for multi-part series | `sql_advanced_1.md`, `sql_advanced_2.md` |
70
+ | Place in the correct category folder | `Python-Notes/advanced_python_3.md` |
71
+
72
+ ### Note file template
73
+
74
+ Every new note should follow this shape:
75
+
76
+ ```markdown
77
+ # Topic title
78
+
79
+ > One-sentence Turkish summary of this note.
80
+
81
+ ---
82
+
83
+ ## Section 1
84
+
85
+ Content here...
86
+
87
+ ## Section 2
88
+
89
+ Content here...
90
+
91
+ ---
92
+
93
+ **Kaynaklar**
94
+
95
+ - Source or documentation link (if any)
96
+ ```
97
+
98
+ ### Note content rules
99
+
100
+ - **Language: all notes must be written in Turkish.** Material taken from
101
+ English sources still needs Turkish explanation and summary. Technical terms
102
+ (`variable`, `function`, `query`, …) may stay in English; explanations must
103
+ be Turkish.
104
+ - **When updating older English notes:** write the Turkish equivalent first,
105
+ then keep the technical content accurate.
106
+ - **Code blocks:** always include a language identifier (```` ```java ````,
107
+ ```` ```python ````, etc.).
108
+ - **No external images in notes.** If needed, use a relative path under
109
+ `assets/`.
110
+ - **Stay focused:** one concept (or a tight related group) per file.
111
+ - **No frontmatter (YAML/TOML):** the CLI parses plain Markdown only.
112
+
113
+ ---
114
+
115
+ ## Working with the CLI (`library/cli.js`)
116
+
117
+ ### What the CLI does
118
+
119
+ - Reads all `.md` files from the category folders.
120
+ - Provides list, search, open (editor / TUI / browser), and help commands.
121
+ - Parses file paths to derive category and note name — **folder and file naming
122
+ directly affects CLI output.**
123
+
124
+ ### Rules when modifying `cli.js`
125
+
126
+ - Do **not** introduce runtime dependencies. Use only Node.js built-in
127
+ modules.
128
+ - Do **not** change the command interface (flags, subcommands) without updating
129
+ `README.md`.
130
+ - Keep the TUI key bindings consistent with the table in `README.md`.
131
+ - Keep the published binary name `penote` unless an explicit rename is requested.
132
+ - Test every modified command manually before committing:
133
+
134
+ ```bash
135
+ bun library/cli.js list
136
+ bun library/cli.js search <keyword>
137
+ bun library/cli.js open --tui
138
+ ```
139
+
140
+ ---
141
+
142
+ ## Working with the Web UI (`library/index.html`)
143
+
144
+ - Single-file, vanilla HTML/CSS/JS. Do **not** split into separate files.
145
+ - Do **not** add external CDN dependencies.
146
+ - Category filtering and instant search must remain functional after any change.
147
+ - Test in a browser by starting the HTTP server:
148
+
149
+ ```bash
150
+ bun library/cli.js open --editor
151
+ ```
152
+
153
+ ---
154
+
155
+ ## Working with brand assets (`assets/`)
156
+
157
+ - The **SVG is the source of truth**; the PNG next to it is a render. Never edit
158
+ a PNG by hand — change the SVG and re-render:
159
+
160
+ ```bash
161
+ rsvg-convert -w 1280 -h 640 assets/social-preview.svg -o assets/social-preview.png
162
+ rsvg-convert -w 1000 -h 620 assets/demo.svg -o assets/demo.png
163
+ ```
164
+
165
+ - `social-preview.png` is the GitHub link preview. GitHub has no API for it, so
166
+ it is uploaded by hand under **Settings > General > Social preview**.
167
+ - Terminal text inside `demo.svg` and `social-preview.svg` must match what
168
+ `library/cli.js` actually prints — re-run the command before changing a line.
169
+ - Keep the indigo palette and the rounded-tile mark consistent across all three
170
+ files and the Web UI favicon in `library/index.html`.
171
+ - SVG comments must not contain `--` (it is an XML parse error); write CLI flags
172
+ in prose instead.
173
+
174
+ ---
175
+
176
+ ## What Agents Should NOT Do
177
+
178
+ - Do **not** rename existing category folders (`Java-Notes`, `Python-Notes`,
179
+ etc.) — the CLI resolves categories from folder names.
180
+ - Do **not** add a dependency lockfile or package-manager toolchain for the
181
+ notes CLI. The existing root `package.json` is publish metadata only; keep
182
+ the CLI zero-dependency.
183
+ - Do **not** modify `LICENSE` unless the copyright holder asks.
184
+ - Do **not** add auto-generated files or compiled output to the repo.
185
+ - Do **not** edit `CONTRIBUTING.md`, `SECURITY.md`, or `CODE_OF_CONDUCT.md`
186
+ unless explicitly asked (or the change is part of an approved repo-surface
187
+ update).
188
+ - Do **not** create notes outside the established category folders without
189
+ confirming with the user.
190
+
191
+ ---
192
+
193
+ ## Commit Message Convention
194
+
195
+ Follow [Conventional Commits](https://www.conventionalcommits.org):
196
+
197
+ ```
198
+ <type>(<optional-scope>): <short description>
199
+ ```
200
+
201
+ | Types | `feat` \| `fix` \| `docs` \| `refactor` \| `chore` \| `remove` |
202
+ | Scopes | `notes` \| `java` \| `javascript` \| `python` \| `sql` \| `mongodb` \| `cli` \| `web-ui` \| `docs` \| `ci` |
203
+
204
+ **Examples:**
205
+
206
+ ```
207
+ feat(python): add advanced decorators note
208
+ fix(cli): search flag not filtering by category
209
+ docs: add new CLI command to README
210
+ chore(ci): smoke-test list and search on Node 22
211
+ ```
212
+
213
+ ---
214
+
215
+ ## Quick Checklist Before Committing
216
+
217
+ - [ ] Note file follows the naming convention (`lowercase_with_underscores.md`)
218
+ - [ ] Note is placed in the correct category folder
219
+ - [ ] Code blocks have language identifiers
220
+ - [ ] CLI still runs without errors (`bun library/cli.js list`)
221
+ - [ ] Commit message follows Conventional Commits
222
+ - [ ] `README.md` updated if CLI commands or project structure changed
223
+ - [ ] `CHANGELOG.md` updated under `Unreleased` for user-visible changes
package/CHANGELOG.md ADDED
@@ -0,0 +1,64 @@
1
+ # Changelog
2
+
3
+ All notable changes to penote are recorded here. The format follows
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project
5
+ follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [3.0.1] - 2026-09-02
8
+
9
+ ### Fixed
10
+
11
+ - Republished `@burakboduroglu/penote` so the npm packument is complete and
12
+ `npm install @burakboduroglu/penote` / `npm view` resolve correctly. The
13
+ earlier `3.0.0` tarball existed without a usable package root document.
14
+
15
+ ## [3.0.0] - 2026-09-02
16
+
17
+ ### Added
18
+
19
+ - Brand assets in the same visual language as the other repositories:
20
+ `assets/social-preview.svg` / `.png` (GitHub link preview, 1280x640) and
21
+ `assets/demo.svg` / `.png` (README terminal card). The SVG is the source; the
22
+ PNG is rendered from it.
23
+ - CI smoke job that runs the documented `bun` development commands on Ubuntu and
24
+ macOS, alongside the existing Node matrix.
25
+
26
+ ### Changed
27
+
28
+ - Product renamed to **penote**. npm package is now
29
+ [`@burakboduroglu/penote`](https://www.npmjs.com/package/@burakboduroglu/penote);
30
+ CLI binary is `penote`. The previous unscoped name `devnotetr` / `devnote` is
31
+ retired. The GitHub repository was renamed `dev-notes` -> `penote`; GitHub
32
+ redirects the old URLs.
33
+ - Repository surface aligned with the rest of the open-source set: English
34
+ README positioned as agentic learning docs, `CHANGELOG.md`, `SECURITY.md`,
35
+ `CODE_OF_CONDUCT.md`, Conventional Commits in `CONTRIBUTING.md`, YAML issue
36
+ forms, pull request template, and a CI smoke workflow.
37
+ - License file renamed from `LICENSE.md` to `LICENSE`.
38
+ - App icon redesigned as a lowercase `pn` monogram with an AI sparkle on a
39
+ rounded indigo tile (`assets/penote-logo.svg`); the Web UI favicon and the
40
+ social preview card use the same mark.
41
+ - `bun` is the package manager and local runner throughout: install
42
+ (`bun add -g`), scripts (`bun run start` / `bun run dev`) and every documented
43
+ development command (`bun library/cli.js …`). The published binary still
44
+ targets Node.js 18+ built-ins, and CI keeps the Node 18/20/22 matrix.
45
+ - The npm tarball ships only `assets/penote-logo.svg` and `assets/demo.png`; the
46
+ social preview card is repository-only, halving the package to ~130 kB.
47
+
48
+ ### Removed
49
+
50
+ - Tracked `.vscode/` settings (editor-local; ignored going forward).
51
+
52
+ ## [2.1.0] - 2026-05-04
53
+
54
+ ### Added
55
+
56
+ - Packaged CLI and notes as the `devnotetr` npm package (`devnote` binary)
57
+ — superseded by `@burakboduroglu/penote` / `penote`.
58
+ - Category folders for Java, JavaScript, Python, SQL, and MongoDB notes.
59
+ - Zero-dependency CLI with list, search, open (editor / TUI / browser).
60
+ - Single-file Web UI with category filter and instant search.
61
+
62
+ [3.0.1]: https://github.com/burakboduroglu/penote/compare/v3.0.0...v3.0.1
63
+ [3.0.0]: https://github.com/burakboduroglu/penote/compare/v2.1.0...v3.0.0
64
+ [2.1.0]: https://github.com/burakboduroglu/penote/releases/tag/v2.1.0
@@ -0,0 +1,102 @@
1
+ # Contributing to penote
2
+
3
+ Thanks for looking. This repository is **agentic learning docs**: Turkish
4
+ Markdown notes organised by topic, plus a zero-dependency Node.js CLI and a
5
+ single-file Web UI so humans and coding agents can find and open the same
6
+ material.
7
+
8
+ Useful contributions are usually small — a clearer note, a missing example, a
9
+ CLI edge case, or a Web UI fix. Before building anything substantial, open an
10
+ issue and check the direction is wanted.
11
+
12
+ **Out of scope for drive-by PRs:** renaming category folders, adding a package
13
+ manager / build toolchain for the notes CLI, splitting the Web UI into multiple
14
+ files, or turning the project into a general CMS.
15
+
16
+ Please read the [Code of Conduct](CODE_OF_CONDUCT.md) before participating.
17
+
18
+ ## Getting started
19
+
20
+ **Requirements:** [bun](https://bun.sh) for development, Node.js ≥ 18 for the
21
+ published binary. No `bun install` is required — the CLI has no dependencies.
22
+
23
+ ```bash
24
+ git clone https://github.com/burakboduroglu/penote.git
25
+ cd penote
26
+ bun library/cli.js list
27
+ bun library/cli.js search hibernate
28
+ bun library/cli.js open --editor
29
+ ```
30
+
31
+ | Command | What it does |
32
+ | ------- | ------------ |
33
+ | `bun library/cli.js list` | Discover every note |
34
+ | `bun library/cli.js search <kw>` | Full-library search |
35
+ | `bun library/cli.js open --tui` | Interactive TUI |
36
+ | `bun library/cli.js open --editor` | Local Web UI |
37
+ | `bun run start` | Same as `bun library/cli.js` |
38
+ | `bun run dev` | Open the Web UI |
39
+
40
+ CI runs list/search smoke checks on Node 18, 20, and 22.
41
+
42
+ ## Where things live
43
+
44
+ ```
45
+ *-Notes/ Topic Markdown (Turkish explanations)
46
+ library/cli.js CLI / TUI — Node built-ins only
47
+ library/index.html Web UI — single file, no CDN
48
+ assets/ Logo and static assets
49
+ AGENTS.md Rules for coding agents editing this repo
50
+ ```
51
+
52
+ ## Adding or editing notes
53
+
54
+ - Place the file in the correct `*-Notes/` folder.
55
+ - Name it `lowercase_with_underscores.md`; use `_1`, `_2` for multi-part series.
56
+ - Follow the note template in [AGENTS.md](AGENTS.md): Turkish prose, fenced
57
+ code blocks with a language tag, no YAML frontmatter, no external images.
58
+ - Do not rename existing category folders — the CLI derives categories from them.
59
+
60
+ ## Commits
61
+
62
+ Commit messages follow [Conventional Commits](https://www.conventionalcommits.org):
63
+
64
+ ```
65
+ feat(notes): add spring transaction boundaries note
66
+ fix(cli): search flag not filtering by category
67
+ docs: clarify TUI key bindings in README
68
+ chore(ci): run smoke checks on Node 22
69
+ ```
70
+
71
+ | Type | Use for |
72
+ | ---- | ------- |
73
+ | `feat` | New note, CLI capability, or Web UI behaviour |
74
+ | `fix` | Incorrect behaviour or broken content |
75
+ | `docs` | README, contributing, comments that do not change behaviour |
76
+ | `refactor` | Internal cleanup with no user-visible change |
77
+ | `chore` | CI, tooling, release prep |
78
+
79
+ Optional scopes: `notes`, `java`, `javascript`, `python`, `sql`, `mongodb`,
80
+ `cli`, `web-ui`, `docs`, `ci`.
81
+
82
+ Use the imperative mood, keep the subject under ~72 characters, and put the
83
+ reasoning in the body when the change is not self-evident. No emoji.
84
+
85
+ ## Pull requests
86
+
87
+ Branch from `main`, keep the change focused, and fill in the template. Say what
88
+ changed, why, and how you verified it.
89
+
90
+ - Update `README.md` when CLI flags, TUI keys, or project layout change.
91
+ - Add a `CHANGELOG.md` entry under `Unreleased` for anything a user would notice.
92
+ - Keep the CLI zero-dependency and the Web UI a single file unless the change
93
+ is explicitly about that architecture.
94
+
95
+ Do not commit secrets, tokens, or machine-specific paths.
96
+
97
+ ## Reporting
98
+
99
+ - **Bugs and ideas:** [the issue tracker](https://github.com/burakboduroglu/penote/issues)
100
+ - **Vulnerabilities:** privately, per [SECURITY.md](SECURITY.md) — never as a public issue
101
+
102
+ Thank you for contributing.
@@ -0,0 +1,168 @@
1
+ ## 📃 JPA Hibernate Annotations
2
+
3
+ #### @Entity :
4
+
5
+ - This annotation is used to mark a class as an entity class.
6
+ - This annotation is used to create a table in the database.
7
+
8
+ ```Java
9
+ @Entity
10
+ public class Brand {
11
+ }
12
+ ```
13
+
14
+ ---
15
+
16
+ #### @Table :
17
+
18
+ - @Table annotation is used to specify the details of the table that will be created in the database.
19
+ - The name attribute of the @Table annotation is used to specify the name of the table.
20
+
21
+ ```Java
22
+ @Entity
23
+ @Table(name = "brands")
24
+ public class Brand {
25
+ }
26
+ ```
27
+
28
+ ---
29
+
30
+ #### @Column :
31
+
32
+ - @Column annotation is used to specify the details of the column that will be created in the database.
33
+ - The name attribute of the @Column annotation is used to specify the name of the column.
34
+
35
+ ```Java
36
+
37
+
38
+ @Entity
39
+ @Table(name = "brands")
40
+ public class Brand {
41
+
42
+ @Column(name = "brandName")
43
+ private String brandName;
44
+ }
45
+ ```
46
+
47
+ ---
48
+
49
+ #### @Id :
50
+
51
+ - @Id annotation is used to specify the primary key of an entity.
52
+ - The @Id annotation is always used with the @GeneratedValue annotation.
53
+
54
+ ```Java
55
+ @Entity
56
+ @Table(name = "brands")
57
+ public class Brand {
58
+ @Id
59
+ @Column(name = "id")
60
+ private int id;
61
+
62
+ }
63
+ ```
64
+
65
+ ---
66
+
67
+ #### @ManyToOne :
68
+
69
+ - @ManyToOne annotation is used to specify many to one relationship with another entity.
70
+
71
+ ```Java
72
+ @Entity
73
+ @Table(name = "brands")
74
+ public class Brand {
75
+ @ManyToOne
76
+ @JoinColumn(name = "brandsDetails")
77
+ private BrandDetail brandDetail;
78
+ }
79
+ ```
80
+
81
+ ---
82
+
83
+ #### @OneToMany :
84
+
85
+ - @OneToMany annotation is used to specify one to many relationship with another entity.
86
+ - The mappedBy attribute of the @OneToMany annotation is used to specify the property of the entity that is the owner of the relationship.
87
+
88
+ ```Java
89
+ @Entity
90
+ @Table(name = "brands")
91
+ public class Brand {
92
+
93
+ @OneToMany(mappedBy = "brands", fetch = FetchType.EAGER)
94
+ private BrandDetail brandDetail;
95
+ }
96
+ ```
97
+
98
+ ---
99
+
100
+ #### @PrimaryKeyJoinColumn :
101
+
102
+ - @PrimaryKeyJoinColumn annotation is used to specify the primary key of the entity that is the owner of the relationship.
103
+
104
+ ```Java
105
+ @Entity
106
+ @Table(name = "brands")
107
+ public class Brand {
108
+
109
+ @PrimaryKeyJoinColumn
110
+ private int id;
111
+ }
112
+ ```
113
+
114
+ ---
115
+
116
+ #### @JoinColumn :
117
+
118
+ - @JoinColumn annotation is used to specify the column that will be created in the database as a foreign key.
119
+
120
+ ```Java
121
+ @Entity
122
+ @Table(name = "brands")
123
+ public class Brand {
124
+
125
+ @JoinColumn(name = "brandDetail")
126
+ private BrandDetail brandDetail;
127
+ }
128
+ ```
129
+
130
+ ---
131
+
132
+ #### @JoinTable ve @MapsId:
133
+
134
+ - It is used to specify the join table that will be created in the database.
135
+ - @JoinTable annotation is used to specify the join table that will be created in the database.
136
+ - @MapsId annotation is used to specify the primary key of the entity that is the owner of the relationship.
137
+
138
+ ```Java
139
+ @Entity
140
+ @Table(name = "brands")
141
+ public class Brand {
142
+
143
+ @JoinTable(name = "brands")
144
+ private BrandDetail brandDetail;
145
+ }
146
+ ```
147
+
148
+ ---
149
+
150
+ #### @OneToOne:
151
+
152
+ - @OneToOne annotation is used to specify one to one relationship with another entity.
153
+ - The mappedBy attribute of the @OneToOne annotation is used to specify the property of the entity that is the owner of the relationship.
154
+
155
+ ```Java
156
+ @Entity
157
+ @Table(name = "brands")
158
+ public class Brand {
159
+
160
+ @OneToOne(mappedBy = "brands")
161
+ private BrandDetail brandDetail;
162
+ }
163
+ ```
164
+
165
+ ---
166
+
167
+ ✅ If you like this article, you can give me a star on. 😎
168
+ Thanks for reading. 🙏
@@ -0,0 +1,41 @@
1
+ ## 🥳 Lombok Annotations
2
+
3
+ #### @Data:
4
+
5
+ <ul>
6
+ <li>@ToString</li>
7
+ <li>@EqualsAndHashCode</li>
8
+ <li>@Getter</li>
9
+ <li>@Setter</li>
10
+ <li>@RequiredArgsConstructor</li>
11
+ </ul>
12
+ This annotation is a convenient shortcut that bundles the features of @ToString, @EqualsAndHashCode, @Getter / @Setter and @RequiredArgsConstructor together.
13
+
14
+ ---
15
+
16
+ #### @NoArgsConstructor:
17
+
18
+ - It helps to create a constructor with no arguments.
19
+
20
+ ---
21
+
22
+ #### @AllArgsConstructor:
23
+
24
+ - It helps to create a constructor with all arguments.
25
+
26
+ ---
27
+
28
+ #### @Getter:
29
+
30
+ - Add every getter method for every field in the class.
31
+
32
+ ---
33
+
34
+ #### @Setter:
35
+
36
+ - Add every setter method for every field in the class.
37
+
38
+ ---
39
+
40
+ ✅ If you like this article, you can give me a star on. 😎
41
+ Thanks for reading. 🙏
@@ -0,0 +1,15 @@
1
+ ### About Java-Notes 🚀
2
+
3
+ Kişisel Java notları — Markdown formatında düzenlenmiştir.
4
+
5
+ ### Table of Contents 📚
6
+
7
+ | File Name | Topics |
8
+ | --------- | ------ |
9
+ | [jpa_hibernate.md](jpa_hibernate.md) | Hibernate annotations & examples |
10
+ | [lombok.md](lombok.md) | Lombok annotations & examples |
11
+ | [spring_boot_framework.md](spring_boot_framework.md) | Spring Boot annotations & examples |
12
+
13
+ ---
14
+
15
+ [← README](../README.md)