A modern Progressive Web App (PWA) showcasing Nate Atkins' digital art and space-themed creations.
- Progressive Web App - Install on any device like a native app
- Push Notifications - Real-time updates and portfolio notifications
- Responsive Design - Beautiful on desktop, tablet, and mobile
- Space Theme - Cosmic design with animated stars and gradients
- Service Worker - Offline functionality and fast loading
- Custom Icons - Dynamic space-themed app icons
- Next.js 15 - React framework with App Router
- TypeScript - Type-safe development
- Tailwind CSS - Utility-first styling
- Web Push API - Native push notifications
- Service Workers - Offline support and caching
- Installable - Users can install from any modern browser
- Offline Ready - Basic functionality works without internet
- Push Notifications - Engage users with updates
- App-like Experience - Runs in standalone window
- Cross-Platform - Works on iOS, Android, Windows, macOS
- Node.js 18+
- npm or pnpm
-
Clone the repository
git clone <your-repo-url> cd artist-portfolio
-
Install dependencies
npm install # or pnpm install -
Generate VAPID keys for push notifications
npx web-push generate-vapid-keys
-
Create environment variables Create
.env.localwith your VAPID keys:NEXT_PUBLIC_VAPID_PUBLIC_KEY=your_public_key_here VAPID_PRIVATE_KEY=your_private_key_here
-
Run development server
npm run dev # or for PWA testing with HTTPS: npm run dev -- --experimental-https
-
Push to GitHub
git add . git commit -m "Add PWA functionality" git push origin main
-
Deploy to Vercel
- Connect your GitHub repository to Vercel
- Add environment variables in Vercel dashboard
- Deploy automatically on push
-
Configure Environment Variables In Vercel dashboard, add:
NEXT_PUBLIC_VAPID_PUBLIC_KEYVAPID_PRIVATE_KEY
The app works on any platform that supports Node.js:
- Netlify
- Railway
- DigitalOcean App Platform
- AWS Amplify
Desktop (Chrome/Edge):
- Visit the site
- Click the install icon in the address bar
- Or: Menu → "Install [App Name]"
Mobile (Android):
- Visit the site in Chrome
- Tap "Add to Home Screen" banner
Mobile (iOS Safari):
- Visit the site
- Tap the share button
- Select "Add to Home Screen"
From Code:
import { sendNotification } from '@/app/actions'
await sendNotification("New artwork uploaded!")Via API:
curl -X POST https://your-domain.com/api/send-notification \
-H "Content-Type: application/json" \
-d '{"message": "Portfolio updated!"}'- New portfolio uploads
- Contact form submissions
- Milestone celebrations
- Blog post notifications
Icons are dynamically generated using Next.js. Customize in:
app/icon.tsx- Favicon (32x32)app/icon-192/route.tsx- PWA icon (192x192)app/icon-512/route.tsx- PWA icon (512x512)app/apple-icon.tsx- iOS icon
PWA settings in app/manifest.ts:
- App name and description
- Theme colors
- Display mode
- Orientation
Caching and offline behavior in public/sw.js
- HTTPS required for PWA features
- VAPID keys for authenticated push notifications
- Content Security Policy headers
- Service worker security headers
├── app/
│ ├── components/
│ │ └── pwa-components.tsx # PWA functionality
│ ├── api/
│ │ └── send-notification/ # API endpoint
│ ├── actions.ts # Server actions
│ ├── manifest.ts # PWA manifest
│ ├── icon*.tsx # Dynamic icons
│ └── layout.tsx # Root layout
├── public/
│ └── sw.js # Service worker
└── PWA_SETUP.md # Detailed setup guide
Notifications not working:
- Ensure HTTPS is enabled
- Check VAPID keys are correct
- Verify browser permissions
PWA not installable:
- Manifest must be accessible
- Icons must load correctly
- Service worker must be registered
Service worker errors:
- Check browser console
- Verify
/sw.jsis accessible - Ensure proper Content-Type headers
For local PWA testing:
npm run dev -- --experimental-httpsMIT License - feel free to use for your own portfolio!
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
Built with ❤️ by Nate Atkins
Currently on Earth, excited to explore the stars 🌟