2db9f83d2dac050e89009a52dbd112ffef9ceaf4
Major optimizations implemented: DATABASE: - Added 6 new composite indexes for products queries - Added slug index for blogposts and products - Added composite index for portfolio active + display order - ANALYZE all tables to update query planner statistics - VACUUM database for optimal performance FRONTEND API CACHING: - Created api-cache.js with intelligent caching system - Request deduplication for simultaneous calls - Custom TTL per endpoint (5-30 minutes) - Automatic cache cleanup every minute - Cache hit/miss logging for monitoring FRONTEND INTEGRATION: - Updated portfolio.html to use apiCache - Updated blog.html to use apiCache - Updated shop.html to use apiCache - Updated home.html to use apiCache - Updated product.html to use apiCache (2 endpoints) PERFORMANCE RESULTS: - API response times: 7-12ms (excellent) - Backend cache hit rates showing 0-41% improvement - All endpoints returning HTTP 200 - All pages loading in under 10ms TESTING: - Added test-api-performance.sh for continuous monitoring - Verified all 6 API endpoints functional - Verified all frontend pages loading correctly - Database indexes verified (30+ indexes active) No functionality changes - pure performance optimization.
Sky Art Shop
Your destination for creative stationery and art supplies.
Project Structure
SkyArtShop/
├── backend/ # Node.js/Express server code
├── website/ # Frontend HTML/CSS/JS files
│ ├── admin/ # Admin panel pages
│ ├── public/ # Public-facing pages
│ └── assets/ # CSS, JS, images
├── docs/ # Documentation and guides
├── scripts/ # Shell scripts and automation
├── config/ # Configuration files (nginx, pm2, etc.)
├── old-backups/ # Archived backups
└── old-docs/ # Archived documentation
## Quick Start
1. **Install Dependencies:**
```bash
cd backend && npm install
-
Configure Environment:
cp .env.example .env # Edit .env with your database credentials -
Start Development Server:
./scripts/dev-start.sh -
Access the Site:
- Public Site: http://localhost:5000
- Admin Panel: http://localhost:5000/admin/login.html
Key Documentation
Located in docs/ folder:
- QUICK_START.md - Get started quickly
- WORKFLOW.md - Development workflow guide
- SERVER_MANAGEMENT.md - Server deployment and management
- DEVELOPMENT_MODE.md - Running in development mode
- GIT-README.md - Git workflow and commands
Recent Fixes
- LOGOUT_CONFIRMATION_FIX.md - Logout confirmation dialog now works on all admin pages (December 19, 2025)
Useful Scripts
Located in scripts/ folder:
dev-start.sh- Start development serverdeploy-website.sh- Deploy to productionquick-status.sh- Check server statusmanage-server.sh- Server management utilities
Configuration Files
Located in config/ folder:
ecosystem.config.js- PM2 process configurationnginx-*.conf- Nginx configuration filesskyartshop.service- systemd service file
Tech Stack
- Backend: Node.js, Express
- Database: PostgreSQL
- Frontend: HTML5, CSS3, Vanilla JavaScript
- Process Manager: PM2
- Web Server: Nginx
Support
For questions or issues, check the documentation in the docs/ folder or contact support@skyartshop.com.
Description
Languages
HTML
40.8%
JavaScript
36.6%
CSS
17.2%
Shell
3%
EJS
1%
Other
1.4%