Skip to content

Commit 743568f

Browse files
committed
revamp README with full API reference and updated schema
1 parent b187e87 commit 743568f

File tree

1 file changed

+60
-54
lines changed

1 file changed

+60
-54
lines changed

README.md

Lines changed: 60 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,45 @@
11
# openboot.dev
22

3-
> Website and API for [OpenBoot](https://github.com/openbootdotdev/openboot)
3+
> Website, dashboard, and API for [OpenBoot](https://github.com/openbootdotdev/openboot) — one-line macOS dev environment setup.
44
55
[![Deploy](https://github.com/openbootdotdev/openboot.dev/actions/workflows/deploy.yml/badge.svg)](https://github.com/openbootdotdev/openboot.dev/actions/workflows/deploy.yml)
66

7-
## Overview
7+
**Live at [openboot.dev](https://openboot.dev)**
88

9-
This repository contains the website and API for OpenBoot:
9+
## What This Repo Does
1010

11-
- **Landing page** at [openboot.dev](https://openboot.dev)
12-
- **Dashboard** for creating custom configurations
13-
- **Install script generator** for custom configs
14-
- **API** for config storage and retrieval
11+
- **Landing page** — product overview, presets, install commands
12+
- **Dashboard** — create, edit, duplicate, and share custom configs
13+
- **Install script API** — generates per-config install scripts for `curl | bash`
14+
- **Brewfile import** — parse and convert Brewfiles into OpenBoot configs
15+
- **Homebrew search** — live package search from the dashboard
16+
- **CLI auth** — device flow for authenticating the CLI via browser
17+
- **Snapshot API** — receive and store machine snapshots from the CLI
1518

1619
## Tech Stack
1720

18-
- **Framework**: [SvelteKit 5](https://svelte.dev/) with TypeScript
19-
- **Styling**: CSS Variables (dark/light theme)
20-
- **Auth**: GitHub OAuth
21-
- **Database**: Cloudflare D1 (SQLite)
22-
- **Hosting**: Cloudflare Workers
21+
| Layer | Technology |
22+
|-------|-----------|
23+
| Framework | [SvelteKit 5](https://svelte.dev/) + TypeScript |
24+
| Styling | CSS variables (dark/light theme) |
25+
| Auth | GitHub OAuth |
26+
| Database | Cloudflare D1 (SQLite) |
27+
| Hosting | Cloudflare Workers + Pages |
2328

2429
## Development
2530

26-
### Prerequisites
27-
28-
- Node.js 20+
29-
- [Wrangler CLI](https://developers.cloudflare.com/workers/wrangler/)
30-
- Cloudflare account (for D1 database)
31-
32-
### Setup
33-
3431
```bash
35-
# Install dependencies
3632
npm install
3733

38-
# Create local D1 database
3934
wrangler d1 create openboot-local
40-
41-
# Run migrations
4235
wrangler d1 execute openboot-local --local --file=migrations/0001_init.sql
4336
wrangler d1 execute openboot-local --local --file=migrations/0002_add_alias.sql
4437
wrangler d1 execute openboot-local --local --file=migrations/0003_add_dotfiles_repo.sql
38+
wrangler d1 execute openboot-local --local --file=migrations/0004_add_snapshot_and_auth.sql
4539

46-
# Start dev server
4740
npm run dev
4841
```
4942

50-
### Environment Variables
51-
5243
Create a `.dev.vars` file:
5344

5445
```
@@ -58,37 +49,59 @@ GITHUB_CLIENT_SECRET=your_github_client_secret
5849

5950
## Deployment
6051

61-
Deployment is automatic on push to `main` via GitHub Actions.
62-
63-
Manual deploy:
52+
Automatic on push to `main` via GitHub Actions.
6453

6554
```bash
6655
npm run build
6756
wrangler deploy
6857
```
6958

70-
### Required Secrets
71-
72-
Set these in GitHub repository settings:
73-
74-
- `CLOUDFLARE_API_TOKEN`
75-
- `CLOUDFLARE_ACCOUNT_ID`
59+
GitHub repository secrets required: `CLOUDFLARE_API_TOKEN`, `CLOUDFLARE_ACCOUNT_ID`
7660

7761
## API Endpoints
7862

63+
### Install Scripts
64+
7965
| Endpoint | Description |
8066
|----------|-------------|
8167
| `GET /install` | Default install script |
82-
| `GET /:alias` | Install script for alias (e.g., `/fullstackjam`) |
83-
| `GET /:username/:slug/install` | Install script for config |
84-
| `GET /:username/:slug/config` | Config JSON |
68+
| `GET /:alias` | Install script for short alias |
69+
| `GET /:username/:slug/install` | Install script for specific config |
70+
| `GET /:username/:slug/config` | Config JSON for CLI consumption |
71+
72+
### Auth
73+
74+
| Endpoint | Description |
75+
|----------|-------------|
76+
| `GET /api/auth/login` | GitHub OAuth login redirect |
77+
| `GET /api/auth/callback` | GitHub OAuth callback |
78+
| `GET /api/auth/logout` | Clear session |
79+
| `POST /api/auth/cli/start` | Start CLI device auth flow |
80+
| `POST /api/auth/cli/approve` | Approve CLI auth request |
81+
| `GET /api/auth/cli/poll` | Poll CLI auth status |
82+
83+
### Configs
84+
85+
| Endpoint | Description |
86+
|----------|-------------|
8587
| `GET /api/user` | Current user info |
8688
| `GET /api/configs` | List user's configs |
89+
| `POST /api/configs` | Create config |
90+
| `GET /api/configs/:slug` | Get config by slug |
91+
| `PUT /api/configs/:slug` | Update config |
92+
| `DELETE /api/configs/:slug` | Delete config |
93+
| `POST /api/configs/from-snapshot` | Create config from CLI snapshot |
94+
95+
### Utilities
96+
97+
| Endpoint | Description |
98+
|----------|-------------|
99+
| `POST /api/brewfile/parse` | Parse Brewfile content into packages |
100+
| `GET /api/homebrew/search?q=` | Search Homebrew packages |
87101

88102
## Database Schema
89103

90104
```sql
91-
-- users
92105
CREATE TABLE users (
93106
id TEXT PRIMARY KEY,
94107
github_id TEXT UNIQUE,
@@ -98,35 +111,28 @@ CREATE TABLE users (
98111
created_at TEXT
99112
);
100113

101-
-- configs
102114
CREATE TABLE configs (
103115
id TEXT PRIMARY KEY,
104116
user_id TEXT,
105117
slug TEXT,
106118
name TEXT,
107-
packages TEXT, -- JSON array
119+
description TEXT,
120+
base_preset TEXT,
121+
packages TEXT,
108122
custom_script TEXT,
109123
dotfiles_repo TEXT,
124+
snapshot TEXT,
110125
alias TEXT UNIQUE,
111-
is_public INTEGER,
126+
is_public INTEGER DEFAULT 1,
112127
created_at TEXT,
113128
updated_at TEXT
114129
);
115130
```
116131

117-
## Project Structure
118-
119-
```
120-
openbootdotdev/
121-
├── openboot # CLI tool (Go)
122-
├── openboot.dev # This repo - Website (SvelteKit)
123-
└── dotfiles # Dotfiles template
124-
```
125-
126132
## Related
127133

128-
- [openboot](https://github.com/openbootdotdev/openboot) - CLI tool
129-
- [dotfiles](https://github.com/openbootdotdev/dotfiles) - Dotfiles template
134+
- [openboot](https://github.com/openbootdotdev/openboot) CLI tool (Go)
135+
- [dotfiles](https://github.com/openbootdotdev/dotfiles) Dotfiles template
130136

131137
## License
132138

0 commit comments

Comments
 (0)