A modern, responsive portfolio website showcasing web development and design projects.
- Frontend: Vanilla JavaScript, HTML5, CSS3
- Backend: Node.js with Express.js
- Deployment: Static hosting with server-side components
- Content Management: JSON-based with API endpoints
- Interactive Design: Dynamic lines animation and modern UI
- Project Showcase: Comprehensive portfolio with categorized projects
- Responsive Layout: Mobile-first design approach
- Performance Optimized: Optimized images and assets
- Content Management: Server-side menu editing system
- Dynamic Navigation: JSON-driven menu system
- Node.js 16+ - Download here
- Git - Download here
git clone <repository-url>
cd K6_MINIMALnpm installCreate a .env file in the root directory if you need custom configuration:
# Optional: Server port (default: 8000)
PORT=8000
# Optional: Node environment
NODE_ENV=developmentnpm run dev- Open http://localhost:8000
- The site will auto-reload on changes
npm start # Start production server
npm run dev # Start development server with auto-reload
npm run build # Build project (runs image optimization)
npm run optimize-images # Optimize project images
npm run test-optimization # Test image optimization process
npm run deploy # Build and deploy to production- Make changes to HTML, CSS, or JavaScript files
- Test changes in browser (auto-reload enabled)
- Optimize images when adding new project tiles
- Update menu data via edit.html interface
- Commit changes with descriptive messages
- Use ES6+ features
- Prefer
constandletovervar - Use meaningful variable and function names
- Add JSDoc comments for complex functions
- Keep functions small and focused
- Use semantic HTML elements
- Include proper ARIA labels for accessibility
- Maintain consistent indentation
- Add alt text to all images
- Use CSS custom properties for theming
- Follow BEM methodology for class naming
- Keep selectors specific but not overly complex
- Use flexbox/grid for layouts
The site uses a JSON-driven menu system located in data/menu.json. Each menu item can have:
label: Display nameicon: SVG icon filenameurl: Link URLsubmenu: Array of sub-itemscategoryDescription: Category descriptionmore: Boolean to show "more..." link
The site includes a content management system with:
- Authentication: Secure login via
edit.html - Real-time editing: In-place content editing with Quill editor
- Cache management: Intelligent caching with version control
- Data synchronization: Automatic sync between browser cache and server
- Add project images to
project_tiles/directory - Optimize images using
npm run optimize-images - Update menu.json via edit.html interface
- Add project details including:
- Project title and description
- Role and technology used
- Budget range and design partner
- Project URL and cover image
The project includes automated image optimization using Sharp:
- Local processing: No external API required
- WebP conversion: Converts images to modern WebP format
- Quality preservation: Maintains 85% quality setting
- Supported formats: PNG, JPG, JPEG
# Run image optimization
npm run optimize-imagesIf you experience data synchronization problems:
-
Clear Browser Cache
- Click the ποΈ button in the edit banner
- Or manually clear localStorage in browser dev tools
-
Refresh from Server
- Click the π button in the edit banner
- This forces a fresh download from the server
-
Check Data Sources
- Browser cache:
menu_json_cache - Edit cache:
menu_json_edits - Server file:
data/menu.json
- Browser cache:
"Changes not appearing after save"
- Clear cache and refresh page
- Check browser console for errors
- Verify server response in Network tab
"Old data showing instead of new"
- Use refresh cache button (π)
- Check if multiple browser tabs are open
- Clear all caches and reload
"Edit mode not working"
- Verify authentication is active
- Check if edit banner is visible
- Ensure you're logged in via
edit.html
- Initial Load: Server β Browser Cache β Page Display
- CMS Edit: Page β Edit Cache β Server Save β Clear Caches
- Page Refresh: Server β Fresh Cache β Updated Display
// In browser console (when logged in):
// Clear all caches
localStorage.clear();
// Refresh from server
window.menuDataManager.refreshFromServer();
// Check current data source
console.log(window.menuDataManager.getCurrentData());-
Build the project
npm run build
-
Upload files to server
- Upload all files except
node_modules/ - Ensure
server.jsis in the root directory
- Upload all files except
-
Install production dependencies
npm install --production
-
Configure environment variables (if needed)
- Set up optional environment variables on your hosting platform (PORT, NODE_ENV)
-
Start the server
npm start
-
Install Vercel CLI
npm i -g vercel
-
Deploy
vercel
-
Configure environment variables
- Go to Vercel dashboard
- Add environment variables in project settings
-
Create netlify.toml
[build] command = "npm run build" publish = "." [[redirects]] from = "/api/*" to = "/.netlify/functions/api/:splat" status = 200
-
Deploy via Git
- Connect your repository to Netlify
- Configure environment variables in Netlify dashboard
-
Connect repository
- Connect your Git repository to Railway
-
Configure environment variables
- Add environment variables in Railway dashboard
-
Deploy
- Railway will automatically deploy on push to main branch
-
Install Certbot
sudo apt-get install certbot
-
Obtain certificate
sudo certbot certonly --webroot -w /var/www/html -d yourdomain.com
-
Configure Nginx
server { listen 443 ssl; server_name yourdomain.com; ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem; location / { proxy_pass http://localhost:8000; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } }
Currently, this site is primarily static with no active API endpoints. All routing is handled via Express.js server-side routing for pretty URLs.
- Security headers prevent XSS and clickjacking
- Request size limits prevent abuse
- Static file serving with appropriate cache headers
- Image Optimization: Automated WebP conversion with Sharp
- Static Asset Serving: Optimized delivery of CSS/JS/images
- Responsive Images: Multiple formats and sizes
- Browser Caching: Appropriate cache headers via Vercel CDN
- Set up uptime monitoring (UptimeRobot, Pingdom) for main domain
- Monitor Vercel deployment logs
- Monitor server logs for errors via Vercel dashboard
- Review site analytics and performance metrics
-
Pull latest changes
git pull origin main
-
Install dependencies
npm install
-
Restart server
npm start
-
Port already in use
- Change PORT in .env file
- Kill existing process:
lsof -ti:8000 | xargs kill(Mac/Linux) ornetstat -ano | findstr :8000(Windows)
-
Image optimization failing
- Ensure Sharp is installed:
npm install sharp - Check file permissions on image directories
- Verify sufficient disk space
- Ensure Sharp is installed:
For issues, check:
- Server logs
- Environment variable configuration
- Network connectivity
- File permissions
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature-name - Make your changes following code style guidelines
- Test thoroughly on multiple browsers and devices
- Commit with descriptive messages:
git commit -m "feat: add new feature" - Push and create pull request
- Content Management: Improve menu editing interface
- Performance: Optimize image loading, implement lazy loading
- Accessibility: Improve keyboard navigation, screen reader support
- User Experience: Add loading states, improve error handling
- SEO: Add structured data, improve meta tags
- Testing: Add unit tests, integration tests
- Automated checks must pass
- At least one approval from maintainers
- All conversations resolved
- Squash and merge when approved
K6_MINIMAL/
βββ assets/ # Site assets and icons
βββ css/ # Stylesheets
βββ data/ # JSON data files
βββ js/ # JavaScript files
βββ project_tiles/ # Project thumbnail images (optimized)
βββ scripts/ # Image optimization scripts
βββ server.js # Express.js server
βββ package.json # Node.js dependencies
βββ sitemap.xml # Search engine sitemap
βββ robots.txt # Crawler guidance
βββ index.html # Main homepage
- Modern browsers (Chrome, Firefox, Safari, Edge)
- Mobile-responsive design
- Progressive enhancement approach
This project is proprietary to Knectar.
For questions about this portfolio or technical issues, contact the development team.