Skip to content

Commit 408e4b3

Browse files
refactor
1 parent f26d8b8 commit 408e4b3

25 files changed

+12790
-5964
lines changed

.gitignore

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
.aider*
2+
# Logs
3+
logs
4+
*.log
5+
npm-debug.log*
6+
yarn-debug.log*
7+
yarn-error.log*
8+
pnpm-debug.log*
9+
lerna-debug.log*
10+
11+
# Diagnostic reports (https://nodejs.org/api/report.html)
12+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
13+
14+
# Runtime data
15+
pids
16+
*.pid
17+
*.seed
18+
*.pid.lock
19+
20+
# Directory for instrumented libs generated by jscoverage/JSCover
21+
lib-cov
22+
23+
# Coverage directory used by tools like istanbul
24+
coverage
25+
*.lcov
26+
27+
# nyc test coverage
28+
.nyc_output
29+
30+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-temporary-files)
31+
.grunt
32+
33+
# Bower dependency directory (https://bower.io/)
34+
bower_components
35+
36+
# node-waf configuration
37+
.lock-wscript
38+
39+
# Compiled binary addons (https://nodejs.org/api/addons.html)
40+
build/Release
41+
42+
# Dependency directories
43+
node_modules/
44+
jspm_packages/
45+
46+
# Snowpack dependency directory (https://snowpack.dev/)
47+
web_modules/
48+
49+
# TypeScript cache
50+
*.tsbuildinfo
51+
52+
# Optional npm cache
53+
.npm
54+
55+
# Optional eslint cache
56+
.eslintcache
57+
58+
# Microbundle cache
59+
.rpt2_cache/
60+
.rts2_cache_cjs/
61+
.rts2_cache_es/
62+
.rts2_cache_umd/
63+
64+
# Optional REPL history
65+
.node_repl_history
66+
67+
# Output of 'npm pack'
68+
*.tgz
69+
70+
# Yarn Integrity file
71+
.yarn-integrity
72+
73+
# dotenv environment variables file
74+
.env
75+
.env.development.local
76+
.env.test.local
77+
.env.production.local
78+
79+
# parcel-bundler cache (https://parceljs.org/)
80+
.cache
81+
.parcel-cache
82+
83+
# Next.js build output
84+
.next
85+
out
86+
87+
# Nuxt.js build output
88+
.nuxt
89+
dist
90+
91+
# Svelte build output
92+
.svelte-kit
93+
.svelte
94+
95+
# Remix build output
96+
.cache/
97+
build/
98+
public/build/
99+
100+
# Docusaurus build output
101+
.docusaurus
102+
103+
# Gatsby build output
104+
.cache/
105+
# Comment in the next line in your project's .gitignore file if you're not committing the build output to public
106+
# public
107+
108+
# VuePress build output
109+
.vuepress/dist
110+
111+
# Vite build output
112+
dist

README.md

Lines changed: 39 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1,124 +1,60 @@
11
# Notes2LLM
22

3-
<img src="logo.png" width="200px">
3+
<img src="src/assets/logo.webp" width="200px">
44

55
## About
6-
Notes2LLM is a browser-based tool consisting of a visual code editor/annotator workspace and a prompt generator.
6+
Notes2LLM is a browser-based tool for editing and refining HTML, CSS, and JavaScript code. It combines a visual editor with code-level access and AI integration to facilitate the creation and modification of web content. It is designed to bridge the gap between visual design and code generation by Large Language Models (LLMs).
77

8-
It was developed to assist inexperienced users in their interaction with LLMs (AI), especially in chat interfaces, when creating advanced HTML/CSS/JS projects like static websites, web pages, Wordpress (and other CMS) posts, pages, widgets and homepages, emails and email newsletters, data/information visualisations (tables, diagrams) etc.
8+
## Features
99

10-
It is meant for people who find it challenging to edit text in nested HTML, quickly and reliably prompt a model to fix/remove/expand some element of a project, or craft structured prompts, and cannot afford the services of a professional developer, the credits needed to work with a tool like a page builder (Elementor) or coding assistant (Aider), or a specialized plugin that creates a specific widget they want.
10+
### Visual Workspace
11+
- **Visual Editing**: Select elements to edit text content, image sources, and attributes directly.
12+
- **Styling Controls**: Modify CSS classes, IDs, inline styles, and manage CSS rules.
13+
- **DOM Manipulation**: Move, copy, or remove elements within the document structure.
14+
- **Responsive Preview**: View content in Desktop, Tablet, and Mobile viewport sizes.
15+
- **Interactive Preview Mode**: Toggle to interact with the page (e.g., test buttons, links, and scripts).
1116

