Skip to content

Feature/hosted mode and templates#18

Merged
David-Dohyun-Im merged 2 commits intomainfrom
feature/hosted-mode-and-templates
Nov 6, 2025
Merged

Feature/hosted mode and templates#18
David-Dohyun-Im merged 2 commits intomainfrom
feature/hosted-mode-and-templates

Conversation

@iamrootone
Copy link
Copy Markdown
Contributor

feat: Add hosted mode build and widget templates

Major Changes

1. Hosted Mode Build System

  • Change default build mode from inline to hosted
  • Hosted mode: External CSS/JS references via asset server
  • Inline mode: Self-contained HTML (legacy, opt-in via MODE=inline)
  • Add static asset server on port 4444 for dev mode
  • Support BASE_URL environment variable for custom asset URLs

2. Widget Template System

  • Add 3 widget templates: list, carousel, albums
  1. List template: Vertical list with items
  2. Carousel template: Horizontal scrolling cards with navigation
  3. Albums template: Photo gallery with fullscreen viewer
  • Auto-install template dependencies (Tailwind CSS, embla-carousel, etc.)

3. CLI Improvements

  • Add template shorthand flags: --list, --carousel, --albums
  • Auto-detect and install template-specific dependencies
  • Improve dependency management in package.json

4. Build Script Enhancements

  • Auto-detect Tailwind CSS and integrate with Vite
  • Generate appropriate HTML based on build mode
  • Unified build script for both modes

Readme: Add widget templates usage guide

  • Document template options (--list, --carousel, --albums)
  • Add brief descriptions for each template type

iamrootone and others added 2 commits November 6, 2025 20:24
## Major Changes

### 1. Hosted Mode Build System
- Change default build mode from inline to hosted
- Hosted mode: External CSS/JS references via asset server
- Inline mode: Self-contained HTML (legacy, opt-in via MODE=inline)
- Add static asset server on port 4444 for dev mode
- Support BASE_URL environment variable for custom asset URLs

### 2. Widget Template System
- Add 4 widget templates: default, list, carousel, albums
- Templates use domain-neutral naming (cards, info instead of places, location)
- Auto-install template dependencies (Tailwind CSS, embla-carousel, etc.)
- Carousel template: Horizontal scrolling cards with navigation
- List template: Ranked list with thumbnails and ratings
- Albums template: Photo gallery with fullscreen viewer

### 3. CLI Improvements
- Add --template option to 'fastapps create' command
- Auto-detect and install template-specific dependencies
- Improve dependency management in package.json

### 4. Build Script Enhancements
- Auto-detect Tailwind CSS and integrate with Vite
- Support global CSS (widgets/index.css) and per-widget CSS
- Generate appropriate HTML based on build mode
- Unified build script for both modes

## Breaking Changes
- Default build mode changed to hosted (use MODE=inline for old behavior)
- Dev server now requires asset server on port 4444

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Document template options (--list, --carousel, --albums)
- Add brief descriptions for each template type
- Keep documentation concise and clear

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@David-Dohyun-Im David-Dohyun-Im merged commit 3a811e7 into main Nov 6, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants