-
Notifications
You must be signed in to change notification settings - Fork 12
6.1 Project Configuration
Relevant source files
The following files were used as context for generating this wiki page:
This document covers the core configuration files that define the AudioScape project structure, dependencies, build settings, and deployment pipeline. It includes the main package configuration, Expo app settings, and EAS build profiles.
For information about the build system and development tooling, see Build System and Tooling. For details about static assets and resources, see Assets and Resources.
The project is configured as a React Native Expo application with the main configuration defined in package.json. The application uses Expo Router for navigation and integrates with multiple external services for music streaming functionality.
The application is configured with the following basic settings:
| Property | Value | Purpose |
|---|---|---|
name |
"audioscape" | Package identifier |
main |
"expo-router/entry" | Entry point using Expo Router |
version |
"1.8.0" | Current application version |
private |
true | Prevents accidental npm publishing |
Sources: package.json:1-4, package.json:101
The project includes several npm scripts for different development and build scenarios:
graph TD
subgraph "Development Scripts"
start["start"]
android["android"]
lint["lint"]
doctor["doctor"]
end
subgraph "Build Scripts"
build["build"]
build_dev["build-dev"]
build_eas["build-eas"]
build_dev_eas["build-dev-eas"]
end
subgraph "Utility Scripts"
format["format"]
doc["doc"]
end
start --> expo_start["expo start"]
android --> expo_run["expo run:android"]
lint --> expo_lint["expo lint"]
doctor --> expo_doctor["npx expo-doctor@latest"]
build --> eas_local["eas build --platform android --profile preview --local"]
build_dev --> eas_local_dev["eas build --platform android --profile development --local"]
build_eas --> eas_cloud["eas build --platform android --profile preview"]
build_dev_eas --> eas_cloud_dev["eas build --platform android --profile development"]
format --> prettier["npx prettier@latest --write ."]
doc --> typedoc["typedoc"]
Development vs Production Build Pipeline
Sources: package.json:5-16
The Expo app configuration is managed through app.config.js, which exports dynamic configuration based on environment variables and build variants.
The configuration supports two build variants determined by the APP_VARIANT environment variable:
graph LR
subgraph "Environment Detection"
env_var["APP_VARIANT"]
is_dev["IS_DEV = process.env.APP_VARIANT === 'development'"]
end
subgraph "Development Variant"
dev_name["AudioScape (Dev)"]
dev_scheme["audioscape-dev"]
dev_package["com.ankushsarkar.audioscape.dev"]
end
subgraph "Production Variant"
prod_name["AudioScape"]
prod_scheme["audioscape"]
prod_package["com.ankushsarkar.audioscape"]
end
env_var --> is_dev
is_dev --> dev_name
is_dev --> dev_scheme
is_dev --> dev_package
is_dev --> prod_name
is_dev --> prod_scheme
is_dev --> prod_package
Environment-Based App Configuration
Sources: app.config.js:1-2, app.config.js:5, app.config.js:12, app.config.js:28-30
The application is configured exclusively for Android with specific permissions and visual assets:
| Configuration | Value | Purpose |
|---|---|---|
platforms |
["android"] | Android-only deployment |
orientation |
"portrait" | Fixed portrait orientation |
userInterfaceStyle |
"automatic" | System theme detection |
The app requires several Android permissions for music playback and file management:
-
READ_EXTERNAL_STORAGE- Access downloaded music files -
WRITE_EXTERNAL_STORAGE- Save downloaded content -
MANAGE_EXTERNAL_STORAGE- Enhanced file system access -
FOREGROUND_SERVICE- Background music playback
Sources: app.config.js:9-10, app.config.js:13, app.config.js:19-26
The application uses several Expo plugins for enhanced functionality:
graph TD
subgraph "Core Plugins"
router["expo-router"]
font["expo-font"]
end
subgraph "Notification System"
notifications["expo-notifications"]
notif_icon["./assets/images/notification-icon.png"]
notif_color["#d17603"]
end
subgraph "UI Enhancement"
edge_to_edge["react-native-edge-to-edge"]
android_theme["parentTheme: Default"]
nav_contrast["enforceNavigationBarContrast: false"]
end
router --> app_navigation["App Navigation System"]
font --> custom_fonts["Custom Font Loading"]
notifications --> notif_icon
notifications --> notif_color
notifications --> push_notifications["Push Notification Support"]
edge_to_edge --> android_theme
edge_to_edge --> nav_contrast
edge_to_edge --> fullscreen_ui["Fullscreen UI Experience"]
Plugin Configuration Architecture
Sources: app.config.js:37-56
The EAS (Expo Application Services) build configuration is defined in eas.json and supports multiple build profiles for different deployment scenarios.
The project defines three distinct build profiles:
graph TD
subgraph "Build Profiles"
development["development"]
preview["preview"]
production["production"]
end
subgraph "Development Profile"
dev_client["developmentClient: true"]
dev_dist["distribution: internal"]
dev_env["APP_VARIANT: development"]
end
subgraph "Preview Profile"
prev_client["developmentClient: false"]
prev_dist["distribution: internal"]
end
subgraph "Production Profile"
prod_increment["autoIncrement: true"]
end
development --> dev_client
development --> dev_dist
development --> dev_env
preview --> prev_client
preview --> prev_dist
production --> prod_increment
EAS Build Profile Configuration
The EAS CLI is configured with version requirements and app version management:
| Setting | Value | Purpose |
|---|---|---|
version |
">= 12.3.0" | Minimum EAS CLI version |
appVersionSource |
"remote" | Version management from EAS servers |
requireCommit |
false (commented) | Git commit requirement |
Sources: eas.json:2-6, eas.json:7-22
The project relies on several key dependency categories that enable its music streaming functionality:
graph LR
subgraph "Core Framework"
expo["expo: ~52.0.47"]
react["react: 18.3.1"]
rn["react-native: 0.76.9"]
expo_router["expo-router: ~4.0.21"]
end
subgraph "Navigation & UI"
rn_navigation["@react-navigation/native"]
rn_screens["react-native-screens"]
rn_gesture["react-native-gesture-handler"]
rn_paper["react-native-paper"]
end
subgraph "State Management"
redux_toolkit["@reduxjs/toolkit"]
react_redux["react-redux"]
mmkv["react-native-mmkv"]
end
expo --> react
expo --> rn
expo --> expo_router
expo_router --> rn_navigation
rn_navigation --> rn_screens
rn_screens --> rn_gesture
redux_toolkit --> react_redux
react_redux --> mmkv
Core Framework Dependencies
The application's music playback capabilities are provided by several specialized libraries:
| Dependency | Version | Purpose |
|---|---|---|
react-native-track-player |
^4.1.1 | Core audio playback engine |
expo-media-library |
~17.0.6 | Device media access |
expo-file-system |
~18.0.12 | File system operations |
lrclib-api |
^2.0.0 | Lyrics synchronization |
youtubei.js |
Custom fork | YouTube Music API integration |
graph TD
subgraph "YouTube Integration"
youtubei["youtubei.js (custom fork)"]
polyfills["URL/Web Streams Polyfills"]
end
subgraph "Firebase Services"
firebase["firebase: ^11.10.0"]
notifications["expo-notifications"]
end
subgraph "Lyrics Services"
lrclib["lrclib-api: ^2.0.0"]
end
subgraph "Network & Storage"
netinfo["@react-native-community/netinfo"]
mmkv_storage["react-native-mmkv"]
file_system["expo-file-system"]
end
youtubei --> polyfills
firebase --> notifications
youtubei --> music_streaming["Music Streaming"]
firebase --> remote_config["Remote Configuration"]
lrclib --> lyrics_sync["Synchronized Lyrics"]
netinfo --> connectivity["Network Monitoring"]
mmkv_storage --> fast_storage["Fast Local Storage"]
file_system --> downloads["Downloaded Music"]
External Service Integration Dependencies
Sources: package.json:17-63, package.json:40-42, package.json:50, package.json:56, package.json:62
The project includes comprehensive development tooling for code quality, documentation, and type safety:
| Tool | Version | Purpose |
|---|---|---|
typescript |
^5.7.3 | Type checking and development |
eslint |
^8.57.1 | Code linting and style enforcement |
eslint-config-expo |
~8.0.1 | Expo-specific ESLint rules |
typedoc |
^0.28.7 | Documentation generation |
The development environment includes Babel plugins and build configuration:
-
@babel/core- Core Babel transpilation -
@babel/plugin-syntax-import-attributes- Modern import syntax support -
babel-plugin-dotenv-import- Environment variable integration -
expo-atlas- Bundle analysis tool
Sources: package.json:64-80
The project includes custom configuration for Expo Doctor to exclude certain dependencies from compatibility checks:
Sources: package.json:81-100