Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -324,3 +324,6 @@ TSWLatexianTemp*
# option is specified. Footnotes are the stored in a file with suffix Notes.bib.
# Uncomment the next line to have this generated file ignored.
#*Notes.bib

/notes/
node_modules/
213 changes: 83 additions & 130 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,145 +48,124 @@
---

<div align="center">
<h1>TODO: Project Name</h1>
<h1>Smart Notes</h1>
</div>

[TODO](https://TODO.stability.nexus/) is a ... TODO: Project Description.
[Smart Notes](https://github.com/tani-dubey/Smart-Notes) is a local-first, privacy-focused desktop application for personal knowledge management.
It provides a markdown-based note editor with safe file persistence, draft handling, and dynamic titles, forming a solid foundation for future AI-powered semantic search and RAG features.

The project prioritizes offline usage, user data ownership, and incremental feature development.

---

## 🚀 Features

TODO: List your main features here:

- **Feature 1**: Description
- **Feature 2**: Description
- **Feature 3**: Description
- **Feature 4**: Description
Core Editor (Current Prototype)

- **📝 Markdown note editing**: raw text, no rendering yet
- **💾 Explicit Save / Saved state** with dirty-tracking
- **📄 Draft-based note creation**:
- Auto-creates drafts on first typing
- Finalizes drafts on save
- **🏷️ Dynamic note titles**:
- Filename derived from first line of content
- Empty notes handled as `untitled.md`
- **🔁 Safe file switching**:
- Open, edit, and update multiple notes
- No accidental overwrites or data loss
- **📂 Local filesystem storage**:
- Notes stored as `.md` files on disk
- Fully offline by default

⚠️ AI features (semantic search, embeddings, RAG) are planned and intentionally not included yet.

---

## 💻 Tech Stack

TODO: Update based on your project

### Frontend
- React / Next.js / Flutter / React Native
- TypeScript
- TailwindCSS

### Backend
- Flask / FastAPI / Node.js / Supabase
- Database: PostgreSQL / SQLite / MongoDB
### Desktop Application
- **Electron** — cross-platform desktop shell
- **HTML / CSS / JavaScript** — UI and editor logic
- **Node.js (fs, path)** — local filesystem access

### AI/ML (if applicable)
- LangChain / LangGraph / LlamaIndex
- Google Gemini / OpenAI / Anthropic Claude
- Vector Database: Weaviate / Pinecone / Chroma
- RAG / Prompt Engineering / Agent Frameworks
### Storage
- Local markdown files `(.md)`
- No database, no cloud dependency

### Blockchain (if applicable)
- Solidity / solana / cardano / ergo Smart Contracts
- Hardhat / Truffle / foundry
- Web3.js / Ethers.js / Wagmi
- OpenZeppelin / alchemy / Infura
### AI/ML (Planned)
- Ollama (local LLMs)
- Embeddings + vector store (local)
- Retrieval-Augmented Generation (RAG)

---

## ✅ Project Checklist

TODO: Complete applicable items based on your project type

- [ ] **The protocol** (if applicable):
- [ ] has been described and formally specified in a paper.
- [ ] has had its main properties mathematically proven.
- [ ] has been formally verified.
- [ ] **The smart contracts** (if applicable):
- [ ] were thoroughly reviewed by at least two knights of The Stable Order.
- [ ] were deployed to: [Add deployment details]
- [ ] **The mobile app** (if applicable):
- [ ] has an _About_ page containing the Stability Nexus's logo and pointing to the social media accounts of the Stability Nexus.
- [ ] is available for download as a release in this repo.
- [ ] is available in the relevant app stores.
- [ ] **The AI/ML components** (if applicable):
- [ ] LLM/model selection and configuration are documented.
- [ ] Prompts and system instructions are version-controlled.
- [ ] Content safety and moderation mechanisms are implemented.
- [ ] API keys and rate limits are properly managed.

---

## 🔗 Repository Links
- ### Editor
- [x] Local-first design
- [x] Draft handling
- [x] Safe save/load
- [x] Dynamic file naming
- [ ] Markdown rendering (planned)
- [ ] Search (planned)

TODO: Update with your repository structure

1. [Main Repository](https://github.com/AOSSIE-Org/TODO)
2. [Frontend](https://github.com/AOSSIE-Org/TODO/tree/main/frontend) (if separate)
3. [Backend](https://github.com/AOSSIE-Org/TODO/tree/main/backend) (if separate)
- ### AI / ML (Planned)
- [ ] Local embedding pipeline
- [ ] Hybrid search (keyword + vector)
- [ ] On-device RAG
- [ ] Model backend selection

---

## 🏗️ Architecture Diagram

TODO: Add your system architecture diagram here

```
[Architecture Diagram Placeholder]
```

You can create architecture diagrams using:
- [Draw.io](https://draw.io)
- [Excalidraw](https://excalidraw.com)
- [Lucidchart](https://lucidchart.com)
- [Mermaid](https://mermaid.js.org) (for code-based diagrams)
smart-notes/
├─ app/
│ ├─ index.html
│ ├─ style.css
│ └─ main.js
|
├─ notes/ (optional to have)
│ └─ (your .md files go here)
|
├─ main.js (Entrypoint)
├─ package.json
└─ README.md

Example structure to include:
- Frontend components
- Backend services
- Database architecture
- External APIs/services
- Data flow between components
```
### Planned Extension
- Python backend for embeddings & RAG
- Local IPC between Electron and backend

---

## 🔄 User Flow

TODO: Add user flow diagrams showing how users interact with your application

```
[User Flow Diagram Placeholder]
```
<img width="719" height="713" alt="image" src="https://github.com/user-attachments/assets/c66c9d9e-86a7-4334-863c-4481da0680c3" />

### Key User Journeys

TODO: Document main user flows:

1. **User Journey 1**: Description
- Step 1
- Step 2
- Step 3

2. **User Journey 2**: Description
- Step 1
- Step 2
- Step 3
### User Journey: Create & Save a Note
1. User opens the app
2. Starts typing → draft is auto-created
3. First line becomes the title
4. Clicks Save
5. Draft is finalized and stored as a markdown file

3. **User Journey 3**: Description
- Step 1
- Step 2
- Step 3
### User Journey: Edit Existing Note
1. User clicks a note in the sidebar
2. Content loads into editor
3. User edits content
4. Save updates the file safely

---

## �🍀 Getting Started

### Prerequisites

TODO: List what developers need installed

- Node.js 18+ / Python 3.9+ / Flutter SDK
- npm / yarn / pnpm
- [Any specific tools or accounts needed]
- Node.js 18+
- npm

### Installation

Expand All @@ -195,46 +174,22 @@ TODO: Provide detailed setup instructions
#### 1. Clone the Repository

```bash
git clone https://github.com/AOSSIE-Org/TODO.git
cd TODO
git clone https://github.com/AOSSIE-Org/SmartNotes.git
cd SmartNotes
```

#### 2. Install Dependencies

```bash
npm install
# or
yarn install
# or
pnpm install
```

#### 3. Configure Environment Variables(.env.example)

Create a `.env` file in the root directory:

```env
# Add your environment variables here
API_KEY=your_api_key
DATABASE_URL=your_database_url
```

#### 4. Run the Development Server
#### 3. Run the app

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
npm start
```

#### 5. Open your Browser

Navigate to [http://localhost:3000](http://localhost:3000) to see the application.

For detailed setup instructions, please refer to our [Installation Guide](./docs/INSTALL_GUIDE.md) (if you have one).

---

## 📱 App Screenshots
Expand All @@ -257,8 +212,6 @@ Thank you for considering contributing to this project! Contributions are highly

## ✨ Maintainers

TODO: Add maintainer information

- [Maintainer Name](https://github.com/username)
- [Maintainer Name](https://github.com/username)

Expand All @@ -273,8 +226,8 @@ See the [LICENSE](LICENSE) file for details.

## 💪 Thanks To All Contributors

Thanks a lot for spending your time helping TODO grow. Keep rocking 🥂
Thanks a lot for spending your time helping Smart-Notes grow. Keep rocking 🥂

[![Contributors](https://contrib.rocks/image?repo=AOSSIE-Org/TODO)](https://github.com/AOSSIE-Org/TODO/graphs/contributors)
[![Contributors](https://contrib.rocks/image?repo=AOSSIE-Org/Smart-Notes)](https://github.com/AOSSIE-Org/Smart-Notes/graphs/contributors)

© 2025 AOSSIE
© 2025 AOSSIE
28 changes: 28 additions & 0 deletions app/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self'" />
<title>Smart Notes MVP</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>

<div id="container">
<div id="sidebar">
<button id="new-note">+ New Note</button>
<ul id="notes-list"></ul>
</div>

<div id="main-area">
<div id="editor-toolbar">
<button id="save-note">💾 Save</button>
</div>
<textarea id="editor" placeholder="Write markdown here..." disabled></textarea>
</div>
Comment on lines +13 to +23
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Use semantic HTML elements and add explicit type="button" to buttons.

<div> is used for both the sidebar and main area. <aside> and <main> would be semantically correct and improve accessibility. Additionally, <button> elements outside a form technically default to type="submit" per spec — being explicit prevents any unintended behavior.

🛠️ Proposed fix
-  <div id="sidebar">
+  <aside id="sidebar">
-    <button id="new-note">+ New Note</button>
+    <button id="new-note" type="button">+ New Note</button>
     <ul id="notes-list"></ul>
-  </div>
+  </aside>

-  <div id="main-area">
+  <main id="main-area">
     <div id="editor-toolbar">
-      <button id="save-note">💾 Save</button>
+      <button id="save-note" type="button">💾 Save</button>
     </div>
     <textarea id="editor" placeholder="Write markdown here..." disabled></textarea>
-  </div>
+  </main>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<div id="sidebar">
<button id="new-note">+ New Note</button>
<ul id="notes-list"></ul>
</div>
<div id="main-area">
<div id="editor-toolbar">
<button id="save-note">💾 Save</button>
</div>
<textarea id="editor" placeholder="Write markdown here..." disabled></textarea>
</div>
<aside id="sidebar">
<button id="new-note" type="button">+ New Note</button>
<ul id="notes-list"></ul>
</aside>
<main id="main-area">
<div id="editor-toolbar">
<button id="save-note" type="button">💾 Save</button>
</div>
<textarea id="editor" placeholder="Write markdown here..." disabled></textarea>
</main>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/index.html` around lines 13 - 23, Replace the non-semantic containers
with semantic elements and make buttons explicit: change the <div id="sidebar">
to <aside id="sidebar"> and <div id="main-area"> to <main id="main-area"> to
improve accessibility, and add type="button" attributes to the buttons with ids
"new-note" and "save-note" so they do not default to submit behavior; keep the
existing ids ("sidebar", "main-area", "new-note", "save-note", "notes-list",
"editor-toolbar", "editor") and attributes (e.g., textarea disabled/placeholder)
unchanged otherwise.

</div>

<script src="main.js"></script>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Add defer to the <script> tag.

Placing the script at the end of <body> avoids render-blocking, but Lighthouse and the Google HTML style guide still recommend defer for explicit, forward-compatible non-blocking loading.

🛠️ Proposed fix
-  <script src="main.js"></script>
+  <script src="main.js" defer></script>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<script src="main.js"></script>
<script src="main.js" defer></script>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@app/index.html` at line 26, The script tag that loads main.js should include
the defer attribute to ensure non-blocking, forward-compatible execution; update
the <script src="main.js"></script> element to include defer (i.e., <script
src="main.js" defer></script>) so the script is downloaded asynchronously and
executed after parsing without changing placement at the end of the body.

</body>
</html>
Loading
Loading