12-
## The problem it tries to solve
13-
With models like Gemini 2.5 Pro, which can be used for free in a chat interface and reliably handle quite sizable projects, web development has become more accessible to people without coding knowledge who need to maintain their Wordpress sites, create a personal/company website, need a nice custom email signature or a newsletter template, etc. It is easy to generate visually appealing, advanced elements like custom, unique galleries, slideshows, tables, tabbed content, diagrams and so on without learning and/or purchasing a plugin. The challenge is often to get the result *just right* without browsing nested HTML tags, manually editing text etc. and going back-and-forth with the AI multiple times, which can lead to running out of LLM context, losing track of changes and requires time and effort to write very specific, detailed follow-up prompts to obtain the desired result.
17+
### AI Integration
18+
- **Generate Code**: Create new components or pages from text descriptions using configured AI providers.
19+
- **AI-Assisted Editing**: Select an element and describe changes. The tool sends the element's HTML, relevant CSS, and a screenshot to the AI for context-aware updates.
20+
- **Supported Providers**: OpenAI, Google (Gemini), OpenRouter, and local models (via OpenAI-compatible endpoints).
1421

15-
## Components
22+
### Code Tools
23+
- **Snap-to-Code**: A dual-view mode that highlights the HTML, CSS, and JavaScript code corresponding to the selected visual element.
24+
- **Full Code Editors**: Access and edit the complete HTML body, CSS stylesheet, and JavaScript.
25+
- **Prompt Generator**: A form-based tool to construct detailed prompts for external LLM sessions, covering styling, composition, and accessibility requirements.
1626

17-
### Prompt Generator
18-
The integrated prompt generator helps users create well-structured, comprehensive prompts for LLMs to generate high-quality code. Features include:
27+
### Project Management
28+
- **Import/Export**: Save work as a project file (.json) containing code and edit history, or export as a standalone HTML file.
29+
- **Comments**: Add specific comments to elements to guide further refinement.
1930

20-
- **Purpose Selection**: Specify if you're creating content for WordPress, email, a full website, etc.
21-
- **Styling Options**: Define colors, fonts, and general style direction
22-
- **Component Selection**: Easily specify if you need headers, sliders, galleries, etc.
23-
- **Content Instructions**: Add your content and specify how the LLM should treat your text
24-
- **Accessibility Options**: Ensure your generated code follows accessibility best practices
25-
- **Output Customization**: Control class naming conventions, code comments, and more
31+
## Usage Scenarios
2632

27-
The prompt generator outputs a comprehensive, ready-to-paste prompt that guides the LLM to produce exactly what you need.
33+
### General Workflow
34+
1. **Generate or Import**: Start by generating code within the app, pasting code from an external source, or importing an HTML file.
35+
2. **Refine**: Use visual controls or AI commands to adjust the content and styling.
36+
3. **Export**: Save the project or export the final HTML code.
2837

29-
### Workspace Editor
30-
The visual editor allows you to:
38+
### WordPress
39+
- **Gutenberg**: Paste the exported code into a "Custom HTML" block.
40+
- **Page Builders**: Use "HTML" or "Custom Code" widgets in builders like Elementor.
3141

32-
- **Preview Generated Code**: See the rendered HTML/CSS/JS in a live preview
33-
- **Edit Text Content**: Directly edit text without digging through HTML
34-
- **Modify Images**: Change image sources with a simple input field
35-
- **Customize Styling**: Edit CSS properties for selected elements
36-
- **Manipulate Elements**: Duplicate, remove, or add comments to elements
37-
- **Test Interactions**: Toggle preview mode to test interactive elements
38-
- **Extract Final Code**: Get the processed code to send back to the LLM
42+
### Email
43+
- **Templates**: Use the Prompt Generator to specify "Email" purpose for table-based layouts.
44+
- **Clients**: Paste the code into HTML-supported email editors (e.g., Thunderbird, Outlook HTML mode).
3945

40-
## Example Workflow
46+
## Configuration
4147

