This repository contains the code for a mobile-friendly version of the WorkCafe website, a platform for finding cafes suitable for remote work.
/
├── index.html # Main HTML file
├── css/
│ └── main.css # Main stylesheet with responsive design
├── js/
│ └── main.js # Main JavaScript file for interactive features
├── service-worker.js # Service worker for offline functionality
├── manifest.json # Web app manifest for PWA features
├── images/ # Image assets
│ ├── logo.png
│ ├── placeholder.jpg
│ ├── cafe1-large.jpg
│ └── ...
└── icons/ # Icons for PWA
├── favicon-32x32.png
├── apple-touch-icon.png
├── icon-192x192.png
├── icon-512x512.png
├── nearby.png
└── saved.png
- Mobile-first approach with fluid layouts
- CSS media queries for different screen sizes
- Responsive typography and images
- Flexible containers and grid system
- Hamburger menu for navigation on mobile
- Bottom navigation for key actions
- Floating action button (FAB) for primary actions
- Card-based UI optimized for touch interfaces
- Horizontal scrolling for categories
- Service worker for offline functionality
- Web app manifest for add-to-home-screen
- Caching of important assets
- Push notification support
- Geolocation for finding nearby cafes
- Check-in feature for users at cafes
- Mobile notifications for important updates
- Lazy loading for performance optimization
- Image optimization with responsive images
- Lazy loading of images and components
- Efficient handling of touch events
- Optimized rendering with IntersectionObserver
- Clone this repository to your local machine
- Set up a local development server (like Live Server for VS Code)
- Make sure to serve with HTTPS for testing service workers and geolocation
Create the following folders in your project root:
/css- For stylesheets/js- For JavaScript files/images- For image assets/icons- For PWA icons and favicon
For proper testing:
- Use Chrome DevTools Device Mode for initial testing
- Test on real devices (both iOS and Android)
- Use BrowserStack or similar for comprehensive cross-device testing
- Test with various connection speeds (throttling)
- Use Lighthouse for performance audits
- Monitor Core Web Vitals (LCP, FID, CLS)
- Test loading times on various devices and connection speeds
- Integrate with your backend API for dynamic data
- Implement user authentication and profiles
- Add additional mobile-specific features like:
- Swipe gestures for cafe cards
- Pull-to-refresh for updating content
- Haptic feedback for important actions
- Enhance offline capabilities for better user experience
The code is designed to work on:
- Latest versions of Chrome, Firefox, Safari, and Edge
- iOS Safari 13+
- Android Chrome 80+
Fallbacks are provided for older browsers where necessary.