A fully configurable PWA (Progressive Web App) platform that simulates a phone app drawer interface. Each app leads to a gift selection system with user tracking and analytics.
- Multi-View Application: App drawer → User form → Verification flow
- Direct Linking: Deep link to specific apps via URL parameters
- PWA Support: Add to home screen, offline support
- Analytics Tracking: User activity, device info, session tracking
- Configurable: JSON-based configuration for easy customization
- Custom Functions: Define custom verification behavior per app
- Clone the repository:
git clone https://github.com/MarvenAPPS/dynamic-app-platform.git
cd dynamic-app-platform-
Set up a web server with PHP support (Apache, Nginx, etc.)
-
Point your web server to the
public/directory -
Make sure the
data/directory is writable:
chmod 755 data/Edit data/config.json to customize:
- Site title and global settings
- App titles, icons, and descriptions
- Gift options for each app
- Custom verification functions
- Loading messages and error messages
-
Access the app: Navigate to
http://yourserver/public/index.html -
Direct linking: Use URL parameters to link directly to an app:
http://yourserver/public/index.html?app=1(opens App 1)http://yourserver/public/index.html?app=2(opens App 2)
-
Customize verification: Edit
public/custom-functions.jsto define what happens when users click "Verify"
dynamic-app-platform/
├── public/ # Web root directory
│ ├── index.html # Main application
│ ├── styles.css # Styling
│ ├── app.js # Core application logic
│ ├── analytics.js # Analytics tracking
│ ├── custom-functions.js # Custom verification functions
│ ├── manifest.json # PWA manifest
│ ├── service-worker.js # Service worker for PWA
│ └── api/ # API endpoints
│ ├── get-config.php # Fetch configuration
│ ├── save-config.php # Save configuration (admin)
│ └── track.php # Analytics tracking
├── data/ # Data directory
│ ├── config.json # Application configuration
│ └── logs/ # Analytics logs
├── assets/ # Static assets
│ ├── icons/ # PWA icons
│ ├── images/ # Images
│ └── fonts/ # Custom fonts
├── PROJECT_PLAN.md # Detailed project plan
└── README.md # This file
Edit data/config.json and modify the apps array:
{
"id": 1,
"enabled": true,
"title": "Your App Name",
"icon": "🎁",
"usernameLabel": "Enter your username",
"gifts": [
{
"id": "gift1",
"label": "Gift Name",
"icon": "💎",
"value": "gift_value"
}
]
}Edit public/custom-functions.js:
function app1Verify(username, giftValue) {
// Your custom logic here
window.open(`https://example.com/verify?user=${username}`, '_blank');
}Analytics are automatically tracked and stored in data/logs/analytics-YYYY-MM-DD.log
Tracked events:
- Page loads
- App selections
- Form submissions
- Verification clicks
- Session data
Before deploying to production:
- Change default admin credentials in
public/auth.php - Implement password hashing: Use
password_hash()andpassword_verify() - Add rate limiting: Protect against brute-force attacks
- Enable HTTPS: Required for PWA and secure communications
- Restrict data directory: Ensure
data/is NOT publicly accessible - Review custom functions: Validate all user inputs in custom verification functions
- Update CSP headers: Configure Content Security Policy for your domain
- Regular updates: Keep PHP and dependencies updated
See PROJECT_PLAN.md for detailed security implementation guidance.
The current implementation includes:
- IP anonymization in analytics (GDPR compliance)
- Configuration validation before saving
- Protected sensitive directories via
.htaccess - Basic security headers
To enable PWA features:
-
Add your icons to
assets/icons/:icon-192.png(192x192px)icon-512.png(512x512px)
-
Update
manifest.jsonwith your app details -
Serve the app over HTTPS (required for PWA)
- Chrome/Edge 90+
- Firefox 88+
- Safari 14+
- Mobile browsers (iOS Safari, Chrome Android)
MIT License - Free to use and modify
MarvenAPPS - https://github.com/MarvenAPPS
For detailed implementation information, see PROJECT_PLAN.md