42-
The intended workflow follows these steps:
43-
44-
1. **Prepare Content**: Gather your text or data that needs to be presented on the web
45-
2. **Generate Initial Prompt**: Use the Notes2LLM prompt generator to create a structured prompt
46-
3. **Get LLM Response**: Submit the prompt to your preferred LLM and receive generated code
47-
4. **Review & Edit**: Load the code into Notes2LLM workspace to preview and make adjustments
48-
5. **Add Comments**: Insert specific comments about changes needed
49-
6. **Refine with LLM**: Send the edited code with comments back to the LLM
50-
7. **Repeat if Needed**: Continue the refinement process until satisfied
51-
8. **Export Final Code**: Extract the production-ready code for your project
52-
53-
### Using it for WordPress
54-
55-
WordPress integration can be done in several ways:
56-
57-
#### Using Gutenberg Custom HTML Block
58-
1. In your WordPress editor, add a "Custom HTML" block
59-
2. Paste your final Notes2LLM-processed code into the block
60-
3. Switch between "HTML" and "Preview" modes in the block to verify appearance
61-
4. Publish or update your page/post
62-
63-
#### Using Elementor or Other Page Builders
64-
1. Add an "HTML" or "Custom Code" widget to your page layout
65-
2. Paste your final code from Notes2LLM
66-
3. Most page builders will render the preview instantly
67-
4. Save or update your page
68-
69-
### Using it for Email
70-
71-
Email HTML requires special considerations due to limited CSS support across email clients:
72-
73-
#### Creating Email Signatures or Templates
74-
1. Use the prompt generator with "Email" as the purpose
75-
2. Specify "Email Signature" or "Newsletter" as appropriate
76-
3. The generated code will use table-based layouts and inline CSS for maximum compatibility
77-
78-
#### Implementing in Email Clients
79-
- **Thunderbird**: Go to Account Settings > Composition & Addressing > HTML Editor, paste your code
80-
- **Outlook**: Create a new signature in Settings > Mail > Compose and reply, use the HTML editor option
81-
- **Gmail**: Limited HTML editing – best to use signature managers like WiseStamp that let you paste HTML
82-
83-
### Using it for a Website
84-
85-
For standalone websites or web pages:
86-
87-
1. Use the prompt generator with "Full Website," "Web Page," or "Web App" as the purpose
88-
2. Load the generated code into the Notes2LLM workspace
89-
3. Make visual edits and add comments for refinement
90-
4. After refinement with the LLM, extract the final code
91-
5. Deploy to your hosting provider (copy files or use the HTML in a site builder)
92-
93-
### Recommended LLMs
94-
95-
Different LLMs have different strengths for code generation:
96-
97-
- **Claude 3.7 Sonnet with Thinking** (requires Claude Pro subscription, $20/month): Exceptional for complex layouts and maintaining visual consistency. The "thinking" mode significantly improves code quality.
98-
99-
- **Gemini 2.5 Pro** (free in Google AI Studio): Very high quality code generation with good visual design sense. Requires more specific prompts than Claude but handles large projects well.
100-
101-
- **Deepseek v3**: Strong code generation capabilities, particularly good at implementing specific technical requirements.
102-
103-
For comparing different models, consider using [lmarena.ai/leaderboard](https://web.lmarena.ai/leaderboard), which provides comprehensive benchmarks of different models' capabilities.
48+
To use the integrated AI features:
49+
1. Open the settings menu (gear icon).
50+
2. Select a provider (OpenAI, Google, OpenRouter, or Local).
51+
3. Enter your API key and select a model.
52+
4. Keys are stored in your browser's `localStorage`.
10453

10554
## Privacy
10655

107-
Notes2LLM processes all code directly in your browser. No data is sent to any server, and no information is collected or stored outside your browser. All operations happen locally on your device, ensuring complete privacy of your content and code.
56+
Notes2LLM operates client-side. Code processing occurs in the browser. API keys are stored locally and are only used to communicate directly with the selected AI provider.
10857

10958
## License
11059

111-
Notes2LLM is released under the MIT License, making it free to use and modify.
112-
113-
## Contributing
114-
115-
Contributions are welcome! Feel free to submit issues or pull requests to help improve Notes2LLM.
116-
117-
## Getting Started
118-
119-
1. Visit the Notes2LLM website or download and open index.html
120-
2. Use the prompt generator to create a structured prompt
121-
3. Send the prompt to your preferred LLM
122-
4. Load the generated code into the Notes2LLM workspace
123-
5. Make visual edits and add comments
124-
6. Export the final code for your project
60+
Notes2LLM is released under the MIT License.

0 commit comments

Comments
 (0)