How berru-g/3dscrollanimator works
Project type and purpose
• this is a full-stack monolithic PHP web application with a no-code 3D scroll-animation builder on the front end (Three.js + vanilla JS/CSS/HTML) and a PHP+MySQL backend for user/project management, gamification, notifications, and payment integration.
Main components
A. Front-end client (Browser)
• Static landing page (index.html + style.css + scriptV2.js)
• App UI pages (PHP views: header.php, footer.php, dashboard.php, project.php, etc.)
• Three.js animation engine (V2script.js, cursor.js, scriptV2.js)
• Model assets (model3D/*.glb), images (img/), sounds (sounds/)
B. Backend application (PHP monolith)
• Controllers / endpoints: auth.php, register.php, login.php, search_ajax.php, mark_all_read.php, export_transactions.php, purchase_points.php, etc.
• Business logic classes: NotificationManager.php, PointsManager.php, RewardSystem.php
• Admin interfaces: admin.php, admin2.php, setup_beta_testers.php
• Debug utilities: debug.php, test-path.php
C. Data storage
• Relational database (MySQL) defined via database.sql
• File storage for user uploads (uploads/avatars)
D. External services and integrations
• Payment gateways: Stripe (via PHP), Solana Pay (web3/solana-payment.js, solana-payement-without-dependance.js)
• Crypto-price lookup service (web3/crypto-price-service.js)
• Third-party APIs for payment keys (Lemon API upcoming)
• CodePen export endpoint (frontend JavaScript packaging HTML/CSS/JS)
Relationships and data flows
1. User → Browser UI
2. Browser UI → PHP endpoints (over HTTP/S)
• Authentication, registration, project CRUD, points purchase, notifications, history
3. PHP application ↔ MySQL
• read/write user, project, transaction, notification, points tables
4. PHP application → File system
• store/retrieve avatars, exported packages, 3D models, logs
5. PHP application → External payment APIs
• initiate charges (Stripe REST API, Solana Pay RPC calls, future Lemon)
6. Browser UI (Three.js) loads 3D models and sync animations to scroll percentage
7. Export feature bundles UI + Three.js + assets into standalone package or CodePen
Architectural patterns and design principles
• MVC-style separation:
• Models (NotificationManager, PointsManager, RewardSystem)
• Views (PHP templates: header, footer, project builder)
• Controllers (auth.php, project.php, etc.)
• Monolithic deployment: single PHP server hosting both landing and app
• Layered design: Presentation → Business Logic → Data Access
• Gamification module (points/rewards) plugged into core user flows
• Extensible payment layer allowing multiple gateways (Stripe, Solana, future Lemon)
• “No-code” export module packaging front-end assets for external hosting