Skip to content

Commit 9b62960

Browse files
committed
refactor for API
1 parent bf48c2b commit 9b62960

5 files changed

Lines changed: 175 additions & 128 deletions

File tree

README.md

Lines changed: 53 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# KaraKeep HomeDash
22

3-
A more compact home page dashboard style view for browsing your [KaraKeep](https://github.com/karakeep-app/karakeep) bookmarks. All Karakeep bookmarks are shown on one single page, organized by lists. This is meant to be a very simple and uncluttered dashboard to your bookmarks, all bookmark management capabilities are done through the full (and awesome) KaraKeep app.
3+
A more compact home page dashboard style view for browsing your [KaraKeep](https://github.com/karakeep-app/karakeep) bookmarks. All Karakeep bookmarks are shown on one single page, organized by lists. This is meant to be a very simple and uncluttered dashboard to your bookmarks, all bookmark management capabilities are done through the full (and awesome) KaraKeep app.
44

55
![KaraKeep HomeDash Screenshot](screenshot.png)
66

@@ -10,14 +10,15 @@ A more compact home page dashboard style view for browsing your [KaraKeep](https
1010
- 🔍 **Real-time Search** - Instantly filter bookmarks as you type
1111
- 🖱️ **Drag & Drop** - Reorder lists to your preference
1212
- 📱 **Responsive** - Works beautifully on desktop, tablet, and mobile
13-
- 🚀 **Fast** - SQLite WASM runs entirely in your browser
14-
- 🔒 **Privacy-First** - Your data never leaves your device
13+
- 🔌 **API Integration** - Connects directly to KaraKeep via API
14+
- 🔒 **Privacy-First** - Uses your own KaraKeep instance and API key
1515

1616
## Quick Start with Docker
1717

1818
### Prerequisites
1919
- Docker and Docker Compose installed
20-
- Access to your KaraKeep `db.db` file through a docker volume
20+
- A running KaraKeep instance
21+
- Your KaraKeep API key (get it from KaraKeep settings)
2122

2223
### Using Pre-built Image
2324

@@ -33,8 +34,6 @@ services:
3334
ports:
3435
- "8595:8595"
3536
volumes:
36-
# Update path to your KaraKeep database
37-
- /path/to/karakeep/db.db:/app/db.db:ro
3837
# Config directory for persistence
3938
- ./config:/app/config
4039
restart: unless-stopped
@@ -45,13 +44,20 @@ services:
4544
docker-compose up -d
4645
```
4746

48-
3. Open http://localhost:8595 in your browser
47+
3. Edit the config file to add your API key:
48+
```bash
49+
# Edit ./config/config.json and add your KaraKeep API key
50+
nano ./config/config.json
51+
```
52+
53+
4. Open http://localhost:8595 in your browser
4954

5055
## Manual Installation
5156

5257
### Prerequisites
5358
- Python 3.7+ (for the server)
54-
- Your KaraKeep `db.db` file
59+
- A running KaraKeep instance
60+
- Your KaraKeep API key
5561

5662
### Setup
5763

@@ -61,39 +67,51 @@ git clone https://github.com/codejawn/karakeep-homedash.git
6167
cd karakeep-homedash
6268
```
6369

64-
2. Copy your KaraKeep database:
70+
2. Start the server:
6571
```bash
66-
cp /path/to/karakeep/db.db .
72+
python server.py
6773
```
6874

69-
3. Start the server:
75+
3. Edit the config file:
7076
```bash
71-
python server.py
77+
# Edit config/config.json and add your KaraKeep API key
78+
nano config/config.json
7279
```
7380

7481
4. Open http://localhost:8595 in your browser
7582

7683
## Configuration
7784

78-
The application uses a `config/config.json` file for settings. If it doesn't exist, it will be created automatically with defaults.
85+
The application uses a `config/config.json` file for settings. On first run, a default config file will be created. You must edit this file to add your KaraKeep API key.
7986

8087
### Configuration Options
8188

8289
```json
8390
{
8491
"karakeepUrl": "http://localhost:3000",
92+
"apiKey": "YOUR_KARAKEEP_API_KEY_HERE",
8593
"bookmarkTarget": "_self",
8694
"preferences": {
87-
"columnOrder": []
95+
"columnOrder": [],
96+
"columnLayout": {}
8897
}
8998
}
9099
```
91100

92-
| Option | Description | Default |
93-
|--------|-------------|---------|
94-
| `karakeepUrl` | URL to your KaraKeep instance | `http://localhost:3000` |
95-
| `bookmarkTarget` | Where to open bookmarks: `_self` (same tab) or `_blank` (new tab) | `_self` |
96-
| `preferences.columnOrder` | Saved order of bookmark lists (managed automatically) | `[]` |
101+
| Option | Description | Default | Required |
102+
|--------|-------------|---------|----------|
103+
| `karakeepUrl` | URL to your KaraKeep instance | `http://localhost:3000` | Yes |
104+
| `apiKey` | Your KaraKeep API key | Must be set | Yes |
105+
| `bookmarkTarget` | Where to open bookmarks: `_self` (same tab) or `_blank` (new tab) | `_self` | No |
106+
| `preferences.columnOrder` | Saved order of bookmark lists (managed automatically) | `[]` | No |
107+
| `preferences.columnLayout` | Saved column layout (managed automatically) | `{}` | No |
108+
109+
### Getting Your API Key
110+
111+
1. Open your KaraKeep instance
112+
2. Go to Settings → API
113+
3. Create a new API key or copy an existing one
114+
4. Add it to your `config/config.json`
97115

98116
## Development
99117

@@ -102,8 +120,6 @@ The application uses a `config/config.json` file for settings. If it doesn't exi
102120
For development without Docker:
103121

104122
```bash
105-
# Install dependencies (none required!)
106-
107123
# Start the development server
108124
python server.py
109125

@@ -117,28 +133,28 @@ python -m http.server 8595
117133
2. Refresh your browser to see changes
118134
3. Submit a pull request with your improvements!
119135

120-
### Generating Screenshots
136+
### API Endpoints Used
121137

122-
To create a screenshot for documentation:
123-
124-
1. Open `mockup.html` in your browser
125-
2. Resize window to 1440px width
126-
3. Take a screenshot
127-
4. Save as `screenshot.png`
128-
129-
The mockup includes sample bookmarks tailored for self-hosting enthusiasts!
138+
KaraKeep HomeDash uses the following KaraKeep API endpoints:
139+
- `GET /api/lists` - Fetch all bookmark lists
140+
- `GET /api/bookmarks` - Fetch all bookmarks
130141

131142
## Troubleshooting
132143

133-
### "Could not find db.db"
134-
Make sure your KaraKeep database is in the correct location:
135-
- For Docker: Check your volume mount path in docker-compose.yml
136-
- For manual installation: Copy db.db to the project directory
144+
### "Invalid API key"
145+
- Check that your API key is correctly set in `config/config.json`
146+
- Ensure your KaraKeep instance is running and accessible
147+
- Verify the API key has proper permissions
137148

138149
### Bookmarks not showing
139-
- Verify your db.db file is from KaraKeep
150+
- Verify your KaraKeep instance URL is correct in the config
140151
- Check browser console for errors
141-
- Ensure the database contains bookmarks
152+
- Ensure you have bookmarks in your KaraKeep instance
153+
154+
### Connection errors
155+
- Check that KaraKeep is running and accessible at the configured URL
156+
- Ensure there are no firewall or network issues
157+
- If using Docker, make sure the containers can communicate
142158

143159
### Drag and drop not saving
144160
- The config directory must be writable
@@ -155,4 +171,4 @@ This project is licensed under the GNU V3 license - see the LICENSE file for det
155171
## Acknowledgments
156172

157173
- Built to complement the amazing [KaraKeep](https://github.com/karakeep-app/karakeep)
158-
- Uses [SQLite WASM](https://sqlite.org/wasm/doc/trunk/index.md) for browser-based database access
174+
- Uses the [KaraKeep API](https://docs.karakeep.app/API/karakeep-api) for data access

0 commit comments

Comments
 (0)