How vannguyen799/musicapp-angularjs works
Main System Components
a) Client-Side (Frontend):
• AngularJS frontend application
• Audio Player component (referenced in view/audioPlayer.html)
• Redirect mechanism (shown by the redirect folder)
b) Server-Side (Backend):
• Google Apps Script backend (indicated by .clasp.json and appsscript.json)
• Google Sheets as database (indicated by sheet/SongFileManager.js)
Architectural Layers
a) View Layer:
• Audio Player Interface
• New Tab Interface
b) Controller Layer:
• MusicAppController
c) Service Layer:
• AuthService
• PlaylistService
• SongService
• UserService
d) Model Layer:
• SongInfo model
• Database abstraction
e) RPC Layer:
• JSONRPCServer for client-server communication
Data Flow Representation
• Client-server communication through JSON-RPC
• Data flow between services and Google Sheets
• User authentication flow
• Music streaming path
Specific Implementation Details
• Blue rectangles: Frontend components
• Green rectangles: Service layer components
• Yellow rectangles: Data storage (Google Sheets)
• Purple rectangles: Authentication components
• Orange rectangles: RPC communication layer
Component Relationships
Key interactions:
Client UI <-> JSONRPCServer <-> Services <-> SongFileManager <-> Google Sheets
AuthService <-> UserService
PlaylistService <-> SongService
Technical Specifications
A technical stack section showing:
• AngularJS (Frontend Framework)
• Google Apps Script (Backend Runtime)
• Google Sheets (Data Storage)
• HTML5 Audio (Player Implementation)
[Client Layer (AngularJS)]
• ↕
[RPC Communication Layer]
• ↕
[Service Layer]
• ↕
[Data Access Layer]
• ↕
[Google Sheets Storage]