No description
| assets | ||
| data | ||
| scripts | ||
| src | ||
| styles | ||
| .gitignore | ||
| admin.html | ||
| deploy-config.js | ||
| deploy.js | ||
| DEPLOY_SETUP.md | ||
| index.html | ||
| kill-server.js | ||
| package.json | ||
| product-catalog.html | ||
| product-detail.html | ||
| README.md | ||
| setup-deploy.js | ||
| start-server.js | ||
| tailwind.config.js | ||
| WORKFLOW.md | ||
KHY Admin Dashboard
A preview/staging environment for managing KHY Furniture's product catalog with safe testing and one-click deployment to production.
Features
- Add Products: Create new products with full details
- Edit Products: Modify existing product information
- Delete Products: Remove products with confirmation
- Preview Products: See how products will look before saving
- Export JSON: Download updated products.json file
- Live Preview: See exactly how changes will look on the website
- One-Click Deploy: Deploy changes to production with a single command
- Automatic Backups: Safe deployment with backup system
- No Technical Knowledge Required: Simple form-based interface
Quick Start
-
Setup deploy paths (first time only):
npm run setup # Follow the prompts to configure where your main KHY website is located -
Open the dashboard:
# Option 1: Double-click admin.html in your file explorer # Option 2: Run a local server npm start # Then open http://localhost:8080/admin.html -
Preview the website (optional):
# Option A: Auto-start server and open all preview pages npm run preview # Option B: Start server manually npm start # Then open http://localhost:8080/index.html (homepage) # Open http://localhost:8080/product-catalog.html (catalog) # Open http://localhost:8080/product-detail.html (product details) -
Manage products:
- Add new products using the form
- Edit existing products by clicking "Edit"
- Delete products by clicking "Delete"
- Preview changes before saving
-
Deploy to production:
# Option A: Automated deploy (recommended) npm run deploy # This copies admin/data/products.json → main website data/products.json # And copies admin/assets/images/ → main website assets/images/ # Option B: Manual deploy # Click "Download products.json" and replace in main website
Complete Workflow
- Make Changes → Use admin dashboard to add/edit/delete products
- Preview Changes → Open
index.html,product-catalog.html,product-detail.htmlto see how changes look - Confirm Changes → Review everything thoroughly
- Deploy to Production → Run
npm run deployto copy updated files to the main KHY website
Detailed Workflow: See WORKFLOW.md for complete instructions
File Structure
admin/
├── admin.html # Main admin dashboard
├── index.html # Homepage (reference)
├── product-catalog.html # Product catalog page (reference)
├── product-detail.html # Product detail page (reference)
├── data/
│ └── products.json # Product data file
├── assets/ # Images and resources
├── scripts/ # JavaScript files
├── styles/ # CSS files
├── src/ # Source files
├── tailwind.config.js # Tailwind configuration
├── deploy.js # Deploy script
├── start-server.js # Auto-start server script
├── package.json # Project configuration
├── README.md # This file
└── WORKFLOW.md # Detailed workflow guide
Usage Instructions
Adding a New Product
- Fill out the product form with:
- Product name and description
- Category selection
- Price and model number
- Available sizes and colors
- Stock status and rating
- Click "Preview Product" to see how it looks
- Click "Add Product" to save
Editing a Product
- Click "Edit" on any product in the list
- The form will auto-fill with existing data
- Make your changes
- Click "Preview Product" to see changes
- Click "Update Product" to save or "Cancel Edit" to abort
Deleting a Product
- Click "Delete" on any product
- Confirm the deletion in the popup
- Product is removed immediately
Exporting Changes
- After making all your changes
- Click "Download products.json"
- Replace the existing
data/products.jsonfile in your main website - Your website will show the updated products
Technical Notes
- No server required: Works entirely in the browser
- No database needed: Uses JSON file storage
- Cross-platform: Works on Windows, Mac, Linux
- Offline capable: Works without internet connection
- Simple deployment: Just copy files to any web server
Support
For technical support or questions about the admin dashboard, contact your development team.
Version History
- v1.0.0: Initial release with full CRUD functionality