Skip to content

Commit 7dede36

Browse files
JOHNJOHN
authored andcommitted
docs: Comprehensive README updates across all folders
- Updated main README.md with recovery file feature and improved installation instructions - Enhanced all folder READMEs with comprehensive documentation: - src/popup/components/README.md - Complete component documentation - src/sidepanel/components/README.md - Feed component details - src/contexts/README.md - Context API usage - src/offscreen/README.md - Offscreen document architecture - src/profile/README.md - Profile renderer details - src/styles/README.md - Styling and Tailwind guide - src/test/README.md - Test setup and mocks - src/utils/README.md - Added recovery file and singleton docs - src/background/README.md - Enhanced with logging and error handling - src/content/README.md - Added security and memory management - src/popup/README.md - Added features and keyboard shortcuts - src/sidepanel/README.md - Added features and performance notes - src/README.md - Enhanced with entry points and development guide - icons/README.md - Complete icon documentation - docs/README.md - Documentation index All READMEs now include: - What the folder/project is - What it can do - How to use features - Architecture/technical details - Code examples - Related files and links - Best practices
1 parent 71894ff commit 7dede36

File tree

16 files changed

+1564
-233
lines changed

16 files changed

+1564
-233
lines changed

README.md

Lines changed: 41 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A powerful Chrome extension that lets you **draw graffiti on web pages**, create text annotations, bookmark URLs, and share everything through the decentralized Pubky network. All your data syncs to your personal Pubky homeserver - no third-party tracking!
44

