@sandikodev/astro-deck
v0.4.1
Published
๐ Command deck for Astro - Admin hub with CMS, AI prompt generator, and more
Maintainers
Readme
๐ Astro Deck
Command deck for your Astro site
Admin hub with CMS integration, AI prompt generator, image optimizer, and more.
Installation
npm install @sandikodev/astro-deck
# or
pnpm add @sandikodev/astro-deck// astro.config.mjs
import { defineConfig } from 'astro/config';
import astroDeck from '@sandikodev/astro-deck';
export default defineConfig({
integrations: [astroDeck()]
});Features
๐ CMS Integration
Decap CMS integration for content management.
Setup:
pnpm add -D decap-serverAdd to package.json:
{
"scripts": {
"cms": "decap-server"
}
}Create public/admin/config.yml:
local_backend: true
backend:
name: git-gateway
branch: main
media_folder: "public/images"
public_folder: "/images"
collections:
- name: "posts"
label: "Posts"
folder: "src/content/posts"
create: true
fields:
- { label: "Title", name: "title", widget: "string" }
- { label: "Body", name: "body", widget: "markdown" }Run both servers:
pnpm dev # Terminal 1
pnpm cms # Terminal 2โจ AI Prompt Generator
Generate article prompts or full articles using AI.
Modes:
- Template mode: Generate prompts for Kiro CLI / ChatGPT / Claude
- AI mode: Direct generation with Gemini API
Setup Gemini:
- Get API key from Google AI Studio
- Go to
/admin/settings - Enter API key and save
๐ผ๏ธ Image Optimizer
Client-side image compression. No upload to server.
Features:
- Drag & drop interface
- Convert to WebP/JPEG/PNG
- Resize dimensions
- Quality control
- Instant download
โ๏ธ Settings
Configure API keys and preferences. Stored in browser localStorage (never sent to server).
Configuration
astroDeck({
cms: true, // Enable CMS (default: true)
promptGenerator: true, // Enable Prompt Generator (default: true)
basePath: '/admin' // Admin route path (default: '/admin')
})Routes
| Route | Description |
|-------|-------------|
| /admin | Hub dashboard |
| /admin/cms | Decap CMS interface |
| /admin/prompt | AI Prompt Generator |
| /admin/images | Image Optimizer |
| /admin/settings | API configuration |
Security
API keys are stored in browser localStorage:
โ
Never sent to your server
โ
Never committed to git
โ ๏ธ Accessible to browser extensions
Recommendations:
- Use dedicated browser profile for development
- Review installed extensions
- Rotate API keys periodically
See SECURITY.md for details.
Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
Ideas for new tools:
- SEO Checker
- Analytics Dashboard
- Link Checker
- Performance Audit
Roadmap
- [x] CMS Integration
- [x] AI Prompt Generator
- [x] Image Optimizer
- [x] Settings page
- [ ] SEO Checker
- [ ] Analytics Dashboard
- [ ] Plugin system for custom tools
License
MIT ยฉ Sandiko Dev
