UNPKG

progresspulse-pwa

Version:

A modern PWA for tracking progress and achieving goals with iPhone-style design

305 lines (244 loc) • 7.44 kB
#!/usr/bin/env node const { execSync } = require('child_process'); const fs = require('fs'); const path = require('path'); console.log('šŸš€ Setting up GitHub repository and Vercel deployment...\n'); // Check if git is installed try { execSync('git --version', { stdio: 'ignore' }); } catch (error) { console.log('āŒ Git is not installed. Please install Git first.'); console.log(' Download from: https://git-scm.com/download/windows'); process.exit(1); } // Initialize git repository console.log('šŸ“ Initializing Git repository...'); try { execSync('git init', { stdio: 'inherit' }); console.log('āœ… Git repository initialized'); } catch (error) { console.log('āš ļø Git already initialized or error occurred'); } // Create .gitignore for the project const gitignore = ` # Dependencies node_modules/ .pnpm-debug.log* # Build outputs dist/ build/ # Environment variables .env .env.local .env.development.local .env.test.local .env.production.local # IDE .vscode/ .idea/ *.swp *.swo # OS .DS_Store Thumbs.db # Logs logs *.log npm-debug.log* yarn-debug.log* yarn-error.log* # Runtime data pids *.pid *.seed *.pid.lock # Coverage directory used by tools like istanbul coverage/ # Dependency directories jspm_packages/ # Optional npm cache directory .npm # Optional REPL history .node_repl_history # Output of 'npm pack' *.tgz # Yarn Integrity file .yarn-integrity # parcel-bundler cache (https://parceljs.org/) .cache .parcel-cache # next.js build output .next # nuxt.js build output .nuxt # vuepress build output .vuepress/dist # Serverless directories .serverless # FuseBox cache .fusebox/ # DynamoDB Local files .dynamodb/ # Firebase .firebase/ firebase-debug.log # Vercel .vercel `; fs.writeFileSync('.gitignore', gitignore.trim()); console.log('āœ… Created .gitignore file'); // Create vercel.json for proper deployment const vercelConfig = { "buildCommand": "npm run build", "outputDirectory": "dist", "installCommand": "npm install", "framework": null, "rewrites": [ { "source": "/(.*)", "destination": "/index.html" } ], "headers": [ { "source": "/sw.js", "headers": [ { "key": "Cache-Control", "value": "no-cache, no-store, must-revalidate" } ] }, { "source": "/sw-notifications.js", "headers": [ { "key": "Cache-Control", "value": "no-cache, no-store, must-revalidate" } ] }, { "source": "/update-manifest.json", "headers": [ { "key": "Cache-Control", "value": "no-cache, no-store, must-revalidate" } ] }, { "source": "/version.json", "headers": [ { "key": "Cache-Control", "value": "no-cache, no-store, must-revalidate" } ] } ] }; fs.writeFileSync('vercel.json', JSON.stringify(vercelConfig, null, 2)); console.log('āœ… Created vercel.json configuration'); // Create README for GitHub const readme = `# šŸ“± ProgressPulse PWA A modern Progressive Web App for tracking progress and achieving goals with iPhone-style design. ## šŸš€ Features - šŸ“Š **Progress Tracking** - Visual progress charts and analytics - šŸŽÆ **Goal Management** - Create and track personal goals - šŸ”” **Smart Notifications** - Daily reminders and update alerts - šŸ“± **PWA Support** - Install as native app on any device - šŸŒ™ **Dark Mode** - Beautiful dark/light theme switching - šŸ“ˆ **Analytics** - Detailed progress insights and reports - šŸ† **Achievements** - Unlock achievements as you progress - šŸ“„ **PDF Export** - Export progress reports and certificates ## šŸ› ļø Tech Stack - **Frontend**: React 18 + TypeScript + Vite - **Styling**: Tailwind CSS + Framer Motion - **State**: Zustand + React Hook Form - **Charts**: Recharts + D3 - **PWA**: Workbox + Web Push API - **Database**: IndexedDB + Firebase (optional) ## šŸš€ Live Demo Visit: [https://progresspulse-pwa.vercel.app](https://progresspulse-pwa.vercel.app) ## šŸ“± Install as App ### On Mobile: 1. Open the website in your browser 2. Tap "Add to Home Screen" when prompted 3. Enjoy the native app experience! ### On Desktop: 1. Look for the install icon in your browser's address bar 2. Click "Install ProgressPulse" 3. Use it like a desktop application! ## šŸ”” Notifications - **Daily Reminders**: Get motivated with daily progress reminders - **Update Alerts**: Automatic notifications when new features are available - **Achievement Unlocks**: Celebrate your milestones ## šŸ—ļø Development \`\`\`bash # Install dependencies npm install # Start development server npm run dev # Build for production npm run build # Preview production build npm run preview \`\`\` ## šŸ“¦ Deployment This app is automatically deployed to Vercel on every push to main branch. ## šŸ¤ Contributing 1. Fork the repository 2. Create your feature branch (\`git checkout -b feature/amazing-feature\`) 3. Commit your changes (\`git commit -m 'Add amazing feature'\`) 4. Push to the branch (\`git push origin feature/amazing-feature\`) 5. Open a Pull Request ## šŸ“„ License This project is licensed under the MIT License. ## šŸ™ Acknowledgments - Built with ā¤ļø using modern web technologies - Inspired by iOS design principles - PWA best practices implemented throughout --- **Start tracking your progress today! šŸš€** `; fs.writeFileSync('README.md', readme); console.log('āœ… Created README.md'); // Add all files to git console.log('\nšŸ“¦ Adding files to Git...'); try { execSync('git add .', { stdio: 'inherit' }); console.log('āœ… Files added to Git'); } catch (error) { console.log('āŒ Error adding files to Git:', error.message); } // Create initial commit console.log('\nšŸ’¾ Creating initial commit...'); try { execSync('git commit -m "šŸš€ Initial commit - ProgressPulse PWA v1.0.9"', { stdio: 'inherit' }); console.log('āœ… Initial commit created'); } catch (error) { console.log('āŒ Error creating commit:', error.message); } console.log('\nšŸŽ‰ Repository setup complete!'); console.log('\nšŸ“‹ Next Steps:'); console.log('1. Create a new repository on GitHub:'); console.log(' - Go to: https://github.com/new'); console.log(' - Repository name: progresspulse-pwa'); console.log(' - Make it public'); console.log(' - Don\'t initialize with README (we already have one)'); console.log(''); console.log('2. Connect your local repo to GitHub:'); console.log(' git remote add origin https://github.com/YOUR_USERNAME/progresspulse-pwa.git'); console.log(' git branch -M main'); console.log(' git push -u origin main'); console.log(''); console.log('3. Deploy to Vercel:'); console.log(' - Go to: https://vercel.com/new'); console.log(' - Import your GitHub repository'); console.log(' - Vercel will auto-detect settings from vercel.json'); console.log(' - Click Deploy!'); console.log(''); console.log('4. Your app will be live at: https://progresspulse-pwa.vercel.app'); console.log(''); console.log('šŸ”” After deployment, users will automatically get update notifications!');