5-
[![Version](https://img.shields.io/badge/version-1.0.0-blue.svg)](https://github.com/yourusername/graphiti)
5+
[![Version](https://img.shields.io/badge/version-1.0.0-blue.svg)](https://github.com/BitcoinErrorLog/graphiti)
66
[![License](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
77

88
## ✨ Features
@@ -48,12 +48,13 @@ See what your network is sharing:
4848
- Post your own content with tags
4949
- Engage with your decentralized network
5050

51-
### 🔐 **Privacy-First Authentication**
52-
Secure QR-based authentication:
51+
### 🔐 **Privacy-First Authentication & Key Management**
52+
Secure QR-based authentication with key backup:
5353
- Scan QR code with Pubky Ring mobile app
5454
- No passwords, no tracking
5555
- Your keys, your data
5656
- Sessions stored locally
57+
- **Recovery file export** - Backup your keys with encrypted recovery files
5758
- Full control over your identity
5859

5960
### 🛠️ **Developer Tools**
@@ -68,18 +69,21 @@ Built-in debugging and monitoring:
6869

6970
### Installation (For Users)
7071

71-
**Option 1: Install from ZIP**
72-
1. Download `graphiti-extension.zip`
73-
2. Extract to a folder
72+
**Option 1: Install from ZIP (Recommended)**
73+
1. Download `graphiti-extension.zip` from the repository
74+
2. Extract the zip file to a folder (e.g., `graphiti-extension`)
7475
3. Open Chrome → `chrome://extensions`
75-
4. Enable "Developer mode"
76-
5. Click "Load unpacked" → Select the `dist` folder
77-
6. Done! 🎉
76+
4. Enable "Developer mode" (toggle in top-right)
77+
5. Click "Load unpacked"
78+
6. Select the extracted folder (not the zip file itself)
79+
7. Done! 🎉
80+
81+
**Note:** The zip file contains the pre-built extension. You don't need to build it yourself.
7882

7983
**Option 2: Build from Source**
8084
```bash
8185
# Clone the repository
82-
git clone https://github.com/yourusername/graphiti.git
86+
git clone https://github.com/BitcoinErrorLog/graphiti.git
8387
cd graphiti
8488

8589
# Install dependencies
@@ -197,6 +201,25 @@ npm run build
197201
- **Annotations** - Text annotations on this page
198202
- **Your Content** - Your own posts and annotations
199203

204+
### Profile Management
205+
206+
**Edit Your Profile:**
207+
1. Click the extension icon
208+
2. Click "✏️ Edit Profile"
209+
3. Update your name, bio, avatar, status, and links
210+
4. Click "Save Profile" to sync to your homeserver
211+
212+
**Export Recovery File (Key Backup):**
213+
1. Click the extension icon
214+
2. Click "✏️ Edit Profile"
215+
3. Scroll to "Key Backup" section
216+
4. Click "🔐 Export Recovery File"
217+
5. Enter a strong passphrase (min 8 chars, letters + numbers)
218+
6. Confirm the passphrase
219+
7. File downloads automatically (`pubky-recovery-YYYY-MM-DD.recovery`)
220+
221+
**Important:** Store your recovery file securely! You'll need it and your passphrase to restore your keys if you lose access to your device.
222+
200223
## 🏗️ Architecture
201224

202225
### Technology Stack
@@ -584,11 +607,15 @@ MIT License - see [LICENSE](LICENSE) file for details
584607
- **Pubky Team** - For the innovative protocol and SDK
585608
- **Open Source Community** - For amazing tools and libraries
586609

587-
## 📞 Support
610+
## 📞 Support & Documentation
588611

589-
- **Issues:** [GitHub Issues](https://github.com/yourusername/graphiti/issues)
590-
- **Docs:** See `/docs` folder for detailed documentation
591-
- **Debug:** Use built-in debug panel in extension
612+
- **Issues:** [GitHub Issues](https://github.com/BitcoinErrorLog/graphiti/issues)
613+
- **Documentation:** See `/docs` folder for detailed technical documentation
614+
- **Features:** See [FEATURES.md](FEATURES.md) for complete feature documentation
615+
- **Security:** See [SECURITY.md](SECURITY.md) for security information
616+
- **Contributing:** See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines
617+
- **Changelog:** See [CHANGELOG.md](CHANGELOG.md) for version history
618+
- **Debug:** Use built-in debug panel in extension (click 🔧 in popup)
592619

593620
## 🌟 Star History
594621

docs/README.md

Lines changed: 106 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,119 @@
11
# Graphiti Documentation
22

3-
This folder contains the documentation for the Graphiti Chrome Extension.
3+
Comprehensive technical documentation for the Graphiti Chrome Extension.
44

55
## Documentation Structure
66

7-
- **[UTF16_HASH_ENCODING.md](UTF16_HASH_ENCODING.md)** - Technical specification for the UTF-16 URL hash tag encoding
8-
- **[ARCHITECTURE.md](ARCHITECTURE.md)** - System architecture and component overview
9-
- **[API_REFERENCE.md](API_REFERENCE.md)** - API client documentation
10-
- **[TESTING.md](TESTING.md)** - Test documentation and running tests
7+
This folder contains detailed documentation covering architecture, APIs, testing, and technical specifications.
8+
9+
## Core Documentation
10+
11+
### [ARCHITECTURE.md](ARCHITECTURE.md)
12+
System architecture and component overview:
13+
- Extension architecture
14+
- Component relationships
15+
- Data flow diagrams
16+
- Technology stack
17+
- Design patterns
18+
19+
### [API_REFERENCE.md](API_REFERENCE.md)
20+
API client documentation:
21+
- Pubky API SDK usage
22+
- Nexus API client
23+
- Storage utilities
24+
- Crypto functions
25+
- Validation utilities
26+
- Code examples
27+
28+
### [TESTING.md](TESTING.md)
29+
Complete testing guide:
30+
- Test setup and configuration
31+
- Writing tests
32+
- Running tests
33+
- Test coverage
34+
- E2E testing with Playwright
35+
- Best practices
36+
37+
### [UTF16_HASH_ENCODING.md](UTF16_HASH_ENCODING.md)
38+
Technical specification for URL hash tag encoding:
39+
- UTF-16 encoding algorithm
40+
- Privacy-preserving URL hashing
41+
- Implementation details
42+
- Security considerations
43+
44+
### [DEVELOPMENT.md](DEVELOPMENT.md)
45+
Development setup and workflow:
46+
- Prerequisites
47+
- Installation
48+
- Development workflow
49+
- Environment variables
50+
- Debugging
51+
- Hot reload
52+
53+
### [DEPLOYMENT.md](DEPLOYMENT.md)
54+
Deployment and distribution:
55+
- Building for production
56+
- Chrome Web Store submission
57+
- Version management
58+
- Release process
59+
60+
### [PERFORMANCE.md](PERFORMANCE.md)
61+
Performance optimization guide:
62+
- Bundle size optimization
63+
- Lazy loading
64+
- Code splitting
65+
- Performance monitoring
66+
- Best practices
67+
68+
### [CONTRIBUTING_DETAILED.md](CONTRIBUTING_DETAILED.md)
69+
Detailed contribution guidelines:
70+
- Code style
71+
- Git workflow
72+
- PR process
73+
- Review process
74+
75+
### [DEPENDENCY_UPGRADE_PLAN.md](DEPENDENCY_UPGRADE_PLAN.md)
76+
Dependency upgrade planning:
77+
- Upgrade priorities
78+
- Breaking changes tracking
79+
- Security updates
80+
- Upgrade process
1181

1282
## Quick Links
1383

1484
- [Main README](../README.md) - Getting started guide
15-
- [Features](../FEATURES.md) - Complete feature documentation
85+
- [FEATURES.md](../FEATURES.md) - Complete feature documentation
86+
- [SECURITY.md](../SECURITY.md) - Security information
87+
- [CONTRIBUTING.md](../CONTRIBUTING.md) - Contribution guidelines
88+
- [CHANGELOG.md](../CHANGELOG.md) - Version history
1689

1790
## Archive
1891

19-
The [archive/](archive/) folder contains historical development notes that were used during development. These are preserved for reference but may be outdated.
92+
The [archive/](archive/) folder contains:
93+
- Historical development notes
94+
- Duplicate files (gitignored)
95+
- Remnant documentation from development
96+
97+
These files are preserved for reference but may be outdated.
98+
99+
## Documentation Standards
100+
101+
All documentation should:
102+
- Be clear and concise
103+
- Include code examples
104+
- Use proper markdown formatting
105+
- Be kept up to date
106+
- Include relevant links
107+
108+
## Contributing to Documentation
109+
110+
When adding features:
111+
1. Update relevant documentation files
112+
2. Add code examples
113+
3. Update API references
114+
4. Add to CHANGELOG.md if user-facing
115+
116+
## See Also
20117

118+
- [Root README](../README.md) - Main project documentation
119+
- [Source Code README](../src/README.md) - Source code structure

icons/README.md

Lines changed: 65 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
11
# Extension Icons
22

3-
Icons for the Graphiti Chrome extension.
3+
Icons for the Graphiti Chrome Extension at various sizes required by Chrome.
4+
5+
## Overview
6+
7+
The extension uses a consistent icon design across all sizes. Icons are provided in both PNG (for Chrome) and SVG (for scalable use) formats.
48

59
## Files
610

7-
- `icon.svg` - Source SVG icon
8-
- `icon16.png` - 16×16 toolbar icon
9-
- `icon48.png` - 48×48 extension management
10-
- `icon128.png` - 128×128 Chrome Web Store
11-
- `icon*.svg` - SVG versions at each size
11+
| File | Size | Usage |
12+
|------|------|-------|
13+
| `icon.svg` | Source | Source SVG file |
14+
| `icon16.png` | 16×16 | Toolbar icon |
15+
| `icon16.svg` | 16×16 | SVG version |
16+
| `icon48.png` | 48×48 | Extension management page |
17+
| `icon48.svg` | 48×48 | SVG version |
18+
| `icon128.png` | 128×128 | Chrome Web Store |
19+
| `icon128.svg` | 128×128 | SVG version |
1220

1321
## Usage in Manifest
1422

23+
Icons are referenced in `manifest.json`:
24+
1525
```json
1626
{
1727
"icons": {
@@ -28,21 +38,60 @@ Icons for the Graphiti Chrome extension.
2838
}
2939
```
3040

41+
## Design
42+
43+
The icon features:
44+
- **Gradient Design** - Purple to blue gradient background
45+
- **Rounded Corners** - Modern, friendly appearance
46+
- **Flat Style** - Clean, minimalist design
47+
- **High Contrast** - Works well at small sizes
48+
- **Consistent Branding** - Matches extension theme
49+
50+
## Icon Sizes
51+
52+
Chrome requires specific sizes:
53+
- **16×16** - Toolbar icon (most common view)
54+
- **48×48** - Extension management page (`chrome://extensions`)
55+
- **128×128** - Chrome Web Store listing
56+
3157
## Generating Icons
3258

33-
Icon generation tools are available in `docs/archive/`:
34-
- `create-png-icons.js` - Script to create PNG icons
59+
If you need to regenerate icons:
60+
61+
**Option 1: Use Source SVG**
62+
1. Edit `icon.svg` in a vector editor
63+
2. Export at required sizes
64+
3. Save as PNG files
65+
66+
**Option 2: Use Generation Scripts**
67+
Scripts are available in `docs/archive/`:
68+
- `create-png-icons.js` - Node.js script to create PNG icons
3569
- `generate-icons.html` - HTML-based icon generator
3670

37-
## Design
71+
## Best Practices
3872

39-
The icon uses a gradient design with:
40-
- Purple to blue gradient
41-
- Rounded corners
42-
- Modern flat style
43-
- Works well at small sizes
73+
1. **Keep Source SVG** - Always maintain the source SVG file
74+
2. **Optimize PNGs** - Compress PNG files for smaller size
75+
3. **Test at All Sizes** - Verify icons look good at 16px, 48px, and 128px
76+
4. **Consistent Design** - All sizes should look like the same icon
77+
5. **High Quality** - Use high-resolution source for crisp rendering
4478

45-
## See Also
79+
## File Sizes
4680

47-
- [manifest.json](../manifest.json)
81+
Typical file sizes:
82+
- SVG: ~2-5 KB
83+
- PNG 16×16: ~1-2 KB
84+
- PNG 48×48: ~3-5 KB
85+
- PNG 128×128: ~8-15 KB
86+
87+
## Accessibility
88+
89+
Icons should:
90+
- Have sufficient contrast
91+
- Be recognizable at small sizes
92+
- Work in both light and dark themes (if applicable)
93+
94+
## See Also
4895

96+
- [manifest.json](../manifest.json) - Icon configuration
97+
- [Chrome Icon Guidelines](https://developer.chrome.com/docs/extensions/mv3/user_interface/#icons)

src/README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,66 @@ After running `npm run build`, compiled files are in `dist/`:
6767
| Popup | `popup/main.tsx` | Extension popup React app |
6868
| Sidepanel | `sidepanel/main.tsx` | Feed viewer React app |
6969

70+
## Entry Points
71+
72+
| Entry Point | Source File | Purpose |
73+
|-------------|-------------|---------|
74+
| Background | `background/background.ts` | Service worker, extension lifecycle |
75+
| Content | `content/content.ts` | Page injection, drawing, annotations |
76+
| Popup | `popup/main.tsx` | Extension popup React app |
77+
| Sidepanel | `sidepanel/main.tsx` | Feed viewer React app |
78+
| Profile | `profile/profile-renderer.ts` | Profile page renderer |
79+
| Offscreen | `offscreen/offscreen.ts` | Offscreen document for SDK |
80+
81+
## Build Output
82+
83+
After running `npm run build`, compiled files are in `dist/`:
84+
85+
- `background.js` - Service worker
86+
- `content.js` - Content script
87+
- `popup.html` + assets - Popup UI
88+
- `sidepanel.html` + assets - Side panel UI
89+
- `src/profile/profile-renderer.html` - Profile renderer
90+
- `src/offscreen/offscreen.js` - Offscreen document
91+
92+
## Development
93+
94+
### Adding New Features
95+
96+
**New Utility:**
97+
1. Create file in `utils/`
98+
2. Export functions/classes
99+
3. Add TypeScript types
100+
4. Write tests in `utils/__tests__/`
101+
102+
**New Component:**
103+
1. Create in `popup/components/` or `sidepanel/components/`
104+
2. Use React + TypeScript
105+
3. Style with Tailwind CSS
106+
4. Import and use in parent component
107+
108+
**New Content Script Feature:**
109+
1. Create manager class in `content/`
110+
2. Initialize in `content.ts`
111+
3. Handle messages from background
112+
4. Use inline styles to avoid conflicts
113+
114+
## Testing
115+
116+
Tests are located in `__tests__/` directories:
117+
- Unit tests for utilities
118+
- Integration tests for API clients
119+
- Component tests for React components
120+
121+
Run tests with:
122+
```bash
123+
npm test
124+
```
125+
70126
## See Also
71127

72128
- [Root README](../README.md) - Getting started
73129
- [FEATURES.md](../FEATURES.md) - Feature documentation
74130
- [docs/](../docs/) - Technical documentation
131+
- [CONTRIBUTING.md](../CONTRIBUTING.md) - Contribution guidelines
75132

0 commit comments

Comments
 (0)