diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..532b0fb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,54 @@ +name: Bug report +description: Report a reproducible NASbook failure. +title: "[Bug]: " +labels: [bug] +body: + - type: markdown + attributes: + value: Use sample content only. Do not attach real notes, databases, OAuth credentials, or tokens. + - type: input + id: version + attributes: + label: NASbook version + placeholder: V07 / 7.0.0 + validations: + required: true + - type: input + id: windows + attributes: + label: Windows version + placeholder: Windows 11 24H2 x64 + validations: + required: true + - type: dropdown + id: area + attributes: + label: Affected area + options: [Editor, RTL or LTR, Autosave, Search, Categories, Backup, Google Drive, Automatic update, Startup or close, Other] + validations: + required: true + - type: textarea + id: steps + attributes: + label: Reproduction steps using sample data + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected behavior + validations: + required: true + - type: textarea + id: actual + attributes: + label: Actual behavior and sanitized logs + validations: + required: true + - type: checkboxes + id: privacy + attributes: + label: Privacy confirmation + options: + - label: I removed private notes, database contents, credentials, and tokens. + required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..cdad68e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Private security report + url: https://github.com/sufyanaser/NASbook/security/advisories/new + about: Report vulnerabilities privately; never attach real notes or credentials. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..cde958d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,25 @@ +name: Feature request +description: Propose a focused NASbook improvement. +title: "[Feature]: " +labels: [enhancement] +body: + - type: textarea + id: problem + attributes: + label: Problem and workflow + description: Explain the writing, reference, or local knowledge workflow that is blocked. + validations: + required: true + - type: textarea + id: proposal + attributes: + label: Proposed solution + validations: + required: true + - type: textarea + id: data + attributes: + label: Data, privacy, and RTL impact + description: Describe effects on local storage, backup, credentials, and RTL/LTR behavior. + validations: + required: true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 950a526..992327e 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,14 +1,17 @@ -## Summary +## What changed -- What changed -- Why it changed -- User impact +Describe the focused change and its user impact. ## Validation +- [ ] `npm ci` - [ ] `npm run lint` - [ ] `npm run typecheck` - [ ] `npm test` - [ ] `npm run build` -- [ ] Windows installer built -- [ ] Autosave close/reopen test completed +- [ ] RTL and LTR behavior checked when editing UI or editor code +- [ ] Save, close, and restore behavior checked when persistence changed + +## Data and release risk + +Describe effects on SQLite data, autosave, backup, IPC, OAuth, updater behavior, and packaged Windows builds. Attach screenshots for UI changes and confirm that no private notes, credentials, or tokens are included. diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..1f91990 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,11 @@ +# Code of Conduct + +## Our standard + +NASbook welcomes constructive technical participation. Communicate professionally, critique ideas rather than people, respect differing experience, and keep discussions focused on improving the project. + +Harassment, discrimination, threats, deliberate disruption, publication of private information, and sustained personal attacks are not acceptable. + +## Scope and enforcement + +This policy applies to issues, pull requests, reviews, discussions, and other project spaces. Report conduct concerns privately to the repository owner through their GitHub profile. Maintainers may remove content or restrict participation when behavior conflicts with this policy. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..a24c8f6 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,24 @@ +# Contributing + +## Branch and scope + +1. Branch from `develop`. +2. Keep each change focused and preserve existing user data behavior. +3. Do not add cloud sync, telemetry, or new credential handling without an explicit product decision and security review. +4. UI changes must preserve RTL/LTR behavior and avoid editor reflow or save-state regressions. + +## Validation + +Run before opening a pull request: + +```bash +npm ci +npm run lint +npm run typecheck +npm test +npm run build +``` + +For persistence, close, backup, updater, or installer changes, also run the relevant packaged Windows smoke test and document the result in the pull request. + +Feature and fix pull requests target `develop`. Promotion to `main` is a separate verified release boundary. diff --git a/README.md b/README.md index 9f959e8..b561516 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,14 @@ # NAS Notesbook 📔 -Current release: **V06** +Current release: **V07** (`v7.0.0`) + +[![Latest release](https://img.shields.io/github/v/release/sufyanaser/NASbook?display_name=tag&sort=semver&label=release&color=2563eb)](https://github.com/sufyanaser/NASbook/releases/latest) +[![NASbook CI](https://github.com/sufyanaser/NASbook/actions/workflows/ci.yml/badge.svg?branch=develop)](https://github.com/sufyanaser/NASbook/actions/workflows/ci.yml) +![Windows](https://img.shields.io/badge/platform-Windows-0f172a) +![Local first](https://img.shields.io/badge/data-local--first-16a34a) +![RTL first](https://img.shields.io/badge/writing-RTL--first-7c3aed) + +**[Download NASbook V07 for Windows](https://github.com/sufyanaser/NASbook/releases/latest)** NAS Notesbook is **SUFYAN's personal**, **RTL-first, local-first** desktop notebook for ChatGPT prompts, NAS APP project contexts, PowerShell commands, and development notes. Built on Windows using Electron, Vite, React, and SQLite, it runs fully offline as a fast, lightweight writing and reference tool. @@ -50,6 +58,20 @@ v1 is intentionally minimal and personal—not a generic note app for IT admins * **Comfortable Editor Width:** Full panel width for long prompts and technical notes (no narrow hard-cap in v1). * **Simple Local Backup:** Copy notes as Markdown into a user-chosen local folder. No cloud sync integration. * **Google Drive Backup (v0.3.0):** Optional manual backup upload using a local OAuth configuration. Credentials and session tokens are encrypted and stored locally; they are never bundled with the installer. For configuration steps, see [Google_Credentials_Setup.md](docs/Google_Credentials_Setup.md). +* **Automatic Updates (V07):** Installed Windows copies check GitHub Releases in the background, download a newer verified installer, and apply it during a normal safe exit. + +--- + +## Install on Windows + +1. Open the [latest GitHub Release](https://github.com/sufyanaser/NASbook/releases/latest). +2. Download `NASbook-Setup-V07.exe`. +3. Close any older NASbook process and run the installer. +4. Launch NASbook and confirm that your existing notes are present. + +V07 is the first update-enabled release. Users coming from V06 must install V07 manually once; future releases can then arrive through the application. Application updates preserve the existing local notes database, but keeping an independent backup remains recommended. + +Windows builds are currently unsigned and may show a reputation warning. Install only assets downloaded from this repository's Releases page. --- @@ -98,6 +120,24 @@ npm run build ``` Output lands in `./dist-build` with icon `assets/icon.ico`. +### Validate a change + +```powershell +npm ci +npm run lint +npm run typecheck +npm test +npm run build +``` + +## Security and contributing + +- Notes are stored locally in SQLite; normal note editing does not require a remote service. +- Google Drive backup is optional and uses locally supplied OAuth configuration. +- Do not publish notes, database files, OAuth credentials, session tokens, or personal logs in issues. +- Report vulnerabilities privately using [SECURITY.md](SECURITY.md). +- Development changes target `develop`; see [CONTRIBUTING.md](CONTRIBUTING.md) before opening a pull request. + --- ## License & Copyright diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..78cdbf7 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,20 @@ +# Security Policy + +## Supported versions + +Security fixes are applied to the latest published NASbook version. + +| Version | Supported | +| --- | --- | +| 7.x | Yes | +| 6.x and earlier | No | + +## Reporting a vulnerability + +Do not disclose suspected vulnerabilities in a public issue or discussion. Use the repository's **Security** tab to submit a private report through GitHub Security Advisories. + +Include the affected NASbook version, Windows version, reproduction steps, expected and observed behavior, impact, and sanitized logs. Never attach a real notes database, exported private notes, Google OAuth credentials, tokens, or other personal data. + +## Local data and updates + +NASbook stores notes in a local SQLite database. Optional Google Drive backup requires user-provided OAuth configuration. Official installers and update metadata are published only through this repository's GitHub Releases. diff --git a/package-lock.json b/package-lock.json index b0b2db5..999a8da 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6411,9 +6411,9 @@ } }, "node_modules/nanoid": { - "version": "3.3.16", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.16.tgz", - "integrity": "sha512-bzlKTyNJ7+LdGIIwy8ijFpIqEQIvafahV7eYykJ8Cvh42EdJeODoJ6gUJXpQJvej1BddH8OqTXZNE/KfbWAu8Q==", + "version": "3.3.18", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz", + "integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==", "dev": true, "funding": [ { @@ -8468,9 +8468,9 @@ } }, "node_modules/undici": { - "version": "6.27.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-6.27.0.tgz", - "integrity": "sha512-YmfV3YnEDzXRC5lZ2jWtWWHKGUm1zIt8AhesR1tens+HTNv+YZlN/dp6G727LOvMJ8xjP9Be7Y2Sdr96LDm+pg==", + "version": "6.28.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.28.0.tgz", + "integrity": "sha512-LIY910g9TI13YS95lrMFrs8Rm/u/irgHeTWoKCoteeJ04CUJ92eEfj0rVn+7VKMPBpUPiUoBKfhNyLI23EE/KA==", "dev": true, "license": "MIT", "engines": {