This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
SkyDeck is a slide deck creation and sharing platform built with Skykit. Users can create Notion-style block-based presentations about their projects and share them in a public gallery on The Skyscape.
# Run locally
go run .
# Build
go build -o skydeck .
# Run with Docker
docker build -t skydeck .
docker run -p 5000:5000 skydeck
skydeck/
├── main.go # Application entry point
├── controllers/
│ ├── decks.go # Deck CRUD, authentication
│ └── gallery.go # Public gallery and publishing
├── models/
│ ├── database.go # Database connection
│ ├── deck.go # Deck model with JSON content
│ └── session.go # User session management
└── views/
├── home.html # Public gallery landing
├── editor.html # Block editor UI
├── view.html # Read-only deck viewer
├── present.html # Fullscreen presentation mode
└── public/
└── scripts/
└── editor.js # Frontend block editor logic
| Concept | Location | Purpose |
|---|---|---|
| Deck | Database | Presentation stored as JSON slides/blocks |
| Slide | Deck JSON | Container for blocks |
| Block | Slide JSON | Content unit (heading, text, code, image, list, quote, divider) |
| Gallery | Public | Published decks with author attribution |
Editor & API:
| Route | Method | Handler | Purpose |
|---|---|---|---|
/ |
GET | home.html | Public gallery |
/editor |
GET | editor.html | New deck |
/editor/{id} |
GET | editor.html | Edit deck |
/deck/{id} |
GET | view.html | View published |
/deck/{id}/present |
GET | present.html | Slideshow mode |
/api/decks |
GET | listDecks | User's decks |
/api/decks |
POST | createDeck | Create new |
/api/decks/{id} |
GET | getDeck | Get content |
/api/decks/{id} |
PUT | updateDeck | Update |
/api/decks/{id} |
DELETE | deleteDeck | Delete |
Publishing:
| Route | Method | Handler | Purpose |
|---|---|---|---|
/api/decks/{id}/publish |
POST | publishDeck | Make public |
/api/decks/{id}/unpublish |
POST | unpublishDeck | Make private |
/api/gallery |
GET | listPublished | Gallery feed |
/api/gallery/{id}/fork |
POST | forkDeck | Copy deck |
Deck - Presentation stored in database:
type Deck struct {
skykit.Model
OwnerID string // User ID
OwnerName string // Cached for gallery
OwnerHandle string
OwnerAvatar string
Title string
Description string
Content string // JSON slides/blocks
CoverImage string
IsPublished bool
PublishedAt time.Time
ViewCount int
}
DeckContent - Parsed JSON structure:
type DeckContent struct {
Slides []Slide
Theme string // "dark" or "light"
AspectRatio string // "16:9" or "4:3"
}
type Slide struct {
ID string
Blocks []Block
}
type Block struct {
ID string
Type string // heading, text, code, image, list, quote, divider
Content string // For heading, text, code, quote
Level int // For heading (1-3)
Language string // For code
URL string // For image
Caption string // For image
Style string // For list (bullet, number)
Items []string // For list
Author string // For quote
}
editor.js handles:
Libraries:
| Variable | Required | Description |
|---|---|---|
PORT |
No | Server port (default: 5000) |
DB_NAME |
For replica | Database name |
DB_URL |
For replica | LibSQL primary URL |
DB_TOKEN |
For replica | Database JWT token |
APP_ID |
OAuth | OAuth client ID |
OAUTH_CLIENT_SECRET |
OAuth | OAuth client secret |
| Type | Properties | Description |
|---|---|---|
| heading | content, level (1-3) | Title text |
| text | content | Paragraph text |
| code | content, language | Code block with syntax highlighting |
| image | url, caption | Image with optional caption |
| list | style, items[] | Bullet or numbered list |
| quote | content, author | Blockquote with attribution |
| divider | (none) | Horizontal rule |
Add rich text formatting and block styling to editor
Pitch decks to help promote Skyscape Apps