mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-11-02 18:17:11 +09:00
Add a Storage tab listing and managing Cloudflare's account-scoped storage primitives — R2 buckets, KV namespaces, and D1 databases. Management only (list/create/delete); the object/key/row data planes are out of scope. - CloudflareClient: r2/buckets, storage/kv/namespaces, d1/database list+create +delete. - CloudflareService: combined list_storage (each product fetched independently so a missing token scope degrades to a per-product error, not a dead tab), validated create/delete for each. R2 bucket names validated S3-style. - /api/v1/cloudflare/zones/:id/storage* routes (read any user; writes admin). - StoragePanel (three generic create/list/delete sections; R2 notes its S3-compatibility for future backup targeting); api methods; SCSS. No new tables — wiring an R2 bucket as an S3 backup backend (minting scoped R2 keys) is a deliberate follow-up, noted in the UI. Tests: aggregate listing + per-product error degradation, R2 name validation, create/delete, KV/D1 required-field guards (6). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
React Dashboard Template
A modern React dashboard application boilerplate built with Vite, featuring routing, charts, and a sidebar layout for building data-driven web interfaces.
Features
- React 18 with functional components and hooks
- Vite for fast development and building
- React Router for client-side routing
- Recharts for data visualization
- Lucide React for icons
- ESLint for code linting
- Responsive sidebar layout
- Dashboard page with sample components
Getting Started
Prerequisites
- Node.js 16+ and npm
Installation
- Clone or download this template
- Install dependencies:
npm install
Development
Start the development server:
npm run dev
The app will be available at http://localhost:41921.
Building for Production
Build the app for deployment:
npm run build
The output will be in the dist/ directory.
Preview Production Build
npm run preview
Project Structure
src/
├── App.jsx # Main app with routing
├── main.jsx # Entry point
├── index.css # Global styles
├── components/
│ └── Sidebar.jsx # Navigation sidebar
├── layouts/
│ └── DashboardLayout.jsx # Main layout wrapper
└── pages/
└── Dashboard.jsx # Main dashboard page
Customization
- Modify components in
src/components/ - Add new pages in
src/pages/ - Update routes in
App.jsx - Customize styles in
index.cssor component files
Environment Variables
Create a .env file in the root for environment variables:
VITE_API_URL=https://api.example.com
Access them in code via import.meta.env.VITE_API_URL.
Contributing
See the documentation files for AI agent permissions and guidelines.