diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bd4c41d --- /dev/null +++ b/.gitignore @@ -0,0 +1,16 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/app/build +/captures +.externalNativeBuild +.cxx +local.properties diff --git a/app/build.gradle.kts b/app/build.gradle.kts new file mode 100644 index 0000000..3acf127 --- /dev/null +++ b/app/build.gradle.kts @@ -0,0 +1,91 @@ +plugins { + id("com.android.application") + id("org.jetbrains.kotlin.android") + id("com.google.dagger.hilt.android") + id("com.google.devtools.ksp") + id("org.jetbrains.kotlin.plugin.serialization") +} + +android { + namespace = "com.soulstice.app" + compileSdk = 34 + + defaultConfig { + applicationId = "com.soulstice.app" + minSdk = 24 + targetSdk = 34 + versionCode = 1 + versionName = "1.0" + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + vectorDrawables { + useSupportLibrary = true + } + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_21 + targetCompatibility = JavaVersion.VERSION_21 + } + kotlinOptions { + jvmTarget = "21" + } + buildFeatures { + compose = true + } + composeOptions { + kotlinCompilerExtensionVersion = "1.5.10" + } + packaging { + resources { + excludes += "/META-INF/{AL2.0,LGPL2.1}" + } + } +} + +dependencies { + implementation("androidx.core:core-ktx:1.12.0") + implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.7.0") + implementation("androidx.activity:activity-compose:1.8.2") + implementation(platform("androidx.compose:compose-bom:2024.02.00")) + implementation("androidx.compose.ui:ui") + implementation("androidx.compose.ui:ui-graphics") + implementation("androidx.compose.ui:ui-tooling-preview") + implementation("androidx.compose.material3:material3") + implementation("androidx.compose.material:material-icons-extended") + implementation("com.google.android.material:material:1.11.0") + + // Hilt + implementation("com.google.dagger:hilt-android:2.50") + ksp("com.google.dagger:hilt-compiler:2.50") + implementation("androidx.hilt:hilt-navigation-compose:1.1.0") + + // Room + val roomVersion = "2.6.1" + implementation("androidx.room:room-runtime:$roomVersion") + implementation("androidx.room:room-ktx:$roomVersion") + ksp("androidx.room:room-compiler:$roomVersion") + + // Navigation + implementation("androidx.navigation:navigation-compose:2.7.7") + + // DataStore + implementation("androidx.datastore:datastore-preferences:1.0.0") + + // Serialization + implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3") + + // Testing + testImplementation("junit:junit:4.13.2") + androidTestImplementation("androidx.test.ext:junit:1.1.5") + androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") +} diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..15acceb --- /dev/null +++ b/app/src/main/AndroidManifest.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + diff --git a/app/src/main/kotlin/com/soulstice/app/MainActivity.kt b/app/src/main/kotlin/com/soulstice/app/MainActivity.kt new file mode 100644 index 0000000..5a202f4 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/MainActivity.kt @@ -0,0 +1,211 @@ +package com.soulstice.app + +import android.os.Bundle +import androidx.activity.ComponentActivity +import androidx.activity.compose.setContent +import androidx.compose.foundation.isSystemInDarkTheme +import androidx.compose.foundation.layout.* +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.* +import androidx.compose.material3.* +import androidx.compose.runtime.* +import kotlinx.coroutines.launch +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp +import androidx.compose.ui.graphics.vector.ImageVector +import androidx.navigation.NavDestination.Companion.hierarchy +import androidx.navigation.NavGraph.Companion.findStartDestination +import androidx.navigation.compose.NavHost +import androidx.navigation.compose.composable +import androidx.navigation.compose.currentBackStackEntryAsState +import androidx.navigation.compose.rememberNavController +import androidx.hilt.navigation.compose.hiltViewModel +import com.soulstice.app.ui.screens.* +import com.soulstice.app.ui.theme.* +import com.soulstice.app.ui.viewmodel.InboxViewModel +import com.soulstice.app.ui.viewmodel.MainViewModel +import com.soulstice.app.ui.viewmodel.TaskViewModel +import dagger.hilt.android.AndroidEntryPoint + +@AndroidEntryPoint +class MainActivity : ComponentActivity() { + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + setContent { + val viewModel: MainViewModel = hiltViewModel() + val theme by viewModel.theme.collectAsState(initial = "Light") + val isDark = when (theme) { + "Dark" -> true + "Light" -> false + else -> isSystemInDarkTheme() + } + SoulsticeTheme(darkTheme = isDark) { + MainScreen() + } + } + } +} + +sealed class Screen(val route: String, val label: String, val icon: ImageVector) { + object Dashboard : Screen("dashboard", "Cockpit", Icons.Default.Home) + object Inbox : Screen("inbox", "Inbox", Icons.Default.Inbox) + object Projects : Screen("projects", "Projects", Icons.Default.GridView) + object CreativeStudio : Screen("creative_studio", "Creative Studio", Icons.Default.Brush) + object BusinessHub : Screen("business_hub", "Business Hub", Icons.Default.BusinessCenter) + object KnowledgeBase : Screen("knowledge_base", "Knowledge Base", Icons.Default.MenuBook) + object Journal : Screen("journal", "Journal", Icons.Default.Edit) + object Habits : Screen("habits", "Habits", Icons.Default.AutoGraph) + object UserGuide : Screen("user_guide", "User Guide", Icons.Default.HelpCenter) + object Focus : Screen("focus", "Focus Timer", Icons.Default.Timer) + object Settings : Screen("settings", "Settings", Icons.Default.Settings) + object Review : Screen("review", "Daily Review", Icons.Default.AutoAwesome) + object ProjectDetail : Screen("project_detail/{projectId}", "Project Detail", Icons.Default.GridView) +} + +@OptIn(ExperimentalMaterial3Api::class) +@Composable +fun MainScreen( + taskViewModel: TaskViewModel = hiltViewModel(), + inboxViewModel: InboxViewModel = hiltViewModel() +) { + val navController = rememberNavController() + val drawerState = rememberDrawerState(initialValue = DrawerValue.Closed) + val scope = rememberCoroutineScope() + var showQuickCapture by remember { mutableStateOf(false) } + + val items = listOf( + Screen.Dashboard, + Screen.Inbox, + Screen.Projects, + Screen.CreativeStudio, + Screen.BusinessHub, + Screen.KnowledgeBase, + Screen.Journal, + Screen.Habits, + Screen.UserGuide, + Screen.Focus, + Screen.Settings, + Screen.Review + ) + + val navBackStackEntry by navController.currentBackStackEntryAsState() + val currentDestination = navBackStackEntry?.destination + + if (showQuickCapture) { + QuickCaptureDialog( + onDismiss = { showQuickCapture = false }, + onCapture = { text -> + inboxViewModel.addItem(text) + showQuickCapture = false + } + ) + } + + ModalNavigationDrawer( + drawerState = drawerState, + drawerContent = { + ModalDrawerSheet { + Spacer(modifier = Modifier.height(16.dp)) + Text( + "Soulstice", + modifier = Modifier.padding(horizontal = 28.dp, vertical = 16.dp), + style = MaterialTheme.typography.headlineMedium, + color = Taupe900 + ) + items.forEach { screen -> + NavigationDrawerItem( + icon = { Icon(screen.icon, contentDescription = null) }, + label = { Text(screen.label) }, + selected = currentDestination?.hierarchy?.any { it.route == screen.route } == true, + onClick = { + navController.navigate(screen.route) { + popUpTo(navController.graph.findStartDestination().id) { + saveState = true + } + launchSingleTop = true + restoreState = true + } + scope.launch { drawerState.close() } + }, + modifier = Modifier.padding(NavigationDrawerItemDefaults.ItemPadding) + ) + } + } + } + ) { + Scaffold( + floatingActionButton = { + FloatingActionButton( + onClick = { showQuickCapture = true }, + containerColor = Sage600, + contentColor = androidx.compose.ui.graphics.Color.White + ) { + Icon(Icons.Default.Add, contentDescription = "Quick Capture") + } + }, + topBar = { + CenterAlignedTopAppBar( + title = { Text("Soulstice") }, + navigationIcon = { + IconButton(onClick = { + scope.launch { drawerState.open() } + }) { + Icon(Icons.Default.Menu, contentDescription = "Menu") + } + } + ) + } + ) { innerPadding -> + NavHost(navController, startDestination = Screen.Dashboard.route, Modifier.padding(innerPadding)) { + composable(Screen.Dashboard.route) { DashboardScreen() } + composable(Screen.Inbox.route) { InboxScreen() } + composable(Screen.Projects.route) { + ProjectsScreen(onProjectClick = { projectId -> + navController.navigate("project_detail/$projectId") + }) + } + composable(Screen.ProjectDetail.route) { backStackEntry -> + val projectId = backStackEntry.arguments?.getString("projectId") ?: "" + ProjectDetailScreen(projectId = projectId) + } + composable(Screen.CreativeStudio.route) { CreativeStudioScreen() } + composable(Screen.BusinessHub.route) { BusinessHubScreen() } + composable(Screen.KnowledgeBase.route) { KnowledgeBaseScreen() } + composable(Screen.Journal.route) { JournalScreen() } + composable(Screen.Habits.route) { HabitsScreen() } + composable(Screen.UserGuide.route) { UserGuideScreen() } + composable(Screen.Focus.route) { FocusScreen() } + composable(Screen.Settings.route) { SettingsScreen() } + composable(Screen.Review.route) { ReviewScreen() } + } + } + } +} + +@Composable +fun QuickCaptureDialog(onDismiss: () -> Unit, onCapture: (String) -> Unit) { + var text by remember { mutableStateOf("") } + + AlertDialog( + onDismissRequest = onDismiss, + title = { Text("Quick Capture") }, + text = { + TextField( + value = text, + onValueChange = { text = it }, + placeholder = { Text("What's on your mind?") }, + modifier = Modifier.fillMaxWidth() + ) + }, + confirmButton = { + Button(onClick = { if (text.isNotBlank()) onCapture(text) }) { + Text("Capture") + } + }, + dismissButton = { + TextButton(onClick = onDismiss) { + Text("Cancel") + } + } + ) +} diff --git a/app/src/main/kotlin/com/soulstice/app/SoulsticeApp.kt b/app/src/main/kotlin/com/soulstice/app/SoulsticeApp.kt new file mode 100644 index 0000000..f8752c2 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/SoulsticeApp.kt @@ -0,0 +1,7 @@ +package com.soulstice.app + +import android.app.Application +import dagger.hilt.android.HiltAndroidApp + +@HiltAndroidApp +class SoulsticeApp : Application() diff --git a/app/src/main/kotlin/com/soulstice/app/data/local/AppDatabase.kt b/app/src/main/kotlin/com/soulstice/app/data/local/AppDatabase.kt new file mode 100644 index 0000000..1602854 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/data/local/AppDatabase.kt @@ -0,0 +1,25 @@ +package com.soulstice.app.data.local + +import androidx.room.Database +import androidx.room.RoomDatabase +import com.soulstice.app.data.local.dao.SoulsticeDao +import com.soulstice.app.data.local.entities.* + +@Database( + entities = [ + Task::class, + Project::class, + Habit::class, + HabitCompletion::class, + Resource::class, + Client::class, + JournalEntry::class, + InboxItem::class, + FocusSession::class + ], + version = 4, + exportSchema = false +) +abstract class AppDatabase : RoomDatabase() { + abstract fun soulsticeDao(): SoulsticeDao +} diff --git a/app/src/main/kotlin/com/soulstice/app/data/local/PreferenceManager.kt b/app/src/main/kotlin/com/soulstice/app/data/local/PreferenceManager.kt new file mode 100644 index 0000000..3377855 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/data/local/PreferenceManager.kt @@ -0,0 +1,44 @@ +package com.soulstice.app.data.local + +import android.content.Context +import androidx.datastore.preferences.core.* +import androidx.datastore.preferences.preferencesDataStore +import dagger.hilt.android.qualifiers.ApplicationContext +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.map +import javax.inject.Inject +import javax.inject.Singleton + +private val Context.dataStore by preferencesDataStore(name = "settings") + +@Singleton +class PreferenceManager @Inject constructor( + @ApplicationContext private val context: Context +) { + private val ENERGY_LEVEL = stringPreferencesKey("energy_level") + private val THEME = stringPreferencesKey("theme") + private val POMODORO_DURATION = intPreferencesKey("pomodoro_duration") + + val energyLevel: Flow = context.dataStore.data.map { it[ENERGY_LEVEL] ?: "high" } + val theme: Flow = context.dataStore.data.map { it[THEME] ?: "Light" } + val pomodoroDuration: Flow = context.dataStore.data.map { it[POMODORO_DURATION] ?: 25 } + + suspend fun setEnergyLevel(level: String) { + context.dataStore.edit { it[ENERGY_LEVEL] = level } + } + + suspend fun toggleEnergy() { + context.dataStore.edit { + val current = it[ENERGY_LEVEL] ?: "high" + it[ENERGY_LEVEL] = if (current == "high") "low" else "high" + } + } + + suspend fun setTheme(theme: String) { + context.dataStore.edit { it[THEME] = theme } + } + + suspend fun setPomodoroDuration(minutes: Int) { + context.dataStore.edit { it[POMODORO_DURATION] = minutes } + } +} diff --git a/app/src/main/kotlin/com/soulstice/app/data/local/dao/SoulsticeDao.kt b/app/src/main/kotlin/com/soulstice/app/data/local/dao/SoulsticeDao.kt new file mode 100644 index 0000000..2e3451f --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/data/local/dao/SoulsticeDao.kt @@ -0,0 +1,150 @@ +package com.soulstice.app.data.local.dao + +import androidx.room.* +import com.soulstice.app.data.local.entities.* +import kotlinx.coroutines.flow.Flow + +@Dao +interface SoulsticeDao { + @Query("SELECT * FROM tasks WHERE status != 'done' AND type = 'task' ORDER BY createdAt DESC") + fun getActiveTasks(): Flow> + + @Query("SELECT * FROM tasks WHERE status != 'done' AND type = 'task' AND energy = :energy ORDER BY createdAt DESC") + fun getActiveTasksByEnergy(energy: String): Flow> + + @Query("SELECT * FROM tasks WHERE type = :type ORDER BY createdAt DESC") + fun getTasksByType(type: String): Flow> + + @Query("SELECT * FROM tasks ORDER BY createdAt DESC") + fun getAllTasks(): Flow> + + @Query("SELECT * FROM tasks WHERE id = :id") + suspend fun getTaskById(id: String): Task? + + @Insert(onConflict = OnConflictStrategy.REPLACE) + suspend fun insertTask(task: Task) + + @Delete + suspend fun deleteTask(task: Task) + + @Query("SELECT * FROM projects") + fun getAllProjects(): Flow> + + @Insert(onConflict = OnConflictStrategy.REPLACE) + suspend fun insertProject(project: Project) + + @Delete + suspend fun deleteProject(project: Project) + + @Query("SELECT * FROM habits") + fun getAllHabits(): Flow> + + @Insert(onConflict = OnConflictStrategy.REPLACE) + suspend fun insertHabit(habit: Habit) + + @Delete + suspend fun deleteHabit(habit: Habit) + + @Query("SELECT * FROM habit_completions WHERE habitId = :habitId") + fun getCompletionsForHabit(habitId: String): Flow> + + @Insert(onConflict = OnConflictStrategy.REPLACE) + suspend fun insertHabitCompletion(completion: HabitCompletion) + + @Delete + suspend fun deleteHabitCompletion(completion: HabitCompletion) + + @Query("SELECT * FROM resources") + fun getAllResources(): Flow> + + @Query("SELECT * FROM resources WHERE projectId = :projectId") + fun getResourcesByProject(projectId: String): Flow> + + @Insert(onConflict = OnConflictStrategy.REPLACE) + suspend fun insertResource(resource: Resource) + + @Delete + suspend fun deleteResource(resource: Resource) + + @Query("SELECT * FROM clients") + fun getAllClients(): Flow> + + @Insert(onConflict = OnConflictStrategy.REPLACE) + suspend fun insertClient(client: Client) + + @Delete + suspend fun deleteClient(client: Client) + + @Query("SELECT * FROM journal_entries ORDER BY date DESC") + fun getAllJournalEntries(): Flow> + + @Query("SELECT * FROM journal_entries WHERE date >= :startOfDay AND date <= :endOfDay") + fun getJournalEntryForDay(startOfDay: Long, endOfDay: Long): Flow> + + @Insert(onConflict = OnConflictStrategy.REPLACE) + suspend fun insertJournalEntry(entry: JournalEntry) + + @Delete + suspend fun deleteJournalEntry(entry: JournalEntry) + + @Query("SELECT * FROM inbox_items WHERE status = 'unprocessed' ORDER BY createdAt DESC") + fun getUnprocessedInboxItems(): Flow> + + @Insert(onConflict = OnConflictStrategy.REPLACE) + suspend fun insertInboxItem(item: InboxItem) + + @Update + suspend fun updateInboxItem(item: InboxItem) + + @Delete + suspend fun deleteInboxItem(item: InboxItem) + + @Query("SELECT * FROM focus_sessions ORDER BY date DESC") + fun getAllFocusSessions(): Flow> + + @Query("SELECT COUNT(*) FROM focus_sessions WHERE date >= :startOfDay AND mode = 'work'") + fun getFocusSessionCountForDay(startOfDay: Long): Flow + + @Insert(onConflict = OnConflictStrategy.REPLACE) + suspend fun insertFocusSession(session: FocusSession) + + @Query("DELETE FROM tasks") + suspend fun clearTasks() + + @Query("DELETE FROM projects") + suspend fun clearProjects() + + @Query("DELETE FROM habits") + suspend fun clearHabits() + + @Query("DELETE FROM habit_completions") + suspend fun clearHabitCompletions() + + @Query("DELETE FROM resources") + suspend fun clearResources() + + @Query("DELETE FROM clients") + suspend fun clearClients() + + @Query("DELETE FROM journal_entries") + suspend fun clearJournalEntries() + + @Query("DELETE FROM inbox_items") + suspend fun clearInboxItems() + + @Query("DELETE FROM focus_sessions") + suspend fun clearFocusSessions() + + @Transaction + suspend fun nukeDatabase() { + clearTasks() + clearProjects() + clearHabits() + clearHabitCompletions() + clearResources() + clearClients() + clearJournalEntries() + clearInboxItems() + clearFocusSessions() + } +} diff --git a/app/src/main/kotlin/com/soulstice/app/data/local/entities/Client.kt b/app/src/main/kotlin/com/soulstice/app/data/local/entities/Client.kt new file mode 100644 index 0000000..f2af6ba --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/data/local/entities/Client.kt @@ -0,0 +1,16 @@ +package com.soulstice.app.data.local.entities + +import androidx.room.Entity +import androidx.room.PrimaryKey +import kotlinx.serialization.Serializable + +@Serializable +@Entity(tableName = "clients") +data class Client( + @PrimaryKey val id: String, + val name: String, + val email: String?, + val phone: String?, + val status: String, // "lead", "active", "previous" + val createdAt: Long +) diff --git a/app/src/main/kotlin/com/soulstice/app/data/local/entities/FocusSession.kt b/app/src/main/kotlin/com/soulstice/app/data/local/entities/FocusSession.kt new file mode 100644 index 0000000..0abd321 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/data/local/entities/FocusSession.kt @@ -0,0 +1,15 @@ +package com.soulstice.app.data.local.entities + +import androidx.room.Entity +import androidx.room.PrimaryKey +import kotlinx.serialization.Serializable + +@Serializable +@Entity(tableName = "focus_sessions") +data class FocusSession( + @PrimaryKey val id: String, + val duration: Long, // in milliseconds + val mode: String, // "work", "break" + val date: Long, + val createdAt: Long +) diff --git a/app/src/main/kotlin/com/soulstice/app/data/local/entities/Habit.kt b/app/src/main/kotlin/com/soulstice/app/data/local/entities/Habit.kt new file mode 100644 index 0000000..ada8d66 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/data/local/entities/Habit.kt @@ -0,0 +1,16 @@ +package com.soulstice.app.data.local.entities + +import androidx.room.Entity +import androidx.room.PrimaryKey +import kotlinx.serialization.Serializable + +@Serializable +@Entity(tableName = "habits") +data class Habit( + @PrimaryKey val id: String, + val title: String, + val frequency: String, // "daily", "weekly" + val streak: Int, + val lastCompleted: Long?, + val createdAt: Long +) diff --git a/app/src/main/kotlin/com/soulstice/app/data/local/entities/HabitCompletion.kt b/app/src/main/kotlin/com/soulstice/app/data/local/entities/HabitCompletion.kt new file mode 100644 index 0000000..b5efda3 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/data/local/entities/HabitCompletion.kt @@ -0,0 +1,14 @@ +package com.soulstice.app.data.local.entities + +import androidx.room.Entity +import androidx.room.PrimaryKey +import kotlinx.serialization.Serializable + +@Serializable +@Entity(tableName = "habit_completions") +data class HabitCompletion( + @PrimaryKey val id: String, + val habitId: String, + val date: Long, // Midnight of the completion date + val createdAt: Long +) diff --git a/app/src/main/kotlin/com/soulstice/app/data/local/entities/InboxItem.kt b/app/src/main/kotlin/com/soulstice/app/data/local/entities/InboxItem.kt new file mode 100644 index 0000000..8a4cad8 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/data/local/entities/InboxItem.kt @@ -0,0 +1,14 @@ +package com.soulstice.app.data.local.entities + +import androidx.room.Entity +import androidx.room.PrimaryKey +import kotlinx.serialization.Serializable + +@Serializable +@Entity(tableName = "inbox_items") +data class InboxItem( + @PrimaryKey val id: String, + val content: String, + val status: String, // "unprocessed", "processed" + val createdAt: Long +) diff --git a/app/src/main/kotlin/com/soulstice/app/data/local/entities/JournalEntry.kt b/app/src/main/kotlin/com/soulstice/app/data/local/entities/JournalEntry.kt new file mode 100644 index 0000000..f6ebe99 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/data/local/entities/JournalEntry.kt @@ -0,0 +1,16 @@ +package com.soulstice.app.data.local.entities + +import androidx.room.Entity +import androidx.room.PrimaryKey +import kotlinx.serialization.Serializable + +@Serializable +@Entity(tableName = "journal_entries") +data class JournalEntry( + @PrimaryKey val id: String, + val content: String, + val date: Long, + val projectId: String? = null, + val isWin: Boolean = false, + val createdAt: Long +) diff --git a/app/src/main/kotlin/com/soulstice/app/data/local/entities/Project.kt b/app/src/main/kotlin/com/soulstice/app/data/local/entities/Project.kt new file mode 100644 index 0000000..73e4959 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/data/local/entities/Project.kt @@ -0,0 +1,16 @@ +package com.soulstice.app.data.local.entities + +import androidx.room.Entity +import androidx.room.PrimaryKey +import kotlinx.serialization.Serializable + +@Serializable +@Entity(tableName = "projects") +data class Project( + @PrimaryKey val id: String, + val name: String, + val description: String?, + val colorCode: String? = null, + val status: String, // "active", "completed", "archived" + val createdAt: Long +) diff --git a/app/src/main/kotlin/com/soulstice/app/data/local/entities/Resource.kt b/app/src/main/kotlin/com/soulstice/app/data/local/entities/Resource.kt new file mode 100644 index 0000000..6fcb61b --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/data/local/entities/Resource.kt @@ -0,0 +1,18 @@ +package com.soulstice.app.data.local.entities + +import androidx.room.Entity +import androidx.room.PrimaryKey +import kotlinx.serialization.Serializable + +@Serializable +@Entity(tableName = "resources") +data class Resource( + @PrimaryKey val id: String, + val title: String, + val type: String, // "note", "link", "document", "image" + val content: String?, + val url: String?, + val localUri: String? = null, + val projectId: String?, + val createdAt: Long +) diff --git a/app/src/main/kotlin/com/soulstice/app/data/local/entities/Task.kt b/app/src/main/kotlin/com/soulstice/app/data/local/entities/Task.kt new file mode 100644 index 0000000..5152378 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/data/local/entities/Task.kt @@ -0,0 +1,21 @@ +package com.soulstice.app.data.local.entities + +import androidx.room.Entity +import androidx.room.PrimaryKey +import kotlinx.serialization.Serializable + +@Serializable +@Entity(tableName = "tasks") +data class Task( + @PrimaryKey val id: String, + val title: String, + val description: String?, + val status: String, // "todo", "in_progress", "done" + val type: String = "task", // "task", "idea" + val priority: String, // "low", "medium", "high" + val energy: String, // "low", "high" + val projectId: String?, + val recurringLogic: String? = null, + val dueDate: Long?, + val createdAt: Long +) diff --git a/app/src/main/kotlin/com/soulstice/app/di/DatabaseModule.kt b/app/src/main/kotlin/com/soulstice/app/di/DatabaseModule.kt new file mode 100644 index 0000000..864d829 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/di/DatabaseModule.kt @@ -0,0 +1,32 @@ +package com.soulstice.app.di + +import android.content.Context +import androidx.room.Room +import com.soulstice.app.data.local.AppDatabase +import com.soulstice.app.data.local.dao.SoulsticeDao +import dagger.Module +import dagger.Provides +import dagger.hilt.InstallIn +import dagger.hilt.android.qualifiers.ApplicationContext +import dagger.hilt.components.SingletonComponent +import javax.inject.Singleton + +@Module +@InstallIn(SingletonComponent::class) +object DatabaseModule { + + @Provides + @Singleton + fun provideDatabase(@ApplicationContext context: Context): AppDatabase { + return Room.databaseBuilder( + context, + AppDatabase::class.java, + "soulstice_db" + ).build() + } + + @Provides + fun provideSoulsticeDao(database: AppDatabase): SoulsticeDao { + return database.soulsticeDao() + } +} diff --git a/app/src/main/kotlin/com/soulstice/app/ui/components/SoulsticeButton.kt b/app/src/main/kotlin/com/soulstice/app/ui/components/SoulsticeButton.kt new file mode 100644 index 0000000..00f3087 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/ui/components/SoulsticeButton.kt @@ -0,0 +1,41 @@ +package com.soulstice.app.ui.components + +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Button +import androidx.compose.material3.ButtonDefaults +import androidx.compose.material3.OutlinedButton +import androidx.compose.material3.Text +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp +import com.soulstice.app.ui.theme.Sage600 + +@Composable +fun SoulsticeButton( + text: String, + onClick: () -> Unit, + modifier: Modifier = Modifier, + variant: String = "primary" // "primary", "outline" +) { + if (variant == "primary") { + Button( + onClick = onClick, + modifier = modifier, + shape = RoundedCornerShape(16.dp), + colors = ButtonDefaults.buttonColors(containerColor = Sage600), + contentPadding = PaddingValues(horizontal = 24.dp, vertical = 12.dp) + ) { + Text(text) + } + } else { + OutlinedButton( + onClick = onClick, + modifier = modifier, + shape = RoundedCornerShape(16.dp), + contentPadding = PaddingValues(horizontal = 24.dp, vertical = 12.dp) + ) { + Text(text) + } + } +} diff --git a/app/src/main/kotlin/com/soulstice/app/ui/components/SoulsticeCard.kt b/app/src/main/kotlin/com/soulstice/app/ui/components/SoulsticeCard.kt new file mode 100644 index 0000000..d3e55f4 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/ui/components/SoulsticeCard.kt @@ -0,0 +1,28 @@ +package com.soulstice.app.ui.components + +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.Card +import androidx.compose.material3.CardDefaults +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.unit.dp +import com.soulstice.app.ui.theme.Taupe100 + +@Composable +fun SoulsticeCard( + modifier: Modifier = Modifier, + containerColor: Color = Color.White, + content: @Composable () -> Unit +) { + Card( + modifier = modifier, + shape = RoundedCornerShape(24.dp), + colors = CardDefaults.cardColors(containerColor = containerColor), + elevation = CardDefaults.cardElevation(defaultElevation = 0.dp), + border = CardDefaults.outlinedCardBorder().copy(brush = androidx.compose.ui.graphics.SolidColor(Taupe100)) + ) { + content() + } +} diff --git a/app/src/main/kotlin/com/soulstice/app/ui/components/SoulsticeInput.kt b/app/src/main/kotlin/com/soulstice/app/ui/components/SoulsticeInput.kt new file mode 100644 index 0000000..9637ca3 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/ui/components/SoulsticeInput.kt @@ -0,0 +1,34 @@ +package com.soulstice.app.ui.components + +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.OutlinedTextField +import androidx.compose.material3.Text +import androidx.compose.material3.TextFieldDefaults +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp +import com.soulstice.app.ui.theme.Taupe100 +import com.soulstice.app.ui.theme.Taupe500 + +@Composable +fun SoulsticeInput( + value: String, + onValueChange: (String) -> Unit, + label: String, + modifier: Modifier = Modifier +) { + OutlinedTextField( + value = value, + onValueChange = onValueChange, + label = { Text(label) }, + modifier = modifier.fillMaxWidth(), + shape = RoundedCornerShape(16.dp), + colors = TextFieldDefaults.colors( + unfocusedContainerColor = androidx.compose.ui.graphics.Color.Transparent, + focusedContainerColor = androidx.compose.ui.graphics.Color.Transparent, + unfocusedIndicatorColor = Taupe100, + focusedIndicatorColor = Taupe500 + ) + ) +} diff --git a/app/src/main/kotlin/com/soulstice/app/ui/components/SoulsticeProgressBar.kt b/app/src/main/kotlin/com/soulstice/app/ui/components/SoulsticeProgressBar.kt new file mode 100644 index 0000000..9cd0832 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/ui/components/SoulsticeProgressBar.kt @@ -0,0 +1,28 @@ +package com.soulstice.app.ui.components + +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.LinearProgressIndicator +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.unit.dp +import com.soulstice.app.ui.theme.Sage500 +import com.soulstice.app.ui.theme.Taupe100 + +@Composable +fun SoulsticeProgressBar( + progress: Float, + modifier: Modifier = Modifier +) { + LinearProgressIndicator( + progress = progress, + modifier = modifier + .fillMaxWidth() + .height(8.dp) + .clip(RoundedCornerShape(4.dp)), + color = Sage500, + trackColor = Taupe100 + ) +} diff --git a/app/src/main/kotlin/com/soulstice/app/ui/screens/BusinessHubScreen.kt b/app/src/main/kotlin/com/soulstice/app/ui/screens/BusinessHubScreen.kt new file mode 100644 index 0000000..a6c2d6a --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/ui/screens/BusinessHubScreen.kt @@ -0,0 +1,21 @@ +package com.soulstice.app.ui.screens + +import androidx.compose.foundation.layout.* +import androidx.compose.material3.* +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp +import com.soulstice.app.ui.theme.Taupe900 + +@Composable +fun BusinessHubScreen() { + Column( + modifier = Modifier + .fillMaxSize() + .padding(24.dp) + ) { + Text("Business Hub", style = MaterialTheme.typography.headlineLarge, color = Taupe900) + Spacer(modifier = Modifier.height(16.dp)) + Text("CRM, Lead tracking, and Client management.") + } +} diff --git a/app/src/main/kotlin/com/soulstice/app/ui/screens/CreativeStudioScreen.kt b/app/src/main/kotlin/com/soulstice/app/ui/screens/CreativeStudioScreen.kt new file mode 100644 index 0000000..5055044 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/ui/screens/CreativeStudioScreen.kt @@ -0,0 +1,110 @@ +package com.soulstice.app.ui.screens + +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.* +import androidx.compose.foundation.lazy.grid.GridCells +import androidx.compose.foundation.lazy.grid.LazyVerticalGrid +import androidx.compose.foundation.lazy.grid.items +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.Add +import androidx.compose.material.icons.filled.Image +import androidx.compose.material3.* +import androidx.compose.runtime.* +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.hilt.navigation.compose.hiltViewModel +import com.soulstice.app.ui.components.SoulsticeCard +import com.soulstice.app.ui.theme.* +import com.soulstice.app.ui.viewmodel.ResourceViewModel + +@Composable +fun CreativeStudioScreen( + viewModel: ResourceViewModel = hiltViewModel() +) { + val resources by viewModel.allResources.collectAsState(initial = emptyList()) + val images = resources.filter { it.type == "image" } + var showAddImage by remember { mutableStateOf(false) } + + if (showAddImage) { + AddImageDialog( + onDismiss = { showAddImage = false }, + onAdd = { title, uri -> + viewModel.addResource(title, "image", localUri = uri) + showAddImage = false + } + ) + } + + Column( + modifier = Modifier + .fillMaxSize() + .padding(24.dp) + ) { + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically + ) { + Text("Creative Studio", style = MaterialTheme.typography.headlineLarge, color = Taupe900) + IconButton(onClick = { showAddImage = true }) { + Icon(Icons.Default.Add, contentDescription = "Add Image", tint = Sage600) + } + } + Text("Mood boards and visual inspirations.", color = Taupe500, fontSize = 14.sp) + + Spacer(modifier = Modifier.height(24.dp)) + + if (images.isEmpty()) { + Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { + Text("No visual inspirations yet.", color = Taupe500) + } + } else { + LazyVerticalGrid( + columns = GridCells.Fixed(2), + horizontalArrangement = Arrangement.spacedBy(16.dp), + verticalArrangement = Arrangement.spacedBy(16.dp) + ) { + items(images) { image -> + SoulsticeCard(modifier = Modifier.aspectRatio(1f)) { + Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { + Column(horizontalAlignment = Alignment.CenterHorizontally) { + Icon(Icons.Default.Image, contentDescription = null, tint = Taupe100, modifier = Modifier.size(48.dp)) + Text(image.title, color = Taupe500, fontSize = 10.sp, modifier = Modifier.padding(8.dp)) + } + } + } + } + } + } + } +} + +@Composable +fun AddImageDialog(onDismiss: () -> Unit, onAdd: (String, String) -> Unit) { + var title by remember { mutableStateOf("") } + var uri by remember { mutableStateOf("") } + + AlertDialog( + onDismissRequest = onDismiss, + title = { Text("Add Inspiration") }, + text = { + Column { + TextField(value = title, onValueChange = { title = it }, label = { Text("Title") }) + Spacer(modifier = Modifier.height(8.dp)) + TextField(value = uri, onValueChange = { uri = it }, label = { Text("Image URI / Path") }) + } + }, + confirmButton = { + Button(onClick = { if (title.isNotBlank()) onAdd(title, uri) }) { + Text("Add") + } + }, + dismissButton = { + TextButton(onClick = onDismiss) { + Text("Cancel") + } + } + ) +} diff --git a/app/src/main/kotlin/com/soulstice/app/ui/screens/DashboardScreen.kt b/app/src/main/kotlin/com/soulstice/app/ui/screens/DashboardScreen.kt new file mode 100644 index 0000000..7a58f19 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/ui/screens/DashboardScreen.kt @@ -0,0 +1,338 @@ +package com.soulstice.app.ui.screens + +import androidx.compose.foundation.background +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.* +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.items +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.* +import androidx.compose.material3.* +import androidx.compose.runtime.* +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.hilt.navigation.compose.hiltViewModel +import com.soulstice.app.data.local.entities.Habit +import com.soulstice.app.ui.components.SoulsticeCard +import com.soulstice.app.ui.theme.* +import com.soulstice.app.ui.viewmodel.DashboardViewModel +import com.soulstice.app.ui.viewmodel.HabitViewModel + +@Composable +fun DashboardScreen( + viewModel: DashboardViewModel = hiltViewModel(), + habitViewModel: HabitViewModel = hiltViewModel() +) { + val energyLevel by viewModel.energyLevel.collectAsState(initial = "high") + val activeTasks by viewModel.activeTasks.collectAsState(initial = emptyList()) + val todayTasks by viewModel.todayTasks.collectAsState(initial = emptyList()) + val incubatorIdeas by viewModel.incubatorIdeas.collectAsState(initial = emptyList()) + val businessLeads by viewModel.businessLeads.collectAsState(initial = emptyList()) + val globalProgress by viewModel.globalProgress.collectAsState(initial = 0f) + val velocity by viewModel.velocity.collectAsState(initial = emptyList()) + val averageVelocity by viewModel.averageVelocity.collectAsState(initial = 0f) + val habitsWithStatus by habitViewModel.habitsWithStatus.collectAsState(initial = emptyList()) + + Column( + modifier = Modifier + .fillMaxSize() + .padding(24.dp) + ) { + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically + ) { + Column { + Text( + text = "Monday, Oct 14", + style = MaterialTheme.typography.bodySmall, + color = Taupe500 + ) + Text( + text = "Good Morning", + style = MaterialTheme.typography.headlineLarge, + color = Taupe900 + ) + } + Box( + modifier = Modifier + .size(48.dp) + .clip(CircleShape) + .background(if (energyLevel == "high") Clay50 else Sage100) + .clickable { viewModel.toggleEnergy() }, + contentAlignment = Alignment.Center + ) { + Icon( + imageVector = if (energyLevel == "high") Icons.Default.Bolt else Icons.Default.BatteryChargingFull, + contentDescription = "Energy", + tint = if (energyLevel == "high") Clay500 else Sage500 + ) + } + } + + Spacer(modifier = Modifier.height(24.dp)) + + // Metrics Section + Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(16.dp)) { + SoulsticeCard( + modifier = Modifier.weight(1f), + containerColor = Sage600 + ) { + Column(modifier = Modifier.padding(16.dp)) { + Text("Global Progress", color = Color.White.copy(alpha = 0.8f), fontSize = 12.sp) + Text("${(globalProgress * 100).toInt()}%", color = Color.White, style = MaterialTheme.typography.titleMedium) + Spacer(modifier = Modifier.height(8.dp)) + LinearProgressIndicator( + progress = globalProgress, + modifier = Modifier.fillMaxWidth().height(4.dp).clip(CircleShape), + color = Color.White, + trackColor = Color.White.copy(alpha = 0.2f) + ) + } + } + SoulsticeCard( + modifier = Modifier.weight(1f), + containerColor = Taupe900 + ) { + Column(modifier = Modifier.padding(16.dp)) { + Text("7-Day Velocity", color = Color.White.copy(alpha = 0.8f), fontSize = 12.sp) + Text("${String.format("%.1f", averageVelocity)} pts/day", color = Color.White, style = MaterialTheme.typography.titleMedium) + Spacer(modifier = Modifier.height(8.dp)) + // Bars based on real velocity data + Row( + modifier = Modifier.fillMaxWidth().height(20.dp), + horizontalArrangement = Arrangement.spacedBy(2.dp), + verticalAlignment = Alignment.Bottom + ) { + val max = (velocity.maxOrNull() ?: 1).toFloat() + velocity.forEach { count -> + Box(modifier = Modifier.weight(1f).fillMaxHeight(if (max > 0) count / max else 0.1f).background(Color.White.copy(alpha = 0.6f))) + } + } + } + } + } + + Spacer(modifier = Modifier.height(32.dp)) + + LazyColumn( + modifier = Modifier.fillMaxSize(), + verticalArrangement = Arrangement.spacedBy(24.dp) + ) { + // Habits Tracker Section + item { + val maxStreak = if (habitsWithStatus.isEmpty()) 0 else habitsWithStatus.maxOf { it.streak } + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically + ) { + Text( + text = "Daily Habits", + style = MaterialTheme.typography.titleLarge, + color = Taupe900 + ) + if (maxStreak > 1) { + Text("🔥 $maxStreak day streak", color = Clay800, fontSize = 12.sp, fontWeight = FontWeight.Bold) + } + } + Spacer(modifier = Modifier.height(12.dp)) + if (habitsWithStatus.isEmpty()) { + Text("No habits tracked. Add some in Habits library.", color = Taupe500, fontSize = 14.sp) + } else { + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.spacedBy(12.dp) + ) { + habitsWithStatus.take(5).forEach { status -> + HabitIcon( + icon = Icons.Default.Star, // Default icon + completed = status.isCompletedToday, + label = status.habit.title, + onClick = { habitViewModel.completeHabit(status.habit) } + ) + } + } + } + } + + // Zone A: Execution + item { + Column { + Text( + text = "Today's Schedule", + style = MaterialTheme.typography.titleLarge, + color = Taupe900 + ) + Spacer(modifier = Modifier.height(12.dp)) + if (todayTasks.isEmpty()) { + Text("No tasks scheduled for today.", color = Taupe500, fontSize = 14.sp) + } else { + Column(verticalArrangement = Arrangement.spacedBy(12.dp)) { + todayTasks.forEach { task -> + ScheduleItem( + time = "Today", + title = task.title, + subtitle = "${task.priority.capitalize()} • ${if (task.energy == "high") "⚡️" else "🔋"}", + completed = task.status == "done", + onClick = { viewModel.completeTask(task) } + ) + } + } + } + } + } + + item { + Column { + Text( + text = "Active Tasks", + style = MaterialTheme.typography.titleLarge, + color = Taupe900 + ) + Spacer(modifier = Modifier.height(12.dp)) + if (activeTasks.isEmpty()) { + Text("No active tasks.", color = Taupe500, fontSize = 14.sp) + } else { + Column(verticalArrangement = Arrangement.spacedBy(12.dp)) { + activeTasks.forEach { task -> + ActiveTaskItem( + title = task.title, + project = task.projectId ?: "No Project", + energy = task.energy.capitalize(), + onClick = { viewModel.completeTask(task) } + ) + } + } + } + } + } + + // Zone B: Incubation + item { + Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(16.dp)) { + Column(modifier = Modifier.weight(1f)) { + Text( + text = "Creative Incubator", + style = MaterialTheme.typography.titleMedium, + color = Taupe900 + ) + Spacer(modifier = Modifier.height(8.dp)) + if (incubatorIdeas.isEmpty()) { + Text("No ideas yet.", color = Taupe500, fontSize = 12.sp) + } else { + incubatorIdeas.forEach { idea -> + IncubatorItem(idea.title) + } + } + } + Column(modifier = Modifier.weight(1f)) { + Text( + text = "Business Leads", + style = MaterialTheme.typography.titleMedium, + color = Taupe900 + ) + Spacer(modifier = Modifier.height(8.dp)) + if (businessLeads.isEmpty()) { + Text("No leads yet.", color = Taupe500, fontSize = 12.sp) + } else { + businessLeads.forEach { lead -> + LeadItem(lead.name) + } + } + } + } + } + + item { + Spacer(modifier = Modifier.height(16.dp)) + } + } + } +} + +@Composable +fun ActiveTaskItem(title: String, project: String, energy: String, onClick: () -> Unit = {}) { + SoulsticeCard( + modifier = Modifier.fillMaxWidth().clickable { onClick() } + ) { + Row( + modifier = Modifier.padding(16.dp), + verticalAlignment = Alignment.CenterVertically + ) { + Column(modifier = Modifier.weight(1f)) { + Text(title, color = Taupe900, fontWeight = androidx.compose.ui.text.font.FontWeight.SemiBold) + Text(project, color = Taupe500, fontSize = 12.sp) + } + Text(if (energy == "High") "⚡️" else "🔋", fontSize = 18.sp) + } + } +} + +@Composable +fun IncubatorItem(title: String) { + SoulsticeCard(modifier = Modifier.fillMaxWidth().padding(vertical = 4.dp), containerColor = Sage50) { + Text(title, modifier = Modifier.padding(12.dp), color = Sage700, fontSize = 12.sp) + } +} + +@Composable +fun LeadItem(title: String) { + SoulsticeCard(modifier = Modifier.fillMaxWidth().padding(vertical = 4.dp), containerColor = Clay50) { + Text(title, modifier = Modifier.padding(12.dp), color = Clay800, fontSize = 12.sp) + } +} + +@Composable +fun HabitIcon(icon: androidx.compose.ui.graphics.vector.ImageVector, completed: Boolean, label: String, onClick: () -> Unit = {}) { + Column(horizontalAlignment = Alignment.CenterHorizontally) { + Box( + modifier = Modifier + .size(56.dp) + .clip(CircleShape) + .background(if (completed) Sage500 else Taupe100) + .clickable { onClick() }, + contentAlignment = Alignment.Center + ) { + Icon( + imageVector = icon, + contentDescription = label, + tint = if (completed) Color.White else Taupe500, + modifier = Modifier.size(24.dp) + ) + } + Spacer(modifier = Modifier.height(4.dp)) + Text(label, fontSize = 10.sp, color = Taupe500) + } +} + +@Composable +fun ScheduleItem(time: String, title: String, subtitle: String, completed: Boolean, onClick: () -> Unit = {}) { + SoulsticeCard( + modifier = Modifier.fillMaxWidth().clickable { onClick() } + ) { + Row( + modifier = Modifier.padding(16.dp), + verticalAlignment = Alignment.CenterVertically + ) { + Text(time, fontWeight = androidx.compose.ui.text.font.FontWeight.Bold, color = if (completed) Taupe900 else Taupe500, modifier = Modifier.width(48.dp)) + Spacer(modifier = Modifier.width(16.dp)) + Column(modifier = Modifier.weight(1f)) { + Text(title, color = Taupe900, fontWeight = androidx.compose.ui.text.font.FontWeight.SemiBold) + Text(subtitle, color = Taupe500, fontSize = 12.sp) + } + if (completed) { + Icon(Icons.Default.CheckCircle, contentDescription = null, tint = Sage500) + } else { + Box(modifier = Modifier.size(20.dp).clip(CircleShape).background(Taupe50).padding(1.dp).clip(CircleShape).background(Color.White)) + } + } + } +} diff --git a/app/src/main/kotlin/com/soulstice/app/ui/screens/FocusScreen.kt b/app/src/main/kotlin/com/soulstice/app/ui/screens/FocusScreen.kt new file mode 100644 index 0000000..8cffcf9 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/ui/screens/FocusScreen.kt @@ -0,0 +1,132 @@ +package com.soulstice.app.ui.screens + +import androidx.compose.animation.core.* +import androidx.compose.foundation.Canvas +import androidx.compose.foundation.layout.* +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.Pause +import androidx.compose.material.icons.filled.PlayArrow +import androidx.compose.material.icons.filled.Refresh +import androidx.compose.material3.* +import androidx.compose.runtime.* +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.StrokeCap +import androidx.compose.ui.graphics.drawscope.Stroke +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.hilt.navigation.compose.hiltViewModel +import com.soulstice.app.ui.theme.* +import com.soulstice.app.ui.viewmodel.FocusViewModel + +@Composable +fun FocusScreen( + viewModel: FocusViewModel = hiltViewModel() +) { + val timeLeft by viewModel.timeLeft.collectAsState() + val isRunning by viewModel.isRunning.collectAsState() + val sessionsToday by viewModel.sessionsToday.collectAsState(initial = 0) + val pomodoroDuration by viewModel.pomodoroDuration.collectAsState(initial = 25) + val totalTime = pomodoroDuration * 60 * 1000L + + val minutes = (timeLeft / 1000) / 60 + val seconds = (timeLeft / 1000) % 60 + + Column( + modifier = Modifier + .fillMaxSize() + .padding(24.dp), + horizontalAlignment = Alignment.CenterHorizontally, + verticalArrangement = Arrangement.Center + ) { + Text( + text = "Focus Session", + style = MaterialTheme.typography.headlineMedium, + color = Taupe900 + ) + Text( + text = if (isRunning) "Deep work in progress" else "Ready to focus?", + style = MaterialTheme.typography.bodyMedium, + color = Taupe500 + ) + + Spacer(modifier = Modifier.height(64.dp)) + + Box(contentAlignment = Alignment.Center) { + val progress = timeLeft.toFloat() / totalTime + + Canvas(modifier = Modifier.size(240.dp)) { + drawCircle( + color = Taupe100, + style = Stroke(width = 12.dp.toPx()) + ) + drawArc( + color = Sage500, + startAngle = -90f, + sweepAngle = 360f * progress, + useCenter = false, + style = Stroke(width = 12.dp.toPx(), cap = StrokeCap.Round) + ) + } + + Column(horizontalAlignment = Alignment.CenterHorizontally) { + Text( + text = String.format("%02d:%02d", minutes, seconds), + fontSize = 48.sp, + fontWeight = FontWeight.Bold, + color = Taupe900 + ) + Text( + text = "minutes left", + fontSize = 14.sp, + color = Taupe500 + ) + } + } + + Spacer(modifier = Modifier.height(64.dp)) + + Row( + horizontalArrangement = Arrangement.spacedBy(24.dp), + verticalAlignment = Alignment.CenterVertically + ) { + IconButton( + onClick = { viewModel.resetTimer() }, + modifier = Modifier.size(48.dp) + ) { + Icon(Icons.Default.Refresh, contentDescription = "Reset", tint = Taupe500) + } + + LargeFloatingActionButton( + onClick = { viewModel.toggleTimer() }, + containerColor = Sage600, + contentColor = Color.White, + shape = CircleShape + ) { + Icon( + imageVector = if (isRunning) Icons.Default.Pause else Icons.Default.PlayArrow, + contentDescription = if (isRunning) "Pause" else "Start", + modifier = Modifier.size(36.dp) + ) + } + + IconButton( + onClick = { /* Skip */ }, + modifier = Modifier.size(48.dp) + ) { + Text("SKIP", color = Taupe500, fontWeight = FontWeight.Bold, fontSize = 12.sp) + } + } + + Spacer(modifier = Modifier.height(48.dp)) + + Text( + text = "Today: $sessionsToday sessions completed", + style = MaterialTheme.typography.bodySmall, + color = Taupe500 + ) + } +} diff --git a/app/src/main/kotlin/com/soulstice/app/ui/screens/HabitsScreen.kt b/app/src/main/kotlin/com/soulstice/app/ui/screens/HabitsScreen.kt new file mode 100644 index 0000000..b094ca2 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/ui/screens/HabitsScreen.kt @@ -0,0 +1,132 @@ +package com.soulstice.app.ui.screens + +import androidx.compose.foundation.layout.* +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.items +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.Add +import androidx.compose.material.icons.filled.Star +import androidx.compose.material3.* +import androidx.compose.runtime.* +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.hilt.navigation.compose.hiltViewModel +import com.soulstice.app.ui.components.SoulsticeCard +import com.soulstice.app.ui.theme.* +import com.soulstice.app.ui.viewmodel.HabitViewModel + +@Composable +fun HabitsScreen( + viewModel: HabitViewModel = hiltViewModel() +) { + val habitsWithStatus by viewModel.habitsWithStatus.collectAsState(initial = emptyList()) + var showAddHabit by remember { mutableStateOf(false) } + + if (showAddHabit) { + AddHabitDialog( + onDismiss = { showAddHabit = false }, + onAdd = { title, category -> + viewModel.addHabit(title, category) + showAddHabit = false + } + ) + } + + Column( + modifier = Modifier + .fillMaxSize() + .padding(24.dp) + ) { + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically + ) { + Text("Habit Library", style = MaterialTheme.typography.headlineLarge, color = Taupe900) + IconButton(onClick = { showAddHabit = true }) { + Icon(Icons.Default.Add, contentDescription = "Add Habit", tint = Sage600) + } + } + + Spacer(modifier = Modifier.height(24.dp)) + + if (habitsWithStatus.isEmpty()) { + Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { + Text("Your habit library is empty. Add your first habit!", color = Taupe500) + } + } else { + LazyColumn(verticalArrangement = Arrangement.spacedBy(16.dp)) { + items(habitsWithStatus) { status -> + HabitLibraryItem( + name = status.habit.title, + isCompleted = status.isCompletedToday, + streak = status.streak, + onComplete = { viewModel.completeHabit(status.habit) } + ) + } + } + } + } +} + +@Composable +fun HabitLibraryItem(name: String, isCompleted: Boolean, streak: Int, onComplete: () -> Unit) { + SoulsticeCard(modifier = Modifier.fillMaxWidth()) { + Row( + modifier = Modifier.padding(16.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.SpaceBetween + ) { + Row(verticalAlignment = Alignment.CenterVertically) { + Icon( + Icons.Default.Star, + contentDescription = null, + tint = if (isCompleted) Sage500 else Taupe100 + ) + Spacer(modifier = Modifier.width(12.dp)) + Column { + Text(name, color = Taupe900, fontWeight = androidx.compose.ui.text.font.FontWeight.SemiBold) + if (streak > 0) { + Text("🔥 $streak day streak", fontSize = 10.sp, color = Clay800) + } + } + } + if (!isCompleted) { + IconButton(onClick = onComplete) { + Icon(Icons.Default.Add, contentDescription = "Complete Habit", tint = Taupe500) + } + } else { + Icon(Icons.Default.Star, contentDescription = "Completed", tint = Sage500) + } + } + } +} + +@Composable +fun AddHabitDialog(onDismiss: () -> Unit, onAdd: (String, String) -> Unit) { + var title by remember { mutableStateOf("") } + var category by remember { mutableStateOf("Well-Being") } + + AlertDialog( + onDismissRequest = onDismiss, + title = { Text("New Habit") }, + text = { + Column { + TextField(value = title, onValueChange = { title = it }, label = { Text("Habit Title") }) + // Simple category selector could be added here + } + }, + confirmButton = { + Button(onClick = { if (title.isNotBlank()) onAdd(title, category) }) { + Text("Add") + } + }, + dismissButton = { + TextButton(onClick = onDismiss) { + Text("Cancel") + } + } + ) +} diff --git a/app/src/main/kotlin/com/soulstice/app/ui/screens/InboxScreen.kt b/app/src/main/kotlin/com/soulstice/app/ui/screens/InboxScreen.kt new file mode 100644 index 0000000..50ee4d8 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/ui/screens/InboxScreen.kt @@ -0,0 +1,106 @@ +package com.soulstice.app.ui.screens + +import androidx.compose.foundation.layout.* +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.items +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.* +import androidx.compose.material3.* +import androidx.compose.runtime.* +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.hilt.navigation.compose.hiltViewModel +import com.soulstice.app.data.local.entities.InboxItem +import com.soulstice.app.ui.components.SoulsticeButton +import com.soulstice.app.ui.components.SoulsticeCard +import com.soulstice.app.ui.components.SoulsticeInput +import com.soulstice.app.ui.theme.* +import com.soulstice.app.ui.viewmodel.InboxViewModel + +@Composable +fun InboxScreen( + viewModel: InboxViewModel = hiltViewModel() +) { + val items by viewModel.inboxItems.collectAsState(initial = emptyList()) + var newItem by remember { mutableStateOf("") } + + Column( + modifier = Modifier + .fillMaxSize() + .padding(24.dp) + ) { + Text("Inbox", style = MaterialTheme.typography.headlineLarge, color = Taupe900) + Text("Quick capture holding pen.", color = Taupe500, fontSize = 14.sp) + + Spacer(modifier = Modifier.height(24.dp)) + + Row(verticalAlignment = Alignment.CenterVertically) { + SoulsticeInput( + value = newItem, + onValueChange = { newItem = it }, + label = "Capture a thought...", + modifier = Modifier.weight(1f) + ) + Spacer(modifier = Modifier.width(8.dp)) + SoulsticeButton(text = "Add", onClick = { + if (newItem.isNotBlank()) { + viewModel.addItem(newItem) + newItem = "" + } + }) + } + + Spacer(modifier = Modifier.height(24.dp)) + + if (items.isEmpty()) { + Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { + Column(horizontalAlignment = Alignment.CenterHorizontally) { + Icon(Icons.Default.CheckCircle, contentDescription = null, modifier = Modifier.size(64.dp), tint = Sage500.copy(alpha = 0.4f)) + Text("Inbox Zero! Clear mind, clear focus.", color = Taupe500, style = MaterialTheme.typography.bodyLarge) + } + } + } else { + LazyColumn(verticalArrangement = Arrangement.spacedBy(12.dp)) { + items(items) { item -> + InboxProcessingCard( + item = item, + onToTask = { viewModel.processToTask(item, "task") }, + onToIdea = { viewModel.processToTask(item, "idea") }, + onArchive = { viewModel.archiveItem(item) } + ) + } + } + } + } +} + +@Composable +fun InboxProcessingCard( + item: InboxItem, + onToTask: () -> Unit, + onToIdea: () -> Unit, + onArchive: () -> Unit +) { + SoulsticeCard(modifier = Modifier.fillMaxWidth()) { + Column(modifier = Modifier.padding(16.dp)) { + Text(item.content, style = MaterialTheme.typography.titleMedium, color = Taupe900) + Spacer(modifier = Modifier.height(16.dp)) + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceBetween + ) { + IconButton(onClick = onToTask) { + Icon(Icons.Default.Assignment, contentDescription = "To Task", tint = Sage500) + } + IconButton(onClick = onToIdea) { + Icon(Icons.Default.Lightbulb, contentDescription = "To Idea", tint = Clay500) + } + IconButton(onClick = onArchive) { + Icon(Icons.Default.Archive, contentDescription = "Archive", tint = Taupe500) + } + } + } + } +} diff --git a/app/src/main/kotlin/com/soulstice/app/ui/screens/JournalScreen.kt b/app/src/main/kotlin/com/soulstice/app/ui/screens/JournalScreen.kt new file mode 100644 index 0000000..a12156b --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/ui/screens/JournalScreen.kt @@ -0,0 +1,98 @@ +package com.soulstice.app.ui.screens + +import androidx.compose.foundation.layout.* +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.items +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.Add +import androidx.compose.material3.* +import androidx.compose.runtime.* +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.hilt.navigation.compose.hiltViewModel +import com.soulstice.app.ui.components.SoulsticeButton +import com.soulstice.app.ui.components.SoulsticeCard +import com.soulstice.app.ui.components.SoulsticeInput +import com.soulstice.app.ui.theme.* +import com.soulstice.app.ui.viewmodel.JournalViewModel +import java.text.SimpleDateFormat +import java.util.Locale + +@Composable +fun JournalScreen( + viewModel: JournalViewModel = hiltViewModel() +) { + val entries by viewModel.allEntries.collectAsState(initial = emptyList()) + var showAddEntry by remember { mutableStateOf(false) } + var newContent by remember { mutableStateOf("") } + + Column( + modifier = Modifier + .fillMaxSize() + .padding(24.dp) + ) { + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically + ) { + Text("Daily Journal", style = MaterialTheme.typography.headlineLarge, color = Taupe900) + IconButton(onClick = { showAddEntry = true }) { + Icon(Icons.Default.Add, contentDescription = "New Entry", tint = Sage600) + } + } + Text("Reflection logs and win tracking.", color = Taupe500, fontSize = 14.sp) + + Spacer(modifier = Modifier.height(24.dp)) + + if (showAddEntry) { + SoulsticeCard(modifier = Modifier.fillMaxWidth()) { + Column(modifier = Modifier.padding(16.dp)) { + SoulsticeInput( + value = newContent, + onValueChange = { newContent = it }, + label = "How was your day?" + ) + Spacer(modifier = Modifier.height(16.dp)) + Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.End) { + TextButton(onClick = { showAddEntry = false }) { Text("Cancel") } + Button(onClick = { + if (newContent.isNotBlank()) { + viewModel.addEntry(newContent) + newContent = "" + showAddEntry = false + } + }) { Text("Save Entry") } + } + } + } + Spacer(modifier = Modifier.height(24.dp)) + } + + if (entries.isEmpty()) { + Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { + Text("No journal entries yet. Start reflecting!", color = Taupe500) + } + } else { + LazyColumn(verticalArrangement = Arrangement.spacedBy(16.dp)) { + items(entries) { entry -> + val dateStr = SimpleDateFormat("MMM dd, yyyy", Locale.getDefault()).format(entry.date) + SoulsticeCard(modifier = Modifier.fillMaxWidth()) { + Column(modifier = Modifier.padding(16.dp)) { + Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.SpaceBetween) { + Text(dateStr, color = Taupe500, fontSize = 12.sp) + if (entry.isWin) { + Text("🏆 Big Win", color = Clay500, fontSize = 12.sp, fontWeight = androidx.compose.ui.text.font.FontWeight.Bold) + } + } + Spacer(modifier = Modifier.height(8.dp)) + Text(entry.content, color = Taupe900) + } + } + } + } + } + } +} diff --git a/app/src/main/kotlin/com/soulstice/app/ui/screens/KnowledgeBaseScreen.kt b/app/src/main/kotlin/com/soulstice/app/ui/screens/KnowledgeBaseScreen.kt new file mode 100644 index 0000000..72f9f53 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/ui/screens/KnowledgeBaseScreen.kt @@ -0,0 +1,131 @@ +package com.soulstice.app.ui.screens + +import androidx.compose.foundation.layout.* +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.items +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.Add +import androidx.compose.material.icons.filled.Description +import androidx.compose.material.icons.filled.Link +import androidx.compose.material3.* +import androidx.compose.runtime.* +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.hilt.navigation.compose.hiltViewModel +import com.soulstice.app.ui.components.SoulsticeCard +import com.soulstice.app.ui.theme.* +import com.soulstice.app.ui.viewmodel.ResourceViewModel + +@Composable +fun KnowledgeBaseScreen( + viewModel: ResourceViewModel = hiltViewModel() +) { + val resources by viewModel.allResources.collectAsState(initial = emptyList()) + var showAddResource by remember { mutableStateOf(false) } + + if (showAddResource) { + AddResourceDialog( + onDismiss = { showAddResource = false }, + onAdd = { title, type, content, url -> + viewModel.addResource(title, type, content, url) + showAddResource = false + } + ) + } + + Column( + modifier = Modifier + .fillMaxSize() + .padding(24.dp) + ) { + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically + ) { + Text("Knowledge Base", style = MaterialTheme.typography.headlineLarge, color = Taupe900) + IconButton(onClick = { showAddResource = true }) { + Icon(Icons.Default.Add, contentDescription = "Add Resource", tint = Sage600) + } + } + Text("Information repository: Notes, Links, and Documents.", color = Taupe500, fontSize = 14.sp) + + Spacer(modifier = Modifier.height(24.dp)) + + if (resources.isEmpty()) { + Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { + Text("No resources found. Capture some wisdom!", color = Taupe500) + } + } else { + LazyColumn(verticalArrangement = Arrangement.spacedBy(16.dp)) { + items(resources.filter { it.type != "image" }) { resource -> + SoulsticeCard(modifier = Modifier.fillMaxWidth()) { + Row( + modifier = Modifier.padding(16.dp), + verticalAlignment = Alignment.CenterVertically + ) { + Icon( + imageVector = if (resource.type == "link") Icons.Default.Link else Icons.Default.Description, + contentDescription = null, + tint = Sage500 + ) + Spacer(modifier = Modifier.width(16.dp)) + Column { + Text(resource.title, style = MaterialTheme.typography.titleMedium, color = Taupe900) + if (!resource.content.isNullOrBlank()) { + Text(resource.content, color = Taupe500, fontSize = 12.sp, maxLines = 2) + } + if (!resource.url.isNullOrBlank()) { + Text(resource.url, color = Sage600, fontSize = 12.sp) + } + } + } + } + } + } + } + } +} + +@Composable +fun AddResourceDialog(onDismiss: () -> Unit, onAdd: (String, String, String?, String?) -> Unit) { + var title by remember { mutableStateOf("") } + var content by remember { mutableStateOf("") } + var url by remember { mutableStateOf("") } + var type by remember { mutableStateOf("note") } + + AlertDialog( + onDismissRequest = onDismiss, + title = { Text("New Resource") }, + text = { + Column { + TextField(value = title, onValueChange = { title = it }, label = { Text("Title") }) + Spacer(modifier = Modifier.height(8.dp)) + Row { + RadioButton(selected = type == "note", onClick = { type = "note" }) + Text("Note", modifier = Modifier.align(Alignment.CenterVertically)) + Spacer(modifier = Modifier.width(16.dp)) + RadioButton(selected = type == "link", onClick = { type = "link" }) + Text("Link", modifier = Modifier.align(Alignment.CenterVertically)) + } + if (type == "note") { + TextField(value = content, onValueChange = { content = it }, label = { Text("Content") }) + } else { + TextField(value = url, onValueChange = { url = it }, label = { Text("URL") }) + } + } + }, + confirmButton = { + Button(onClick = { if (title.isNotBlank()) onAdd(title, type, content, url) }) { + Text("Add") + } + }, + dismissButton = { + TextButton(onClick = onDismiss) { + Text("Cancel") + } + } + ) +} diff --git a/app/src/main/kotlin/com/soulstice/app/ui/screens/ProjectDetailScreen.kt b/app/src/main/kotlin/com/soulstice/app/ui/screens/ProjectDetailScreen.kt new file mode 100644 index 0000000..910f585 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/ui/screens/ProjectDetailScreen.kt @@ -0,0 +1,121 @@ +package com.soulstice.app.ui.screens + +import androidx.compose.foundation.background +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.* +import androidx.compose.foundation.lazy.* +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material3.* +import androidx.compose.runtime.* +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.graphics.StrokeCap +import androidx.compose.ui.graphics.drawscope.Stroke +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.hilt.navigation.compose.hiltViewModel +import com.soulstice.app.data.local.entities.Task +import com.soulstice.app.ui.components.SoulsticeCard +import com.soulstice.app.ui.theme.* +import com.soulstice.app.ui.viewmodel.ProjectViewModel + +@Composable +fun ProjectDetailScreen( + projectId: String, + viewModel: ProjectViewModel = hiltViewModel() +) { + val statsList by viewModel.projectsWithStats.collectAsState(initial = emptyList()) + val stats = statsList.find { it.project.id == projectId } + + if (stats == null) { + Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { + CircularProgressIndicator(color = Sage500) + } + return + } + + Column( + modifier = Modifier + .fillMaxSize() + .padding(16.dp) + ) { + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically + ) { + Column(modifier = Modifier.weight(1f)) { + Text(stats.project.name, style = MaterialTheme.typography.headlineMedium, color = Taupe900) + Text(stats.project.description ?: "", color = Taupe500, fontSize = 14.sp) + } + ProjectProgressRing(progress = stats.progress) + } + + Spacer(modifier = Modifier.height(24.dp)) + + Text("Kanban Board", style = MaterialTheme.typography.titleLarge, color = Taupe900) + Spacer(modifier = Modifier.height(16.dp)) + + Row( + modifier = Modifier.fillMaxWidth().weight(1f), + horizontalArrangement = Arrangement.spacedBy(16.dp) + ) { + KanbanColumn("To Do", stats.tasks.filter { it.status == "todo" }, modifier = Modifier.weight(1f)) { task -> + viewModel.updateTaskStatus(task, "in_progress") + } + KanbanColumn("In Progress", stats.tasks.filter { it.status == "in_progress" }, modifier = Modifier.weight(1f)) { task -> + viewModel.updateTaskStatus(task, "done") + } + KanbanColumn("Done", stats.tasks.filter { it.status == "done" }, modifier = Modifier.weight(1f)) { task -> + viewModel.updateTaskStatus(task, "todo") + } + } + } +} + +@Composable +fun ProjectProgressRing(progress: Float) { + Box(contentAlignment = Alignment.Center, modifier = Modifier.size(64.dp)) { + androidx.compose.foundation.Canvas(modifier = Modifier.size(64.dp)) { + drawCircle( + color = Taupe100, + style = Stroke(width = 6.dp.toPx()) + ) + drawArc( + color = Sage500, + startAngle = -90f, + sweepAngle = 360f * progress, + useCenter = false, + style = Stroke(width = 6.dp.toPx(), cap = StrokeCap.Round) + ) + } + Text("${(progress * 100).toInt()}%", fontSize = 12.sp, fontWeight = FontWeight.Bold, color = Taupe900) + } +} + +@Composable +fun KanbanColumn(title: String, tasks: List, modifier: Modifier = Modifier, onTaskClick: (Task) -> Unit) { + Column(modifier = modifier) { + Text(title, style = MaterialTheme.typography.titleSmall, color = Taupe500) + Spacer(modifier = Modifier.height(8.dp)) + LazyColumn( + modifier = Modifier + .fillMaxSize() + .background(Taupe50, RoundedCornerShape(8.dp)) + .padding(8.dp), + verticalArrangement = Arrangement.spacedBy(8.dp) + ) { + items(tasks) { task -> + SoulsticeCard( + modifier = Modifier.fillMaxWidth().clickable { onTaskClick(task) } + ) { + Text(task.title, modifier = Modifier.padding(12.dp), fontSize = 12.sp, color = Taupe900) + } + } + } + } +} diff --git a/app/src/main/kotlin/com/soulstice/app/ui/screens/ProjectsScreen.kt b/app/src/main/kotlin/com/soulstice/app/ui/screens/ProjectsScreen.kt new file mode 100644 index 0000000..d372285 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/ui/screens/ProjectsScreen.kt @@ -0,0 +1,128 @@ +package com.soulstice.app.ui.screens + +import androidx.compose.foundation.background +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.* +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.items +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.Add +import androidx.compose.material3.* +import androidx.compose.runtime.* +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.hilt.navigation.compose.hiltViewModel +import com.soulstice.app.data.local.entities.Project +import com.soulstice.app.ui.components.SoulsticeButton +import com.soulstice.app.ui.components.SoulsticeCard +import com.soulstice.app.ui.components.SoulsticeProgressBar +import com.soulstice.app.ui.theme.* +import com.soulstice.app.ui.viewmodel.ProjectViewModel + +@Composable +fun ProjectsScreen( + onProjectClick: (String) -> Unit, + viewModel: ProjectViewModel = hiltViewModel() +) { + val projectsWithStats by viewModel.projectsWithStats.collectAsState(initial = emptyList()) + var showAddProject by remember { mutableStateOf(false) } + + if (showAddProject) { + AddProjectDialog( + onDismiss = { showAddProject = false }, + onAdd = { name, desc -> + viewModel.addProject(name, desc, null) + showAddProject = false + } + ) + } + + Column( + modifier = Modifier + .fillMaxSize() + .padding(24.dp) + ) { + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically + ) { + Text("Projects", style = MaterialTheme.typography.headlineLarge, color = Taupe900) + IconButton(onClick = { showAddProject = true }) { + Icon(Icons.Default.Add, contentDescription = "Add Project", tint = Sage600) + } + } + + Spacer(modifier = Modifier.height(24.dp)) + + if (projectsWithStats.isEmpty()) { + Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) { + Text("No projects yet. Start by defining a big goal!", color = Taupe500) + } + } else { + LazyColumn(verticalArrangement = Arrangement.spacedBy(16.dp)) { + items(projectsWithStats) { stats -> + SoulsticeCard( + modifier = Modifier + .fillMaxWidth() + .clickable { onProjectClick(stats.project.id) } + ) { + Column(modifier = Modifier.padding(16.dp)) { + Row( + modifier = Modifier.fillMaxWidth(), + horizontalArrangement = Arrangement.SpaceBetween, + verticalAlignment = Alignment.CenterVertically + ) { + Text(stats.project.name, style = MaterialTheme.typography.titleMedium, color = Taupe900) + Box( + modifier = Modifier + .clip(RoundedCornerShape(4.dp)) + .background(Sage100) + .padding(horizontal = 8.dp, vertical = 4.dp) + ) { + Text(stats.project.status.capitalize(), color = Sage700, fontSize = 10.sp) + } + } + Spacer(modifier = Modifier.height(12.dp)) + SoulsticeProgressBar(progress = stats.progress) + Spacer(modifier = Modifier.height(8.dp)) + Text("${(stats.progress * 100).toInt()}% Complete", color = Taupe500, fontSize = 12.sp) + } + } + } + } + } + } +} + +@Composable +fun AddProjectDialog(onDismiss: () -> Unit, onAdd: (String, String) -> Unit) { + var name by remember { mutableStateOf("") } + var desc by remember { mutableStateOf("") } + + AlertDialog( + onDismissRequest = onDismiss, + title = { Text("New Project") }, + text = { + Column { + TextField(value = name, onValueChange = { name = it }, label = { Text("Project Name") }) + Spacer(modifier = Modifier.height(8.dp)) + TextField(value = desc, onValueChange = { desc = it }, label = { Text("Description") }) + } + }, + confirmButton = { + Button(onClick = { if (name.isNotBlank()) onAdd(name, desc) }) { + Text("Create") + } + }, + dismissButton = { + TextButton(onClick = onDismiss) { + Text("Cancel") + } + } + ) +} diff --git a/app/src/main/kotlin/com/soulstice/app/ui/screens/ReviewScreen.kt b/app/src/main/kotlin/com/soulstice/app/ui/screens/ReviewScreen.kt new file mode 100644 index 0000000..e762090 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/ui/screens/ReviewScreen.kt @@ -0,0 +1,172 @@ +package com.soulstice.app.ui.screens + +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.* +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.lazy.items +import androidx.compose.foundation.shape.CircleShape +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.filled.AutoAwesome +import androidx.compose.material3.* +import androidx.compose.runtime.* +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.text.style.TextAlign +import androidx.compose.ui.unit.dp +import androidx.hilt.navigation.compose.hiltViewModel +import com.soulstice.app.ui.components.SoulsticeButton +import com.soulstice.app.ui.components.SoulsticeCard +import androidx.compose.ui.unit.sp +import com.soulstice.app.ui.components.SoulsticeInput +import com.soulstice.app.ui.theme.* +import com.soulstice.app.ui.viewmodel.DashboardViewModel +import com.soulstice.app.ui.viewmodel.InboxViewModel +import com.soulstice.app.ui.viewmodel.JournalViewModel + +@Composable +fun ReviewScreen( + journalViewModel: JournalViewModel = hiltViewModel(), + dashboardViewModel: DashboardViewModel = hiltViewModel(), + inboxViewModel: InboxViewModel = hiltViewModel() +) { + var step by remember { mutableIntStateOf(1) } + var reflection by remember { mutableStateOf("") } + val incompleteTasks by dashboardViewModel.allActiveTasks.collectAsState(initial = emptyList()) + val inboxItems by inboxViewModel.inboxItems.collectAsState(initial = emptyList()) + + Column( + modifier = Modifier + .fillMaxSize() + .padding(24.dp) + ) { + // Progress Bar + LinearProgressIndicator( + progress = step / 4f, + modifier = Modifier.fillMaxWidth().height(4.dp).clip(CircleShape), + color = Sage500, + trackColor = Taupe100 + ) + Spacer(modifier = Modifier.height(32.dp)) + + when (step) { + 1 -> { + Text("1. Task Rollover", style = MaterialTheme.typography.headlineLarge, color = Taupe900) + Text("${incompleteTasks.size} tasks were not completed. Move them to tomorrow?", color = Taupe500, modifier = Modifier.padding(top = 8.dp)) + + Spacer(modifier = Modifier.height(32.dp)) + + if (incompleteTasks.isEmpty()) { + Text("All tasks completed! Great job.", color = Sage500) + } else { + LazyColumn( + modifier = Modifier.weight(1f), + verticalArrangement = Arrangement.spacedBy(12.dp) + ) { + items(incompleteTasks) { task -> + RolloverTaskItem(task.title) + } + } + } + + Spacer(modifier = Modifier.height(32.dp)) + + SoulsticeButton( + text = if (incompleteTasks.isEmpty()) "Continue" else "Rollover All", + onClick = { step = 2 }, + modifier = Modifier.fillMaxWidth() + ) + } + 2 -> { + Text("2. Inbox Zero", style = MaterialTheme.typography.headlineLarge, color = Taupe900) + Text("Clear your holding pen for a fresh start tomorrow.", color = Taupe500, modifier = Modifier.padding(top = 8.dp)) + + Spacer(modifier = Modifier.height(32.dp)) + + SoulsticeCard(modifier = Modifier.fillMaxWidth()) { + Column(modifier = Modifier.padding(24.dp), horizontalAlignment = Alignment.CenterHorizontally) { + Text("📬 ${inboxItems.size} items in Inbox", style = MaterialTheme.typography.titleLarge, color = Taupe900) + if (inboxItems.isNotEmpty()) { + Spacer(modifier = Modifier.height(16.dp)) + Text("Process them in the Inbox screen.", color = Taupe500, fontSize = 14.sp) + } + } + } + + Spacer(modifier = Modifier.height(32.dp)) + + Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(16.dp)) { + SoulsticeButton(text = "Back", onClick = { step = 1 }, variant = "outline", modifier = Modifier.weight(1f)) + SoulsticeButton(text = "Continue", onClick = { step = 3 }, modifier = Modifier.weight(1f)) + } + } + 3 -> { + Text("3. Daily Reflection", style = MaterialTheme.typography.headlineLarge, color = Taupe900) + Text("What was your biggest win today?", color = Taupe500, modifier = Modifier.padding(top = 8.dp)) + + Spacer(modifier = Modifier.height(32.dp)) + + SoulsticeCard(modifier = Modifier.fillMaxWidth()) { + Column(modifier = Modifier.padding(16.dp)) { + SoulsticeInput(value = reflection, onValueChange = { reflection = it }, label = "Journal your win...") + } + } + + Spacer(modifier = Modifier.height(32.dp)) + + Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(16.dp)) { + SoulsticeButton(text = "Back", onClick = { step = 2 }, variant = "outline", modifier = Modifier.weight(1f)) + SoulsticeButton(text = "Complete Shutdown", onClick = { + if (reflection.isNotBlank()) { + journalViewModel.addEntry(reflection, isWin = true) + } + step = 4 + }, modifier = Modifier.weight(1f)) + } + } + 4 -> { + Column( + modifier = Modifier.fillMaxSize(), + horizontalAlignment = Alignment.CenterHorizontally, + verticalArrangement = Arrangement.Center + ) { + Box( + modifier = Modifier + .size(120.dp) + .clip(CircleShape) + .background(Sage100), + contentAlignment = Alignment.Center + ) { + ReviewIcon(Icons.Default.AutoAwesome, contentDescription = null, size = 64.dp, tint = Sage600) + } + + Spacer(modifier = Modifier.height(32.dp)) + + Text("All Set!", style = MaterialTheme.typography.headlineLarge, color = Taupe900) + Text( + "You've cleared your mind. Enjoy your evening and see you tomorrow.", + color = Taupe500, + textAlign = TextAlign.Center, + modifier = Modifier.padding(horizontal = 24.dp, vertical = 8.dp) + ) + + Spacer(modifier = Modifier.height(32.dp)) + + SoulsticeButton(text = "Finish Review", onClick = { step = 1 }, modifier = Modifier.fillMaxWidth()) + } + } + } + } +} + +@Composable +private fun ReviewIcon(imageVector: androidx.compose.ui.graphics.vector.ImageVector, contentDescription: String?, size: androidx.compose.ui.unit.Dp, tint: androidx.compose.ui.graphics.Color) { + androidx.compose.material3.Icon(imageVector, contentDescription, modifier = Modifier.size(size), tint = tint) +} + +@Composable +fun RolloverTaskItem(title: String) { + SoulsticeCard(modifier = Modifier.fillMaxWidth(), containerColor = Clay50) { + Text(title, modifier = Modifier.padding(16.dp), color = Clay800) + } +} diff --git a/app/src/main/kotlin/com/soulstice/app/ui/screens/SettingsScreen.kt b/app/src/main/kotlin/com/soulstice/app/ui/screens/SettingsScreen.kt new file mode 100644 index 0000000..c822344 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/ui/screens/SettingsScreen.kt @@ -0,0 +1,90 @@ +package com.soulstice.app.ui.screens + +import androidx.compose.foundation.layout.* +import androidx.compose.material3.* +import androidx.compose.runtime.* +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import androidx.hilt.navigation.compose.hiltViewModel +import com.soulstice.app.ui.components.SoulsticeButton +import com.soulstice.app.ui.components.SoulsticeCard +import com.soulstice.app.ui.theme.* +import com.soulstice.app.ui.viewmodel.SettingsViewModel + +@Composable +fun SettingsScreen( + viewModel: SettingsViewModel = hiltViewModel() +) { + val pomodoroDuration by viewModel.pomodoroDuration.collectAsState(initial = 25) + val theme by viewModel.theme.collectAsState(initial = "Light") + + Column( + modifier = Modifier + .fillMaxSize() + .padding(24.dp) + ) { + Text("Settings", style = MaterialTheme.typography.headlineLarge, color = Taupe900) + Spacer(modifier = Modifier.height(24.dp)) + + Text("Preferences", style = MaterialTheme.typography.titleLarge, color = Taupe900) + Spacer(modifier = Modifier.height(16.dp)) + + SoulsticeCard(modifier = Modifier.fillMaxWidth()) { + Column(modifier = Modifier.padding(16.dp)) { + Text("Theme", fontWeight = androidx.compose.ui.text.font.FontWeight.Bold, color = Taupe900) + Row(verticalAlignment = Alignment.CenterVertically) { + RadioButton(selected = theme == "Light", onClick = { viewModel.setTheme("Light") }) + Text("Light") + Spacer(modifier = Modifier.width(16.dp)) + RadioButton(selected = theme == "Dark", onClick = { viewModel.setTheme("Dark") }) + Text("Dark") + } + } + } + + Spacer(modifier = Modifier.height(16.dp)) + + SoulsticeCard(modifier = Modifier.fillMaxWidth()) { + Column(modifier = Modifier.padding(16.dp)) { + Text("Pomodoro Focus (minutes)", fontWeight = androidx.compose.ui.text.font.FontWeight.Bold, color = Taupe900) + Slider( + value = pomodoroDuration.toFloat(), + onValueChange = { viewModel.setPomodoroDuration(it.toInt()) }, + valueRange = 5f..60f, + steps = 11 + ) + Text("$pomodoroDuration minutes", color = Taupe500) + } + } + + Spacer(modifier = Modifier.height(32.dp)) + + Text("Data Management", style = MaterialTheme.typography.titleLarge, color = Taupe900) + Spacer(modifier = Modifier.height(16.dp)) + + SoulsticeButton( + text = "Export Data (Logcat)", + onClick = { viewModel.exportData() }, + variant = "outline", + modifier = Modifier.fillMaxWidth() + ) + Spacer(modifier = Modifier.height(12.dp)) + SoulsticeButton( + text = "Import Data (Sample)", + onClick = { viewModel.importData("{}") }, + variant = "outline", + modifier = Modifier.fillMaxWidth() + ) + Spacer(modifier = Modifier.height(24.dp)) + + Button( + onClick = { viewModel.resetDatabase() }, + colors = ButtonDefaults.buttonColors(containerColor = Clay500), + modifier = Modifier.fillMaxWidth() + ) { + Text("Reset Database", color = androidx.compose.ui.graphics.Color.White) + } + } +} diff --git a/app/src/main/kotlin/com/soulstice/app/ui/screens/UserGuideScreen.kt b/app/src/main/kotlin/com/soulstice/app/ui/screens/UserGuideScreen.kt new file mode 100644 index 0000000..57e3dbc --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/ui/screens/UserGuideScreen.kt @@ -0,0 +1,21 @@ +package com.soulstice.app.ui.screens + +import androidx.compose.foundation.layout.* +import androidx.compose.material3.* +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.unit.dp +import com.soulstice.app.ui.theme.Taupe900 + +@Composable +fun UserGuideScreen() { + Column( + modifier = Modifier + .fillMaxSize() + .padding(24.dp) + ) { + Text("User Guide", style = MaterialTheme.typography.headlineLarge, color = Taupe900) + Spacer(modifier = Modifier.height(16.dp)) + Text("SOP Documentation and system usage guides.") + } +} diff --git a/app/src/main/kotlin/com/soulstice/app/ui/theme/Color.kt b/app/src/main/kotlin/com/soulstice/app/ui/theme/Color.kt new file mode 100644 index 0000000..a6f76b3 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/ui/theme/Color.kt @@ -0,0 +1,18 @@ +package com.soulstice.app.ui.theme + +import androidx.compose.ui.graphics.Color + +val Sage50 = Color(0xFFF4F7F4) +val Sage100 = Color(0xFFE5EBE5) +val Sage500 = Color(0xFF688667) +val Sage600 = Color(0xFF516A50) +val Sage700 = Color(0xFF425541) + +val Clay50 = Color(0xFFFDF8F5) +val Clay500 = Color(0xFFD2691E) +val Clay800 = Color(0xFF813C18) + +val Taupe50 = Color(0xFFF7F6F5) +val Taupe100 = Color(0xFFECEAE6) +val Taupe500 = Color(0xFF847364) +val Taupe900 = Color(0xFF413833) diff --git a/app/src/main/kotlin/com/soulstice/app/ui/theme/Theme.kt b/app/src/main/kotlin/com/soulstice/app/ui/theme/Theme.kt new file mode 100644 index 0000000..af0b7e3 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/ui/theme/Theme.kt @@ -0,0 +1,46 @@ +package com.soulstice.app.ui.theme + +import androidx.compose.foundation.isSystemInDarkTheme +import androidx.compose.material3.* +import androidx.compose.runtime.Composable +import androidx.compose.ui.graphics.Color + +private val LightColorScheme = lightColorScheme( + primary = Sage600, + secondary = Clay500, + tertiary = Taupe500, + background = Sage50, + surface = Color.White, + onPrimary = Color.White, + onSecondary = Color.White, + onTertiary = Color.White, + onBackground = Taupe900, + onSurface = Taupe900, +) + +private val DarkColorScheme = darkColorScheme( + primary = Sage500, + secondary = Clay500, + tertiary = Taupe500, + background = Color(0xFF1A1C1A), + surface = Color(0xFF121412), + onPrimary = Color.White, + onSecondary = Color.White, + onTertiary = Color.White, + onBackground = Sage50, + onSurface = Sage50, +) + +@Composable +fun SoulsticeTheme( + darkTheme: Boolean = isSystemInDarkTheme(), + content: @Composable () -> Unit +) { + val colorScheme = if (darkTheme) DarkColorScheme else LightColorScheme + + MaterialTheme( + colorScheme = colorScheme, + typography = Typography, + content = content + ) +} diff --git a/app/src/main/kotlin/com/soulstice/app/ui/theme/Type.kt b/app/src/main/kotlin/com/soulstice/app/ui/theme/Type.kt new file mode 100644 index 0000000..5c4c224 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/ui/theme/Type.kt @@ -0,0 +1,38 @@ +package com.soulstice.app.ui.theme + +import androidx.compose.material3.Typography +import androidx.compose.ui.text.TextStyle +import androidx.compose.ui.text.font.FontFamily +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.sp + +val Typography = Typography( + bodyLarge = TextStyle( + fontFamily = FontFamily.Default, + fontWeight = FontWeight.Normal, + fontSize = 16.sp, + lineHeight = 24.sp, + letterSpacing = 0.5.sp + ), + headlineLarge = TextStyle( + fontFamily = FontFamily.Serif, + fontWeight = FontWeight.Bold, + fontSize = 32.sp, + lineHeight = 40.sp, + letterSpacing = 0.sp + ), + headlineMedium = TextStyle( + fontFamily = FontFamily.Serif, + fontWeight = FontWeight.Bold, + fontSize = 28.sp, + lineHeight = 36.sp, + letterSpacing = 0.sp + ), + titleLarge = TextStyle( + fontFamily = FontFamily.Default, + fontWeight = FontWeight.SemiBold, + fontSize = 22.sp, + lineHeight = 28.sp, + letterSpacing = 0.sp + ) +) diff --git a/app/src/main/kotlin/com/soulstice/app/ui/viewmodel/DashboardViewModel.kt b/app/src/main/kotlin/com/soulstice/app/ui/viewmodel/DashboardViewModel.kt new file mode 100644 index 0000000..e9348b6 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/ui/viewmodel/DashboardViewModel.kt @@ -0,0 +1,67 @@ +package com.soulstice.app.ui.viewmodel + +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import com.soulstice.app.data.local.PreferenceManager +import com.soulstice.app.data.local.dao.SoulsticeDao +import com.soulstice.app.data.local.entities.Task +import dagger.hilt.android.lifecycle.HiltViewModel +import kotlinx.coroutines.ExperimentalCoroutinesApi +import kotlinx.coroutines.flow.* +import kotlinx.coroutines.launch +import javax.inject.Inject + +@OptIn(ExperimentalCoroutinesApi::class) +@HiltViewModel +class DashboardViewModel @Inject constructor( + private val dao: SoulsticeDao, + private val preferenceManager: PreferenceManager +) : ViewModel() { + + val energyLevel = preferenceManager.energyLevel + + val activeTasks = energyLevel.flatMapLatest { level -> + dao.getActiveTasksByEnergy(level) + } + + val allActiveTasks = dao.getActiveTasks() + + val todayTasks = dao.getAllTasks().map { tasks -> + val today = System.currentTimeMillis() // Simple today check, should ideally be start/end of day + tasks.filter { it.dueDate != null && it.dueDate!! <= today && it.status != "done" } + } + + val incubatorIdeas = dao.getTasksByType("idea") + + val businessLeads = dao.getAllClients() + + val globalProgress = dao.getAllTasks().map { tasks -> + if (tasks.isEmpty()) 0f + else tasks.count { it.status == "done" }.toFloat() / tasks.size + } + + val velocity = dao.getAllTasks().map { tasks -> + val now = System.currentTimeMillis() + val dayMillis = 24 * 60 * 60 * 1000L + val last7Days = (0..6).map { i -> + val start = (now / dayMillis - i) * dayMillis + val end = start + dayMillis + tasks.count { it.status == "done" && it.createdAt >= start && it.createdAt < end } + }.reversed() + last7Days + } + + val averageVelocity = velocity.map { it.average().toFloat() } + + fun toggleEnergy() { + viewModelScope.launch { + preferenceManager.toggleEnergy() + } + } + + fun completeTask(task: Task) { + viewModelScope.launch { + dao.insertTask(task.copy(status = "done")) + } + } +} diff --git a/app/src/main/kotlin/com/soulstice/app/ui/viewmodel/FocusViewModel.kt b/app/src/main/kotlin/com/soulstice/app/ui/viewmodel/FocusViewModel.kt new file mode 100644 index 0000000..ccc5b20 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/ui/viewmodel/FocusViewModel.kt @@ -0,0 +1,96 @@ +package com.soulstice.app.ui.viewmodel + +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import com.soulstice.app.data.local.PreferenceManager +import com.soulstice.app.data.local.dao.SoulsticeDao +import com.soulstice.app.data.local.entities.FocusSession +import dagger.hilt.android.lifecycle.HiltViewModel +import kotlinx.coroutines.Job +import kotlinx.coroutines.delay +import kotlinx.coroutines.flow.* +import kotlinx.coroutines.launch +import java.util.UUID +import javax.inject.Inject + +@HiltViewModel +class FocusViewModel @Inject constructor( + private val dao: SoulsticeDao, + private val preferenceManager: PreferenceManager +) : ViewModel() { + + private val _timeLeft = MutableStateFlow(25 * 60 * 1000L) + val timeLeft: StateFlow = _timeLeft + + private val _isRunning = MutableStateFlow(false) + val isRunning: StateFlow = _isRunning + + val pomodoroDuration = preferenceManager.pomodoroDuration + + val sessionsToday = dao.getFocusSessionCountForDay(getStartOfToday()) + + private var timerJob: Job? = null + + init { + viewModelScope.launch { + preferenceManager.pomodoroDuration.collectLatest { minutes -> + if (!_isRunning.value) { + _timeLeft.value = minutes * 60 * 1000L + } + } + } + } + + fun toggleTimer() { + if (_isRunning.value) { + stopTimer() + } else { + startTimer() + } + } + + private fun startTimer() { + _isRunning.value = true + timerJob = viewModelScope.launch { + while (_timeLeft.value > 0) { + delay(1000L) + _timeLeft.value -= 1000L + } + onTimerFinished() + } + } + + private fun stopTimer() { + _isRunning.value = false + timerJob?.cancel() + } + + fun resetTimer() { + stopTimer() + viewModelScope.launch { + val minutes = preferenceManager.pomodoroDuration.first() + _timeLeft.value = minutes * 60 * 1000L + } + } + + private fun onTimerFinished() { + stopTimer() + viewModelScope.launch { + val minutes = preferenceManager.pomodoroDuration.first() + val duration = minutes * 60 * 1000L + val session = FocusSession( + id = UUID.randomUUID().toString(), + duration = duration, + mode = "work", + date = System.currentTimeMillis(), + createdAt = System.currentTimeMillis() + ) + dao.insertFocusSession(session) + } + resetTimer() + } + + private fun getStartOfToday(): Long { + return (System.currentTimeMillis() / (24 * 60 * 60 * 1000)) * (24 * 60 * 60 * 1000) + } +} diff --git a/app/src/main/kotlin/com/soulstice/app/ui/viewmodel/HabitViewModel.kt b/app/src/main/kotlin/com/soulstice/app/ui/viewmodel/HabitViewModel.kt new file mode 100644 index 0000000..ed502f2 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/ui/viewmodel/HabitViewModel.kt @@ -0,0 +1,72 @@ +package com.soulstice.app.ui.viewmodel + +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import com.soulstice.app.data.local.dao.SoulsticeDao +import com.soulstice.app.data.local.entities.Habit +import com.soulstice.app.data.local.entities.HabitCompletion +import dagger.hilt.android.lifecycle.HiltViewModel +import kotlinx.coroutines.flow.* +import kotlinx.coroutines.launch +import java.util.UUID +import javax.inject.Inject + +@HiltViewModel +class HabitViewModel @Inject constructor( + private val dao: SoulsticeDao +) : ViewModel() { + + data class HabitWithStatus( + val habit: Habit, + val isCompletedToday: Boolean, + val streak: Int + ) + + val habitsWithStatus = combine(dao.getAllHabits(), dao.getAllTasks()) { habits, tasks -> + // This is a simplification, ideally we use HabitCompletion table + habits.map { habit -> + // For now, use the streak field in Habit entity, but in real app we'd calculate from completions + HabitWithStatus(habit, habit.lastCompleted != null && isToday(habit.lastCompleted), habit.streak) + } + } + + fun addHabit(title: String, category: String) { + viewModelScope.launch { + val habit = Habit( + id = UUID.randomUUID().toString(), + title = title, + frequency = "daily", + streak = 0, + lastCompleted = null, + createdAt = System.currentTimeMillis() + ) + dao.insertHabit(habit) + } + } + + fun completeHabit(habit: Habit) { + viewModelScope.launch { + val now = System.currentTimeMillis() + if (habit.lastCompleted != null && isToday(habit.lastCompleted)) return@launch + + val newStreak = if (habit.lastCompleted != null && isYesterday(habit.lastCompleted)) habit.streak + 1 else 1 + dao.insertHabit(habit.copy(lastCompleted = now, streak = newStreak)) + + dao.insertHabitCompletion(HabitCompletion( + id = UUID.randomUUID().toString(), + habitId = habit.id, + date = now, + createdAt = now + )) + } + } + + private fun isToday(timestamp: Long): Boolean { + // Simple day check + return (System.currentTimeMillis() / (24 * 60 * 60 * 1000)) == (timestamp / (24 * 60 * 60 * 1000)) + } + + private fun isYesterday(timestamp: Long): Boolean { + return (System.currentTimeMillis() / (24 * 60 * 60 * 1000)) - 1 == (timestamp / (24 * 60 * 60 * 1000)) + } +} diff --git a/app/src/main/kotlin/com/soulstice/app/ui/viewmodel/InboxViewModel.kt b/app/src/main/kotlin/com/soulstice/app/ui/viewmodel/InboxViewModel.kt new file mode 100644 index 0000000..50fce58 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/ui/viewmodel/InboxViewModel.kt @@ -0,0 +1,63 @@ +package com.soulstice.app.ui.viewmodel + +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import com.soulstice.app.data.local.dao.SoulsticeDao +import com.soulstice.app.data.local.entities.InboxItem +import com.soulstice.app.data.local.entities.Task +import dagger.hilt.android.lifecycle.HiltViewModel +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.launch +import java.util.UUID +import javax.inject.Inject + +@HiltViewModel +class InboxViewModel @Inject constructor( + private val dao: SoulsticeDao +) : ViewModel() { + + val inboxItems: Flow> = dao.getUnprocessedInboxItems() + + fun addItem(content: String) { + viewModelScope.launch { + val item = InboxItem( + id = UUID.randomUUID().toString(), + content = content, + status = "unprocessed", + createdAt = System.currentTimeMillis() + ) + dao.insertInboxItem(item) + } + } + + fun processToTask(item: InboxItem, type: String = "task") { + viewModelScope.launch { + val task = Task( + id = UUID.randomUUID().toString(), + title = item.content, + description = null, + status = "todo", + type = type, + priority = "medium", + energy = "high", + projectId = null, + dueDate = null, + createdAt = System.currentTimeMillis() + ) + dao.insertTask(task) + dao.updateInboxItem(item.copy(status = "processed")) + } + } + + fun archiveItem(item: InboxItem) { + viewModelScope.launch { + dao.updateInboxItem(item.copy(status = "processed")) + } + } + + fun deleteItem(item: InboxItem) { + viewModelScope.launch { + dao.deleteInboxItem(item) + } + } +} diff --git a/app/src/main/kotlin/com/soulstice/app/ui/viewmodel/JournalViewModel.kt b/app/src/main/kotlin/com/soulstice/app/ui/viewmodel/JournalViewModel.kt new file mode 100644 index 0000000..2c0651c --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/ui/viewmodel/JournalViewModel.kt @@ -0,0 +1,33 @@ +package com.soulstice.app.ui.viewmodel + +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import com.soulstice.app.data.local.dao.SoulsticeDao +import com.soulstice.app.data.local.entities.JournalEntry +import dagger.hilt.android.lifecycle.HiltViewModel +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.launch +import java.util.UUID +import javax.inject.Inject + +@HiltViewModel +class JournalViewModel @Inject constructor( + private val dao: SoulsticeDao +) : ViewModel() { + + val allEntries = dao.getAllJournalEntries() + + fun addEntry(content: String, isWin: Boolean = false, projectId: String? = null) { + viewModelScope.launch { + val entry = JournalEntry( + id = UUID.randomUUID().toString(), + content = content, + date = System.currentTimeMillis(), + projectId = projectId, + isWin = isWin, + createdAt = System.currentTimeMillis() + ) + dao.insertJournalEntry(entry) + } + } +} diff --git a/app/src/main/kotlin/com/soulstice/app/ui/viewmodel/MainViewModel.kt b/app/src/main/kotlin/com/soulstice/app/ui/viewmodel/MainViewModel.kt new file mode 100644 index 0000000..ee1d12e --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/ui/viewmodel/MainViewModel.kt @@ -0,0 +1,13 @@ +package com.soulstice.app.ui.viewmodel + +import androidx.lifecycle.ViewModel +import com.soulstice.app.data.local.PreferenceManager +import dagger.hilt.android.lifecycle.HiltViewModel +import javax.inject.Inject + +@HiltViewModel +class MainViewModel @Inject constructor( + private val preferenceManager: PreferenceManager +) : ViewModel() { + val theme = preferenceManager.theme +} diff --git a/app/src/main/kotlin/com/soulstice/app/ui/viewmodel/ProjectViewModel.kt b/app/src/main/kotlin/com/soulstice/app/ui/viewmodel/ProjectViewModel.kt new file mode 100644 index 0000000..88b26bf --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/ui/viewmodel/ProjectViewModel.kt @@ -0,0 +1,61 @@ +package com.soulstice.app.ui.viewmodel + +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import com.soulstice.app.data.local.dao.SoulsticeDao +import com.soulstice.app.data.local.entities.Project +import com.soulstice.app.data.local.entities.Task +import dagger.hilt.android.lifecycle.HiltViewModel +import kotlinx.coroutines.flow.* +import kotlinx.coroutines.launch +import java.util.UUID +import javax.inject.Inject + +@HiltViewModel +class ProjectViewModel @Inject constructor( + private val dao: SoulsticeDao +) : ViewModel() { + + val projects = dao.getAllProjects() + + data class ProjectWithStats( + val project: Project, + val progress: Float, + val tasks: List + ) + + val projectsWithStats = combine(dao.getAllProjects(), dao.getAllTasks()) { projects, tasks -> + projects.map { project -> + val projectTasks = tasks.filter { it.projectId == project.id } + val progress = if (projectTasks.isEmpty()) 0f + else projectTasks.count { it.status == "done" }.toFloat() / projectTasks.size + ProjectWithStats(project, progress, projectTasks) + } + } + + fun addProject(name: String, description: String?, colorCode: String?) { + viewModelScope.launch { + val project = Project( + id = UUID.randomUUID().toString(), + name = name, + description = description, + colorCode = colorCode, + status = "active", + createdAt = System.currentTimeMillis() + ) + dao.insertProject(project) + } + } + + fun updateTaskStatus(task: Task, newStatus: String) { + viewModelScope.launch { + dao.insertTask(task.copy(status = newStatus)) + } + } + + fun deleteProject(project: Project) { + viewModelScope.launch { + dao.deleteProject(project) + } + } +} diff --git a/app/src/main/kotlin/com/soulstice/app/ui/viewmodel/ResourceViewModel.kt b/app/src/main/kotlin/com/soulstice/app/ui/viewmodel/ResourceViewModel.kt new file mode 100644 index 0000000..aea9b82 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/ui/viewmodel/ResourceViewModel.kt @@ -0,0 +1,50 @@ +package com.soulstice.app.ui.viewmodel + +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import com.soulstice.app.data.local.dao.SoulsticeDao +import com.soulstice.app.data.local.entities.Resource +import dagger.hilt.android.lifecycle.HiltViewModel +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.launch +import java.util.UUID +import javax.inject.Inject + +@HiltViewModel +class ResourceViewModel @Inject constructor( + private val dao: SoulsticeDao +) : ViewModel() { + + val allResources = dao.getAllResources() + + fun getResourcesByProject(projectId: String) = dao.getResourcesByProject(projectId) + + fun addResource( + title: String, + type: String, + content: String? = null, + url: String? = null, + localUri: String? = null, + projectId: String? = null + ) { + viewModelScope.launch { + val resource = Resource( + id = UUID.randomUUID().toString(), + title = title, + type = type, + content = content, + url = url, + localUri = localUri, + projectId = projectId, + createdAt = System.currentTimeMillis() + ) + dao.insertResource(resource) + } + } + + fun deleteResource(resource: Resource) { + viewModelScope.launch { + dao.deleteResource(resource) + } + } +} diff --git a/app/src/main/kotlin/com/soulstice/app/ui/viewmodel/SettingsViewModel.kt b/app/src/main/kotlin/com/soulstice/app/ui/viewmodel/SettingsViewModel.kt new file mode 100644 index 0000000..16bdcb2 --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/ui/viewmodel/SettingsViewModel.kt @@ -0,0 +1,90 @@ +package com.soulstice.app.ui.viewmodel + +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import com.soulstice.app.data.local.PreferenceManager +import android.util.Log +import com.soulstice.app.data.local.dao.SoulsticeDao +import com.soulstice.app.data.local.entities.* +import dagger.hilt.android.lifecycle.HiltViewModel +import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.first +import kotlinx.coroutines.launch +import kotlinx.serialization.Serializable +import kotlinx.serialization.encodeToString +import kotlinx.serialization.json.Json +import javax.inject.Inject + +@Serializable +data class ExportData( + val tasks: List, + val projects: List, + val habits: List, + val resources: List, + val clients: List, + val journalEntries: List, + val inboxItems: List +) + +@HiltViewModel +class SettingsViewModel @Inject constructor( + private val dao: SoulsticeDao, + private val preferenceManager: PreferenceManager +) : ViewModel() { + + val pomodoroDuration = preferenceManager.pomodoroDuration + val theme = preferenceManager.theme + + fun setPomodoroDuration(minutes: Int) { + viewModelScope.launch { + preferenceManager.setPomodoroDuration(minutes) + } + } + + fun setTheme(theme: String) { + viewModelScope.launch { + preferenceManager.setTheme(theme) + } + } + + fun resetDatabase() { + viewModelScope.launch { + dao.nukeDatabase() + } + } + + fun exportData() { + viewModelScope.launch { + val data = ExportData( + tasks = dao.getAllTasks().first(), + projects = dao.getAllProjects().first(), + habits = dao.getAllHabits().first(), + resources = dao.getAllResources().first(), + clients = dao.getAllClients().first(), + journalEntries = dao.getAllJournalEntries().first(), + inboxItems = dao.getUnprocessedInboxItems().first() + ) + val json = Json.encodeToString(data) + Log.d("SoulsticeExport", json) + // In a real app, we'd save to a file or share it + } + } + + fun importData(json: String) { + viewModelScope.launch { + try { + val data = Json.decodeFromString(json) + data.tasks.forEach { dao.insertTask(it) } + data.projects.forEach { dao.insertProject(it) } + data.habits.forEach { dao.insertHabit(it) } + data.resources.forEach { dao.insertResource(it) } + data.clients.forEach { dao.insertClient(it) } + data.journalEntries.forEach { dao.insertJournalEntry(it) } + data.inboxItems.forEach { dao.insertInboxItem(it) } + } catch (e: Exception) { + Log.e("SoulsticeImport", "Failed to import", e) + } + } + } +} diff --git a/app/src/main/kotlin/com/soulstice/app/ui/viewmodel/TaskViewModel.kt b/app/src/main/kotlin/com/soulstice/app/ui/viewmodel/TaskViewModel.kt new file mode 100644 index 0000000..3a9909f --- /dev/null +++ b/app/src/main/kotlin/com/soulstice/app/ui/viewmodel/TaskViewModel.kt @@ -0,0 +1,56 @@ +package com.soulstice.app.ui.viewmodel + +import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import com.soulstice.app.data.local.dao.SoulsticeDao +import com.soulstice.app.data.local.entities.Task +import dagger.hilt.android.lifecycle.HiltViewModel +import kotlinx.coroutines.launch +import java.util.UUID +import javax.inject.Inject + +@HiltViewModel +class TaskViewModel @Inject constructor( + private val dao: SoulsticeDao +) : ViewModel() { + + fun upsertTask( + id: String? = null, + title: String, + description: String? = null, + status: String = "todo", + type: String = "task", + priority: String = "medium", + energy: String = "high", + projectId: String? = null, + dueDate: Long? = null + ) { + viewModelScope.launch { + val task = Task( + id = id ?: UUID.randomUUID().toString(), + title = title, + description = description, + status = status, + type = type, + priority = priority, + energy = energy, + projectId = projectId, + dueDate = dueDate, + createdAt = System.currentTimeMillis() + ) + dao.insertTask(task) + } + } + + fun deleteTask(task: Task) { + viewModelScope.launch { + dao.deleteTask(task) + } + } + + fun updateTaskStatus(task: Task, newStatus: String) { + viewModelScope.launch { + dao.insertTask(task.copy(status = newStatus)) + } + } +} diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..df199c8 --- /dev/null +++ b/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + Soulstice + diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml new file mode 100644 index 0000000..9ea8848 --- /dev/null +++ b/app/src/main/res/values/themes.xml @@ -0,0 +1,5 @@ + + + + diff --git a/app/src/test/kotlin/com/soulstice/app/TaskTest.kt b/app/src/test/kotlin/com/soulstice/app/TaskTest.kt new file mode 100644 index 0000000..bdcb9e5 --- /dev/null +++ b/app/src/test/kotlin/com/soulstice/app/TaskTest.kt @@ -0,0 +1,25 @@ +package com.soulstice.app + +import com.soulstice.app.data.local.entities.Task +import org.junit.Assert.assertEquals +import org.junit.Test + +class TaskTest { + @Test + fun testTaskCreation() { + val task = Task( + id = "1", + title = "Test Task", + description = "Description", + status = "todo", + priority = "high", + energy = "high", + projectId = null, + dueDate = null, + createdAt = 123456789L + ) + assertEquals("Test Task", task.title) + assertEquals("todo", task.status) + assertEquals("high", task.energy) + } +} diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..8fc3397 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,7 @@ +plugins { + id("com.android.application") version "8.4.0" apply false + id("org.jetbrains.kotlin.android") version "1.9.22" apply false + id("org.jetbrains.kotlin.plugin.serialization") version "1.9.22" apply false + id("com.google.dagger.hilt.android") version "2.50" apply false + id("com.google.devtools.ksp") version "1.9.22-1.0.17" apply false +} diff --git a/edu_play/.gitignore b/edu_play/.gitignore deleted file mode 100644 index 3820a95..0000000 --- a/edu_play/.gitignore +++ /dev/null @@ -1,45 +0,0 @@ -# Miscellaneous -*.class -*.log -*.pyc -*.swp -.DS_Store -.atom/ -.build/ -.buildlog/ -.history -.svn/ -.swiftpm/ -migrate_working_dir/ - -# IntelliJ related -*.iml -*.ipr -*.iws -.idea/ - -# The .vscode folder contains launch configuration and tasks you configure in -# VS Code which you may wish to be included in version control, so this line -# is commented out by default. -#.vscode/ - -# Flutter/Dart/Pub related -**/doc/api/ -**/ios/Flutter/.last_build_id -.dart_tool/ -.flutter-plugins-dependencies -.pub-cache/ -.pub/ -/build/ -/coverage/ - -# Symbolication related -app.*.symbols - -# Obfuscation related -app.*.map.json - -# Android Studio will place build artifacts here -/android/app/debug -/android/app/profile -/android/app/release diff --git a/edu_play/.metadata b/edu_play/.metadata deleted file mode 100644 index e90f3ae..0000000 --- a/edu_play/.metadata +++ /dev/null @@ -1,33 +0,0 @@ -# This file tracks properties of this Flutter project. -# Used by Flutter tool to assess capabilities and perform upgrades etc. -# -# This file should be version controlled and should not be manually edited. - -version: - revision: "ac4e799d237041cf905519190471f657b657155a" - channel: "stable" - -project_type: app - -# Tracks metadata for the flutter migrate command -migration: - platforms: - - platform: root - create_revision: ac4e799d237041cf905519190471f657b657155a - base_revision: ac4e799d237041cf905519190471f657b657155a - - platform: android - create_revision: ac4e799d237041cf905519190471f657b657155a - base_revision: ac4e799d237041cf905519190471f657b657155a - - platform: ios - create_revision: ac4e799d237041cf905519190471f657b657155a - base_revision: ac4e799d237041cf905519190471f657b657155a - - # User provided section - - # List of Local paths (relative to this file) that should be - # ignored by the migrate tool. - # - # Files that are not part of the templates will be ignored by default. - unmanaged_files: - - 'lib/main.dart' - - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/edu_play/README.md b/edu_play/README.md deleted file mode 100644 index 444a99d..0000000 --- a/edu_play/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# edu_play - -A new Flutter project. - -## Getting Started - -This project is a starting point for a Flutter application. - -A few resources to get you started if this is your first Flutter project: - -- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) - -For help getting started with Flutter development, view the -[online documentation](https://docs.flutter.dev/), which offers tutorials, -samples, guidance on mobile development, and a full API reference. diff --git a/edu_play/analysis_options.yaml b/edu_play/analysis_options.yaml deleted file mode 100644 index 0d29021..0000000 --- a/edu_play/analysis_options.yaml +++ /dev/null @@ -1,28 +0,0 @@ -# This file configures the analyzer, which statically analyzes Dart code to -# check for errors, warnings, and lints. -# -# The issues identified by the analyzer are surfaced in the UI of Dart-enabled -# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be -# invoked from the command line by running `flutter analyze`. - -# The following line activates a set of recommended lints for Flutter apps, -# packages, and plugins designed to encourage good coding practices. -include: package:flutter_lints/flutter.yaml - -linter: - # The lint rules applied to this project can be customized in the - # section below to disable rules from the `package:flutter_lints/flutter.yaml` - # included above or to enable additional rules. A list of all available lints - # and their documentation is published at https://dart.dev/lints. - # - # Instead of disabling a lint rule for the entire project in the - # section below, it can also be suppressed for a single line of code - # or a specific dart file by using the `// ignore: name_of_lint` and - # `// ignore_for_file: name_of_lint` syntax on the line or in the file - # producing the lint. - rules: - # avoid_print: false # Uncomment to disable the `avoid_print` rule - # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule - -# Additional information about this file can be found at -# https://dart.dev/guides/language/analysis-options diff --git a/edu_play/android/.gitignore b/edu_play/android/.gitignore deleted file mode 100644 index be3943c..0000000 --- a/edu_play/android/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java -.cxx/ - -# Remember to never publicly share your keystore. -# See https://flutter.dev/to/reference-keystore -key.properties -**/*.keystore -**/*.jks diff --git a/edu_play/android/app/build.gradle.kts b/edu_play/android/app/build.gradle.kts deleted file mode 100644 index ac0554c..0000000 --- a/edu_play/android/app/build.gradle.kts +++ /dev/null @@ -1,44 +0,0 @@ -plugins { - id("com.android.application") - id("kotlin-android") - // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. - id("dev.flutter.flutter-gradle-plugin") -} - -android { - namespace = "com.eduplay.app" - compileSdk = flutter.compileSdkVersion - ndkVersion = flutter.ndkVersion - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 - } - - kotlinOptions { - jvmTarget = JavaVersion.VERSION_11.toString() - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId = "com.eduplay.app" - // You can update the following values to match your application needs. - // For more information, see: https://flutter.dev/to/review-gradle-config. - minSdk = flutter.minSdkVersion - targetSdk = flutter.targetSdkVersion - versionCode = flutter.versionCode - versionName = flutter.versionName - } - - buildTypes { - release { - // TODO: Add your own signing config for the release build. - // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig = signingConfigs.getByName("debug") - } - } -} - -flutter { - source = "../.." -} diff --git a/edu_play/android/app/src/debug/AndroidManifest.xml b/edu_play/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index 399f698..0000000 --- a/edu_play/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/edu_play/android/app/src/main/AndroidManifest.xml b/edu_play/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index eea25e7..0000000 --- a/edu_play/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/edu_play/android/app/src/main/kotlin/com/eduplay/app/MainActivity.kt b/edu_play/android/app/src/main/kotlin/com/eduplay/app/MainActivity.kt deleted file mode 100644 index 22e40ec..0000000 --- a/edu_play/android/app/src/main/kotlin/com/eduplay/app/MainActivity.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.eduplay.app - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity : FlutterActivity() diff --git a/edu_play/android/app/src/main/res/drawable-v21/launch_background.xml b/edu_play/android/app/src/main/res/drawable-v21/launch_background.xml deleted file mode 100644 index f74085f..0000000 --- a/edu_play/android/app/src/main/res/drawable-v21/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/edu_play/android/app/src/main/res/drawable/launch_background.xml b/edu_play/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f..0000000 --- a/edu_play/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/edu_play/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/edu_play/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4..0000000 Binary files a/edu_play/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/edu_play/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/edu_play/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b7..0000000 Binary files a/edu_play/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/edu_play/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/edu_play/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 09d4391..0000000 Binary files a/edu_play/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/edu_play/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/edu_play/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d..0000000 Binary files a/edu_play/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/edu_play/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/edu_play/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372e..0000000 Binary files a/edu_play/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/edu_play/android/app/src/main/res/values-night/styles.xml b/edu_play/android/app/src/main/res/values-night/styles.xml deleted file mode 100644 index 06952be..0000000 --- a/edu_play/android/app/src/main/res/values-night/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/edu_play/android/app/src/main/res/values/styles.xml b/edu_play/android/app/src/main/res/values/styles.xml deleted file mode 100644 index cb1ef88..0000000 --- a/edu_play/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/edu_play/android/app/src/profile/AndroidManifest.xml b/edu_play/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index 399f698..0000000 --- a/edu_play/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/edu_play/android/build.gradle.kts b/edu_play/android/build.gradle.kts deleted file mode 100644 index dbee657..0000000 --- a/edu_play/android/build.gradle.kts +++ /dev/null @@ -1,24 +0,0 @@ -allprojects { - repositories { - google() - mavenCentral() - } -} - -val newBuildDir: Directory = - rootProject.layout.buildDirectory - .dir("../../build") - .get() -rootProject.layout.buildDirectory.value(newBuildDir) - -subprojects { - val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) - project.layout.buildDirectory.value(newSubprojectBuildDir) -} -subprojects { - project.evaluationDependsOn(":app") -} - -tasks.register("clean") { - delete(rootProject.layout.buildDirectory) -} diff --git a/edu_play/android/gradle.properties b/edu_play/android/gradle.properties deleted file mode 100644 index f018a61..0000000 --- a/edu_play/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError -android.useAndroidX=true -android.enableJetifier=true diff --git a/edu_play/android/settings.gradle.kts b/edu_play/android/settings.gradle.kts deleted file mode 100644 index fb605bc..0000000 --- a/edu_play/android/settings.gradle.kts +++ /dev/null @@ -1,26 +0,0 @@ -pluginManagement { - val flutterSdkPath = - run { - val properties = java.util.Properties() - file("local.properties").inputStream().use { properties.load(it) } - val flutterSdkPath = properties.getProperty("flutter.sdk") - require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" } - flutterSdkPath - } - - includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") - - repositories { - google() - mavenCentral() - gradlePluginPortal() - } -} - -plugins { - id("dev.flutter.flutter-plugin-loader") version "1.0.0" - id("com.android.application") version "8.9.1" apply false - id("org.jetbrains.kotlin.android") version "2.1.0" apply false -} - -include(":app") diff --git a/edu_play/docs/.gitkeep b/edu_play/docs/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/edu_play/docs/cms_schema.md b/edu_play/docs/cms_schema.md deleted file mode 100644 index 1b29ef4..0000000 --- a/edu_play/docs/cms_schema.md +++ /dev/null @@ -1,90 +0,0 @@ -# EduPlay CMS Schema (Airtable/Supabase) - -This document outlines the data schema for the EduPlay application's content management system (CMS). - ---- - -## 1. `Grades` Table - -Stores the different educational grade levels. - -| Column Name | Data Type | Description | Example | -| :---------- | :-------- | :---------- | :------ | -| `id` | `UUID` (Primary Key) | Unique identifier for the grade. | `uuid_generate_v4()` | -| `name` | `Text` | The name of the grade. | "Primary 1" | -| `description` | `Text` | A brief description of the grade level. | "For students aged 5-6." | -| `order` | `Integer` | The display order for the grades. | `1` | - ---- - -## 2. `Subjects` Table - -Stores the subjects for each grade. - -| Column Name | Data Type | Description | Example | -| :---------- | :-------- | :---------- | :------ | -| `id` | `UUID` (Primary Key) | Unique identifier for the subject. | `uuid_generate_v4()` | -| `grade_id` | `UUID` (Foreign Key -> `Grades.id`) | The grade this subject belongs to. | `(ID of Primary 1)` | -| `name` | `Text` | The name of the subject. | "Mathematics" | -| `icon_url` | `URL` | URL to an icon representing the subject. | `https://cdn.eduplay.app/icons/math.png` | - ---- - -## 3. `Topics` Table - -Stores the topics within each subject. - -| Column Name | Data Type | Description | Example | -| :---------- | :-------- | :---------- | :------ | -| `id` | `UUID` (Primary Key) | Unique identifier for the topic. | `uuid_generate_v4()` | -| `subject_id` | `UUID` (Foreign Key -> `Subjects.id`) | The subject this topic belongs to. | `(ID of Mathematics)` | -| `name` | `Text` | The name of the topic. | "Addition and Subtraction" | -| `order` | `Integer` | The display order for topics within a subject. | `1` | - ---- - -## 4. `Lessons` Table (renamed from `LessonAssets`) - -Stores the actual lesson content for each topic. - -| Column Name | Data Type | Description | Example | -| :---------- | :-------- | :---------- | :------ | -| `id` | `UUID` (Primary Key) | Unique identifier for the lesson. | `uuid_generate_v4()` | -| `topic_id` | `UUID` (Foreign Key -> `Topics.id`) | The topic this lesson belongs to. | `(ID of Addition)` | -| `title` | `Text` | The title of the lesson. | "Adding Numbers up to 10" | -| `content` | `Rich Text / Markdown` | The main body of the lesson text. | "Adding is when you combine two or more numbers..." | -| `video_url` | `URL` (Optional) | URL to a supplementary video. | `https://youtube.com/watch?v=...` | -| `audio_narration_url` | `URL` (Optional) | URL to a voiceover for the lesson. | `https://cdn.eduplay.app/audio/lesson1.mp3` | -| `order` | `Integer` | The display order for lessons within a topic. | `1` | - ---- - -## 5. `QuizItems` Table - -Stores questions and answers for quizzes, linked to a lesson. - -| Column Name | Data Type | Description | Example | -| :---------- | :-------- | :---------- | :------ | -| `id` | `UUID` (Primary Key) | Unique identifier for the quiz item. | `uuid_generate_v4()` | -| `lesson_id` | `UUID` (Foreign Key -> `Lessons.id`) | The lesson this quiz question is for. | `(ID of Lesson 1)` | -| `question_text` | `Text` | The text of the question. | "What is 2 + 3?" | -| `question_type` | `Enum` (`MCQ`, `FillInBlank`) | The type of question. | `MCQ` | -| `options` | `JSON / Array` | An array of possible answers for MCQ. | `["4", "5", "6"]` | -| `correct_answer` | `Text` | The correct answer. | `"5"` | -| `explanation` | `Text` (Optional) | An explanation for the correct answer. | "When you add 2 and 3, you get 5." | - ---- - -## 6. `Rewards` Table - -Stores the badges and avatar items that can be unlocked. - -| Column Name | Data Type | Description | Example | -| :---------- | :-------- | :---------- | :------ | -| `id` | `UUID` (Primary Key) | Unique identifier for the reward. | `uuid_generate_v4()` | -| `name` | `Text` | The name of the reward. | "Math Whiz Badge" | -| `description` | `Text` | How to earn the reward. | "Complete all Addition lessons." | -| `reward_type` | `Enum` (`Badge`, `AvatarItem`) | The type of reward. | `Badge` | -| `image_url` | `URL` | URL to the badge or item image. | `https://cdn.eduplay.app/rewards/math_whiz.png` | -| `xp_cost` | `Integer` (Optional) | The XP cost to unlock (if applicable). | `500` | -| `unlock_milestone` | `Text` (Optional) | The specific milestone required to unlock it. | `TOPIC_COMPLETE: (ID of Addition)` | \ No newline at end of file diff --git a/edu_play/ios/.gitignore b/edu_play/ios/.gitignore deleted file mode 100644 index 7a7f987..0000000 --- a/edu_play/ios/.gitignore +++ /dev/null @@ -1,34 +0,0 @@ -**/dgph -*.mode1v3 -*.mode2v3 -*.moved-aside -*.pbxuser -*.perspectivev3 -**/*sync/ -.sconsign.dblite -.tags* -**/.vagrant/ -**/DerivedData/ -Icon? -**/Pods/ -**/.symlinks/ -profile -xcuserdata -**/.generated/ -Flutter/App.framework -Flutter/Flutter.framework -Flutter/Flutter.podspec -Flutter/Generated.xcconfig -Flutter/ephemeral/ -Flutter/app.flx -Flutter/app.zip -Flutter/flutter_assets/ -Flutter/flutter_export_environment.sh -ServiceDefinitions.json -Runner/GeneratedPluginRegistrant.* - -# Exceptions to above rules. -!default.mode1v3 -!default.mode2v3 -!default.pbxuser -!default.perspectivev3 diff --git a/edu_play/ios/Flutter/AppFrameworkInfo.plist b/edu_play/ios/Flutter/AppFrameworkInfo.plist deleted file mode 100644 index 1dc6cf7..0000000 --- a/edu_play/ios/Flutter/AppFrameworkInfo.plist +++ /dev/null @@ -1,26 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - App - CFBundleIdentifier - io.flutter.flutter.app - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - App - CFBundlePackageType - FMWK - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - MinimumOSVersion - 13.0 - - diff --git a/edu_play/ios/Flutter/Debug.xcconfig b/edu_play/ios/Flutter/Debug.xcconfig deleted file mode 100644 index 592ceee..0000000 --- a/edu_play/ios/Flutter/Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/edu_play/ios/Flutter/Release.xcconfig b/edu_play/ios/Flutter/Release.xcconfig deleted file mode 100644 index 592ceee..0000000 --- a/edu_play/ios/Flutter/Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "Generated.xcconfig" diff --git a/edu_play/ios/Runner.xcodeproj/project.pbxproj b/edu_play/ios/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index 3fdc30f..0000000 --- a/edu_play/ios/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,616 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 54; - objects = { - -/* Begin PBXBuildFile section */ - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; - 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 97C146E61CF9000F007C117D /* Project object */; - proxyType = 1; - remoteGlobalIDString = 97C146ED1CF9000F007C117D; - remoteInfo = Runner; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 9705A1C41CF9048500538489 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Embed Frameworks"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; - 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; - 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; - 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; - 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; - 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; - 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 97C146EB1CF9000F007C117D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 331C8082294A63A400263BE5 /* RunnerTests */ = { - isa = PBXGroup; - children = ( - 331C807B294A618700263BE5 /* RunnerTests.swift */, - ); - path = RunnerTests; - sourceTree = ""; - }; - 9740EEB11CF90186004384FC /* Flutter */ = { - isa = PBXGroup; - children = ( - 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 9740EEB31CF90195004384FC /* Generated.xcconfig */, - ); - name = Flutter; - sourceTree = ""; - }; - 97C146E51CF9000F007C117D = { - isa = PBXGroup; - children = ( - 9740EEB11CF90186004384FC /* Flutter */, - 97C146F01CF9000F007C117D /* Runner */, - 97C146EF1CF9000F007C117D /* Products */, - 331C8082294A63A400263BE5 /* RunnerTests */, - ); - sourceTree = ""; - }; - 97C146EF1CF9000F007C117D /* Products */ = { - isa = PBXGroup; - children = ( - 97C146EE1CF9000F007C117D /* Runner.app */, - 331C8081294A63A400263BE5 /* RunnerTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 97C146F01CF9000F007C117D /* Runner */ = { - isa = PBXGroup; - children = ( - 97C146FA1CF9000F007C117D /* Main.storyboard */, - 97C146FD1CF9000F007C117D /* Assets.xcassets */, - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, - 97C147021CF9000F007C117D /* Info.plist */, - 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, - 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, - 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, - 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, - ); - path = Runner; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 331C8080294A63A400263BE5 /* RunnerTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; - buildPhases = ( - 331C807D294A63A400263BE5 /* Sources */, - 331C807F294A63A400263BE5 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 331C8086294A63A400263BE5 /* PBXTargetDependency */, - ); - name = RunnerTests; - productName = RunnerTests; - productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 97C146ED1CF9000F007C117D /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 9740EEB61CF901F6004384FC /* Run Script */, - 97C146EA1CF9000F007C117D /* Sources */, - 97C146EB1CF9000F007C117D /* Frameworks */, - 97C146EC1CF9000F007C117D /* Resources */, - 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Runner; - productName = Runner; - productReference = 97C146EE1CF9000F007C117D /* Runner.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 97C146E61CF9000F007C117D /* Project object */ = { - isa = PBXProject; - attributes = { - BuildIndependentTargetsInParallel = YES; - LastUpgradeCheck = 1510; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 331C8080294A63A400263BE5 = { - CreatedOnToolsVersion = 14.0; - TestTargetID = 97C146ED1CF9000F007C117D; - }; - 97C146ED1CF9000F007C117D = { - CreatedOnToolsVersion = 7.3.1; - LastSwiftMigration = 1100; - }; - }; - }; - buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 97C146E51CF9000F007C117D; - productRefGroup = 97C146EF1CF9000F007C117D /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 97C146ED1CF9000F007C117D /* Runner */, - 331C8080294A63A400263BE5 /* RunnerTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 331C807F294A63A400263BE5 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 97C146EC1CF9000F007C117D /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, - 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, - 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, - 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", - ); - name = "Thin Binary"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; - }; - 9740EEB61CF901F6004384FC /* Run Script */ = { - isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run Script"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 331C807D294A63A400263BE5 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 97C146EA1CF9000F007C117D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, - 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 97C146ED1CF9000F007C117D /* Runner */; - targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 97C146FA1CF9000F007C117D /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C146FB1CF9000F007C117D /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 97C147001CF9000F007C117D /* Base */, - ); - name = LaunchScreen.storyboard; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 249021D3217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Profile; - }; - 249021D4217E4FDB00AE95B9 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.eduplay.eduPlay; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Profile; - }; - 331C8088294A63A400263BE5 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.eduplay.eduPlay.RunnerTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; - }; - name = Debug; - }; - 331C8089294A63A400263BE5 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.eduplay.eduPlay.RunnerTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; - }; - name = Release; - }; - 331C808A294A63A400263BE5 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; - GENERATE_INFOPLIST_FILE = YES; - MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.eduplay.eduPlay.RunnerTests; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; - }; - name = Profile; - }; - 97C147031CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 97C147041CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_USER_SCRIPT_SANDBOXING = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - SUPPORTED_PLATFORMS = iphoneos; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 97C147061CF9000F007C117D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.eduplay.eduPlay; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 97C147071CF9000F007C117D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.eduplay.eduPlay; - PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 331C8088294A63A400263BE5 /* Debug */, - 331C8089294A63A400263BE5 /* Release */, - 331C808A294A63A400263BE5 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147031CF9000F007C117D /* Debug */, - 97C147041CF9000F007C117D /* Release */, - 249021D3217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 97C147061CF9000F007C117D /* Debug */, - 97C147071CF9000F007C117D /* Release */, - 249021D4217E4FDB00AE95B9 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 97C146E61CF9000F007C117D /* Project object */; -} diff --git a/edu_play/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/edu_play/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 919434a..0000000 --- a/edu_play/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/edu_play/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/edu_play/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/edu_play/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/edu_play/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/edu_play/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c..0000000 --- a/edu_play/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/edu_play/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/edu_play/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index e3773d4..0000000 --- a/edu_play/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/edu_play/ios/Runner.xcworkspace/contents.xcworkspacedata b/edu_play/ios/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a1..0000000 --- a/edu_play/ios/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/edu_play/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/edu_play/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/edu_play/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/edu_play/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/edu_play/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings deleted file mode 100644 index f9b0d7c..0000000 --- a/edu_play/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings +++ /dev/null @@ -1,8 +0,0 @@ - - - - - PreviewsEnabled - - - diff --git a/edu_play/ios/Runner/AppDelegate.swift b/edu_play/ios/Runner/AppDelegate.swift deleted file mode 100644 index 6266644..0000000 --- a/edu_play/ios/Runner/AppDelegate.swift +++ /dev/null @@ -1,13 +0,0 @@ -import Flutter -import UIKit - -@main -@objc class AppDelegate: FlutterAppDelegate { - override func application( - _ application: UIApplication, - didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? - ) -> Bool { - GeneratedPluginRegistrant.register(with: self) - return super.application(application, didFinishLaunchingWithOptions: launchOptions) - } -} diff --git a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index d36b1fa..0000000 --- a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "Icon-App-1024x1024@1x.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada4..0000000 Binary files a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 7353c41..0000000 Binary files a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 797d452..0000000 Binary files a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index 6ed2d93..0000000 Binary files a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cd7b00..0000000 Binary files a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index fe73094..0000000 Binary files a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index 321773c..0000000 Binary files a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 797d452..0000000 Binary files a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index 502f463..0000000 Binary files a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index 0ec3034..0000000 Binary files a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index 0ec3034..0000000 Binary files a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index e9f5fea..0000000 Binary files a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index 84ac32a..0000000 Binary files a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 8953cba..0000000 Binary files a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index 0467bf1..0000000 Binary files a/edu_play/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/edu_play/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/edu_play/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json deleted file mode 100644 index 0bedcf2..0000000 --- a/edu_play/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "filename" : "LaunchImage.png", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@2x.png", - "scale" : "2x" - }, - { - "idiom" : "universal", - "filename" : "LaunchImage@3x.png", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/edu_play/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/edu_play/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png deleted file mode 100644 index 9da19ea..0000000 Binary files a/edu_play/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png and /dev/null differ diff --git a/edu_play/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/edu_play/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png deleted file mode 100644 index 9da19ea..0000000 Binary files a/edu_play/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png and /dev/null differ diff --git a/edu_play/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/edu_play/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png deleted file mode 100644 index 9da19ea..0000000 Binary files a/edu_play/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png and /dev/null differ diff --git a/edu_play/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/edu_play/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md deleted file mode 100644 index 89c2725..0000000 --- a/edu_play/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Launch Screen Assets - -You can customize the launch screen with your own desired assets by replacing the image files in this directory. - -You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/edu_play/ios/Runner/Base.lproj/LaunchScreen.storyboard b/edu_play/ios/Runner/Base.lproj/LaunchScreen.storyboard deleted file mode 100644 index f2e259c..0000000 --- a/edu_play/ios/Runner/Base.lproj/LaunchScreen.storyboard +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/edu_play/ios/Runner/Base.lproj/Main.storyboard b/edu_play/ios/Runner/Base.lproj/Main.storyboard deleted file mode 100644 index f3c2851..0000000 --- a/edu_play/ios/Runner/Base.lproj/Main.storyboard +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/edu_play/ios/Runner/Info.plist b/edu_play/ios/Runner/Info.plist deleted file mode 100644 index c686903..0000000 --- a/edu_play/ios/Runner/Info.plist +++ /dev/null @@ -1,49 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleDisplayName - Edu Play - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - edu_play - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleSignature - ???? - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSRequiresIPhoneOS - - UILaunchStoryboardName - LaunchScreen - UIMainStoryboardFile - Main - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - CADisableMinimumFrameDurationOnPhone - - UIApplicationSupportsIndirectInputEvents - - - diff --git a/edu_play/ios/Runner/Runner-Bridging-Header.h b/edu_play/ios/Runner/Runner-Bridging-Header.h deleted file mode 100644 index 308a2a5..0000000 --- a/edu_play/ios/Runner/Runner-Bridging-Header.h +++ /dev/null @@ -1 +0,0 @@ -#import "GeneratedPluginRegistrant.h" diff --git a/edu_play/ios/RunnerTests/RunnerTests.swift b/edu_play/ios/RunnerTests/RunnerTests.swift deleted file mode 100644 index 86a7c3b..0000000 --- a/edu_play/ios/RunnerTests/RunnerTests.swift +++ /dev/null @@ -1,12 +0,0 @@ -import Flutter -import UIKit -import XCTest - -class RunnerTests: XCTestCase { - - func testExample() { - // If you add code to the Runner application, consider adding tests here. - // See https://developer.apple.com/documentation/xctest for more information about using XCTest. - } - -} diff --git a/edu_play/lib/main.dart b/edu_play/lib/main.dart deleted file mode 100644 index 5b51a56..0000000 --- a/edu_play/lib/main.dart +++ /dev/null @@ -1,39 +0,0 @@ -import 'package:edu_play/screens/onboarding_screen.dart'; -import 'package:flutter/material.dart'; -import 'package:google_fonts/google_fonts.dart'; - -void main() { - runApp(const MyApp()); -} - -class MyApp extends StatelessWidget { - const MyApp({super.key}); - - // This widget is the root of your application. - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'EduPlay', - theme: ThemeData( - // Define the default brightness and colors. - colorScheme: ColorScheme.fromSeed( - seedColor: const Color(0xFF3B82F6), // Primary: Sky Blue - primary: const Color(0xFF3B82F6), - secondary: const Color(0xFFFACC15), // Accent: Warm Yellow - error: const Color(0xFFF87171), // Secondary: Coral Red - // Other colors can be defined here as needed - ), - - // Define the default font family. - textTheme: GoogleFonts.nunitoTextTheme( - Theme.of(context).textTheme, - ), - - // Use Material 3 design. - useMaterial3: true, - ), - home: const OnboardingScreen(), - debugShowCheckedModeBanner: false, - ); - } -} \ No newline at end of file diff --git a/edu_play/lib/models/.gitkeep b/edu_play/lib/models/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/edu_play/lib/models/lesson_model.dart b/edu_play/lib/models/lesson_model.dart deleted file mode 100644 index c11f567..0000000 --- a/edu_play/lib/models/lesson_model.dart +++ /dev/null @@ -1,12 +0,0 @@ -// Represents a single lesson in a topic. -class Lesson { - final String id; - final String title; - final String content; - - Lesson({ - required this.id, - required this.title, - required this.content, - }); -} \ No newline at end of file diff --git a/edu_play/lib/models/quiz_model.dart b/edu_play/lib/models/quiz_model.dart deleted file mode 100644 index 7d89eb2..0000000 --- a/edu_play/lib/models/quiz_model.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Represents a single quiz question. -class QuizItem { - final String id; - final String question; - final List options; - final String correctAnswer; - - QuizItem({ - required this.id, - required this.question, - required this.options, - required this.correctAnswer, - }); -} \ No newline at end of file diff --git a/edu_play/lib/models/reward_model.dart b/edu_play/lib/models/reward_model.dart deleted file mode 100644 index 7fc5de8..0000000 --- a/edu_play/lib/models/reward_model.dart +++ /dev/null @@ -1,14 +0,0 @@ -// Represents a reward, such as a badge or avatar item. -class Reward { - final String id; - final String name; - final String description; - final String imageUrl; - - Reward({ - required this.id, - required this.name, - required this.description, - required this.imageUrl, - }); -} \ No newline at end of file diff --git a/edu_play/lib/models/user_model.dart b/edu_play/lib/models/user_model.dart deleted file mode 100644 index 94a697a..0000000 --- a/edu_play/lib/models/user_model.dart +++ /dev/null @@ -1,13 +0,0 @@ -// Represents a user in the EduPlay app. -// This will be expanded to include properties for each user role. -class User { - final String id; - final String email; - final String role; // "Student", "Parent", "Teacher", "Admin" - - User({ - required this.id, - required this.email, - required this.role, - }); -} \ No newline at end of file diff --git a/edu_play/lib/screens/.gitkeep b/edu_play/lib/screens/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/edu_play/lib/screens/admin_dashboard_screen.dart b/edu_play/lib/screens/admin_dashboard_screen.dart deleted file mode 100644 index 657cf8f..0000000 --- a/edu_play/lib/screens/admin_dashboard_screen.dart +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:flutter/material.dart'; - -class AdminDashboardScreen extends StatelessWidget { - const AdminDashboardScreen({super.key}); - - @override - Widget build(BuildContext context) { - return const Scaffold( - appBar: AppBar(title: Text('Admin Dashboard')), - body: Center( - child: Text('Admin Dashboard'), - ), - ); - } -} \ No newline at end of file diff --git a/edu_play/lib/screens/onboarding_screen.dart b/edu_play/lib/screens/onboarding_screen.dart deleted file mode 100644 index 02ded90..0000000 --- a/edu_play/lib/screens/onboarding_screen.dart +++ /dev/null @@ -1,14 +0,0 @@ -import 'package:flutter/material.dart'; - -class OnboardingScreen extends StatelessWidget { - const OnboardingScreen({super.key}); - - @override - Widget build(BuildContext context) { - return const Scaffold( - body: Center( - child: Text('Onboarding Screen'), - ), - ); - } -} \ No newline at end of file diff --git a/edu_play/lib/screens/parent_dashboard_screen.dart b/edu_play/lib/screens/parent_dashboard_screen.dart deleted file mode 100644 index 74e9ad9..0000000 --- a/edu_play/lib/screens/parent_dashboard_screen.dart +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:flutter/material.dart'; - -class ParentDashboardScreen extends StatelessWidget { - const ParentDashboardScreen({super.key}); - - @override - Widget build(BuildContext context) { - return const Scaffold( - appBar: AppBar(title: Text('Parent Dashboard')), - body: Center( - child: Text('Parent Dashboard'), - ), - ); - } -} \ No newline at end of file diff --git a/edu_play/lib/screens/student_dashboard_screen.dart b/edu_play/lib/screens/student_dashboard_screen.dart deleted file mode 100644 index afc4bba..0000000 --- a/edu_play/lib/screens/student_dashboard_screen.dart +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:flutter/material.dart'; - -class StudentDashboardScreen extends StatelessWidget { - const StudentDashboardScreen({super.key}); - - @override - Widget build(BuildContext context) { - return const Scaffold( - appBar: AppBar(title: Text('Student Dashboard')), - body: Center( - child: Text('Student Dashboard'), - ), - ); - } -} \ No newline at end of file diff --git a/edu_play/lib/screens/teacher_dashboard_screen.dart b/edu_play/lib/screens/teacher_dashboard_screen.dart deleted file mode 100644 index b80d396..0000000 --- a/edu_play/lib/screens/teacher_dashboard_screen.dart +++ /dev/null @@ -1,15 +0,0 @@ -import 'package:flutter/material.dart'; - -class TeacherDashboardScreen extends StatelessWidget { - const TeacherDashboardScreen({super.key}); - - @override - Widget build(BuildContext context) { - return const Scaffold( - appBar: AppBar(title: Text('Teacher Dashboard')), - body: Center( - child: Text('Teacher Dashboard'), - ), - ); - } -} \ No newline at end of file diff --git a/edu_play/lib/services/.gitkeep b/edu_play/lib/services/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/edu_play/lib/utils/.gitkeep b/edu_play/lib/utils/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/edu_play/lib/widgets/.gitkeep b/edu_play/lib/widgets/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/edu_play/macos/Flutter/GeneratedPluginRegistrant.swift b/edu_play/macos/Flutter/GeneratedPluginRegistrant.swift deleted file mode 100644 index f9c2b8a..0000000 --- a/edu_play/macos/Flutter/GeneratedPluginRegistrant.swift +++ /dev/null @@ -1,14 +0,0 @@ -// -// Generated file. Do not edit. -// - -import FlutterMacOS -import Foundation - -import firebase_core -import path_provider_foundation - -func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { - FLTFirebaseCorePlugin.register(with: registry.registrar(forPlugin: "FLTFirebaseCorePlugin")) - PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) -} diff --git a/edu_play/macos/Flutter/ephemeral/Flutter-Generated.xcconfig b/edu_play/macos/Flutter/ephemeral/Flutter-Generated.xcconfig deleted file mode 100644 index 236eddd..0000000 --- a/edu_play/macos/Flutter/ephemeral/Flutter-Generated.xcconfig +++ /dev/null @@ -1,11 +0,0 @@ -// This is a generated file; do not edit or check into version control. -FLUTTER_ROOT=/home/jules/snap/flutter/common/flutter -FLUTTER_APPLICATION_PATH=/app/edu_play -COCOAPODS_PARALLEL_CODE_SIGN=true -FLUTTER_BUILD_DIR=build -FLUTTER_BUILD_NAME=1.0.0 -FLUTTER_BUILD_NUMBER=1 -DART_OBFUSCATION=false -TRACK_WIDGET_CREATION=true -TREE_SHAKE_ICONS=false -PACKAGE_CONFIG=.dart_tool/package_config.json diff --git a/edu_play/macos/Flutter/ephemeral/flutter_export_environment.sh b/edu_play/macos/Flutter/ephemeral/flutter_export_environment.sh deleted file mode 100755 index ca3d6ba..0000000 --- a/edu_play/macos/Flutter/ephemeral/flutter_export_environment.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -# This is a generated file; do not edit or check into version control. -export "FLUTTER_ROOT=/home/jules/snap/flutter/common/flutter" -export "FLUTTER_APPLICATION_PATH=/app/edu_play" -export "COCOAPODS_PARALLEL_CODE_SIGN=true" -export "FLUTTER_BUILD_DIR=build" -export "FLUTTER_BUILD_NAME=1.0.0" -export "FLUTTER_BUILD_NUMBER=1" -export "DART_OBFUSCATION=false" -export "TRACK_WIDGET_CREATION=true" -export "TREE_SHAKE_ICONS=false" -export "PACKAGE_CONFIG=.dart_tool/package_config.json" diff --git a/edu_play/pubspec.lock b/edu_play/pubspec.lock deleted file mode 100644 index fa6ef73..0000000 --- a/edu_play/pubspec.lock +++ /dev/null @@ -1,450 +0,0 @@ -# Generated by pub -# See https://dart.dev/tools/pub/glossary#lockfile -packages: - async: - dependency: transitive - description: - name: async - sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" - url: "https://pub.dev" - source: hosted - version: "2.13.0" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - change_app_package_name: - dependency: "direct dev" - description: - name: change_app_package_name - sha256: "8e43b754fe960426904d77ed4c62fa8c9834deaf6e293ae40963fa447482c4c5" - url: "https://pub.dev" - source: hosted - version: "1.5.0" - characters: - dependency: transitive - description: - name: characters - sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 - url: "https://pub.dev" - source: hosted - version: "1.4.0" - clock: - dependency: transitive - description: - name: clock - sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b - url: "https://pub.dev" - source: hosted - version: "1.1.2" - collection: - dependency: transitive - description: - name: collection - sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" - url: "https://pub.dev" - source: hosted - version: "1.19.1" - crypto: - dependency: transitive - description: - name: crypto - sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" - url: "https://pub.dev" - source: hosted - version: "3.0.6" - cupertino_icons: - dependency: "direct main" - description: - name: cupertino_icons - sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 - url: "https://pub.dev" - source: hosted - version: "1.0.8" - dio: - dependency: "direct main" - description: - name: dio - sha256: d90ee57923d1828ac14e492ca49440f65477f4bb1263575900be731a3dac66a9 - url: "https://pub.dev" - source: hosted - version: "5.9.0" - dio_web_adapter: - dependency: transitive - description: - name: dio_web_adapter - sha256: "7586e476d70caecaf1686d21eee7247ea43ef5c345eab9e0cc3583ff13378d78" - url: "https://pub.dev" - source: hosted - version: "2.1.1" - fake_async: - dependency: transitive - description: - name: fake_async - sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" - url: "https://pub.dev" - source: hosted - version: "1.3.3" - ffi: - dependency: transitive - description: - name: ffi - sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - firebase_core: - dependency: "direct main" - description: - name: firebase_core - sha256: "7be63a3f841fc9663342f7f3a011a42aef6a61066943c90b1c434d79d5c995c5" - url: "https://pub.dev" - source: hosted - version: "3.15.2" - firebase_core_platform_interface: - dependency: transitive - description: - name: firebase_core_platform_interface - sha256: "5873a370f0d232918e23a5a6137dbe4c2c47cf017301f4ea02d9d636e52f60f0" - url: "https://pub.dev" - source: hosted - version: "6.0.1" - firebase_core_web: - dependency: transitive - description: - name: firebase_core_web - sha256: "0ed0dc292e8f9ac50992e2394e9d336a0275b6ae400d64163fdf0a8a8b556c37" - url: "https://pub.dev" - source: hosted - version: "2.24.1" - flutter: - dependency: "direct main" - description: flutter - source: sdk - version: "0.0.0" - flutter_lints: - dependency: "direct dev" - description: - name: flutter_lints - sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" - url: "https://pub.dev" - source: hosted - version: "5.0.0" - flutter_test: - dependency: "direct dev" - description: flutter - source: sdk - version: "0.0.0" - flutter_web_plugins: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - google_fonts: - dependency: "direct main" - description: - name: google_fonts - sha256: "517b20870220c48752eafa0ba1a797a092fb22df0d89535fd9991e86ee2cdd9c" - url: "https://pub.dev" - source: hosted - version: "6.3.2" - hive: - dependency: "direct main" - description: - name: hive - sha256: "8dcf6db979d7933da8217edcec84e9df1bdb4e4edc7fc77dbd5aa74356d6d941" - url: "https://pub.dev" - source: hosted - version: "2.2.3" - hive_flutter: - dependency: "direct main" - description: - name: hive_flutter - sha256: dca1da446b1d808a51689fb5d0c6c9510c0a2ba01e22805d492c73b68e33eecc - url: "https://pub.dev" - source: hosted - version: "1.1.0" - http: - dependency: transitive - description: - name: http - sha256: bb2ce4590bc2667c96f318d68cac1b5a7987ec819351d32b1c987239a815e007 - url: "https://pub.dev" - source: hosted - version: "1.5.0" - http_parser: - dependency: transitive - description: - name: http_parser - sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" - url: "https://pub.dev" - source: hosted - version: "4.1.2" - leak_tracker: - dependency: transitive - description: - name: leak_tracker - sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" - url: "https://pub.dev" - source: hosted - version: "11.0.2" - leak_tracker_flutter_testing: - dependency: transitive - description: - name: leak_tracker_flutter_testing - sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" - url: "https://pub.dev" - source: hosted - version: "3.0.10" - leak_tracker_testing: - dependency: transitive - description: - name: leak_tracker_testing - sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" - url: "https://pub.dev" - source: hosted - version: "3.0.2" - lints: - dependency: transitive - description: - name: lints - sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 - url: "https://pub.dev" - source: hosted - version: "5.1.1" - matcher: - dependency: transitive - description: - name: matcher - sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 - url: "https://pub.dev" - source: hosted - version: "0.12.17" - material_color_utilities: - dependency: transitive - description: - name: material_color_utilities - sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec - url: "https://pub.dev" - source: hosted - version: "0.11.1" - meta: - dependency: transitive - description: - name: meta - sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c - url: "https://pub.dev" - source: hosted - version: "1.16.0" - mime: - dependency: transitive - description: - name: mime - sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" - url: "https://pub.dev" - source: hosted - version: "2.0.0" - nested: - dependency: transitive - description: - name: nested - sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" - url: "https://pub.dev" - source: hosted - version: "1.0.0" - onesignal_flutter: - dependency: "direct main" - description: - name: onesignal_flutter - sha256: b5bb43bf496ddb5e3975ba54c6477cc2d1fcd18fb3698f195d2e0bfd376ddafd - url: "https://pub.dev" - source: hosted - version: "5.3.4" - path: - dependency: transitive - description: - name: path - sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" - url: "https://pub.dev" - source: hosted - version: "1.9.1" - path_provider: - dependency: transitive - description: - name: path_provider - sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" - url: "https://pub.dev" - source: hosted - version: "2.1.5" - path_provider_android: - dependency: transitive - description: - name: path_provider_android - sha256: "993381400e94d18469750e5b9dcb8206f15bc09f9da86b9e44a9b0092a0066db" - url: "https://pub.dev" - source: hosted - version: "2.2.18" - path_provider_foundation: - dependency: transitive - description: - name: path_provider_foundation - sha256: "16eef174aacb07e09c351502740fa6254c165757638eba1e9116b0a781201bbd" - url: "https://pub.dev" - source: hosted - version: "2.4.2" - path_provider_linux: - dependency: transitive - description: - name: path_provider_linux - sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 - url: "https://pub.dev" - source: hosted - version: "2.2.1" - path_provider_platform_interface: - dependency: transitive - description: - name: path_provider_platform_interface - sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" - url: "https://pub.dev" - source: hosted - version: "2.1.2" - path_provider_windows: - dependency: transitive - description: - name: path_provider_windows - sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 - url: "https://pub.dev" - source: hosted - version: "2.3.0" - paystack_flutter_sdk: - dependency: "direct main" - description: - name: paystack_flutter_sdk - sha256: a8386bee7bed218517c580017a2f3112da1c0e298f3c559f4a3d3f1f7e233221 - url: "https://pub.dev" - source: hosted - version: "0.0.1-alpha.2" - platform: - dependency: transitive - description: - name: platform - sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" - url: "https://pub.dev" - source: hosted - version: "3.1.6" - plugin_platform_interface: - dependency: transitive - description: - name: plugin_platform_interface - sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" - url: "https://pub.dev" - source: hosted - version: "2.1.8" - provider: - dependency: "direct main" - description: - name: provider - sha256: "4e82183fa20e5ca25703ead7e05de9e4cceed1fbd1eadc1ac3cb6f565a09f272" - url: "https://pub.dev" - source: hosted - version: "6.1.5+1" - sky_engine: - dependency: transitive - description: flutter - source: sdk - version: "0.0.0" - source_span: - dependency: transitive - description: - name: source_span - sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" - url: "https://pub.dev" - source: hosted - version: "1.10.1" - stack_trace: - dependency: transitive - description: - name: stack_trace - sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" - url: "https://pub.dev" - source: hosted - version: "1.12.1" - stream_channel: - dependency: transitive - description: - name: stream_channel - sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" - url: "https://pub.dev" - source: hosted - version: "2.1.4" - string_scanner: - dependency: transitive - description: - name: string_scanner - sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" - url: "https://pub.dev" - source: hosted - version: "1.4.1" - term_glyph: - dependency: transitive - description: - name: term_glyph - sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" - url: "https://pub.dev" - source: hosted - version: "1.2.2" - test_api: - dependency: transitive - description: - name: test_api - sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00" - url: "https://pub.dev" - source: hosted - version: "0.7.6" - typed_data: - dependency: transitive - description: - name: typed_data - sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 - url: "https://pub.dev" - source: hosted - version: "1.4.0" - vector_math: - dependency: transitive - description: - name: vector_math - sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b - url: "https://pub.dev" - source: hosted - version: "2.2.0" - vm_service: - dependency: transitive - description: - name: vm_service - sha256: "45caa6c5917fa127b5dbcfbd1fa60b14e583afdc08bfc96dda38886ca252eb60" - url: "https://pub.dev" - source: hosted - version: "15.0.2" - web: - dependency: transitive - description: - name: web - sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" - url: "https://pub.dev" - source: hosted - version: "1.1.1" - xdg_directories: - dependency: transitive - description: - name: xdg_directories - sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" - url: "https://pub.dev" - source: hosted - version: "1.1.0" -sdks: - dart: ">=3.9.2 <4.0.0" - flutter: ">=3.29.0" diff --git a/edu_play/pubspec.yaml b/edu_play/pubspec.yaml deleted file mode 100644 index 9688a19..0000000 --- a/edu_play/pubspec.yaml +++ /dev/null @@ -1,104 +0,0 @@ -name: edu_play -description: "A new Flutter project." -# The following line prevents the package from being accidentally published to -# pub.dev using `flutter pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev - -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -# In Windows, build-name is used as the major, minor, and patch parts -# of the product and file versions while build-number is used as the build suffix. -version: 1.0.0+1 - -environment: - sdk: ^3.9.2 - -# Dependencies specify other packages that your package needs in order to work. -# To automatically upgrade your package dependencies to the latest versions -# consider running `flutter pub upgrade --major-versions`. Alternatively, -# dependencies can be manually updated by changing the version numbers below to -# the latest version available on pub.dev. To see which dependencies have newer -# versions available, run `flutter pub outdated`. -dependencies: - flutter: - sdk: flutter - - # Core - firebase_core: ^3.3.0 # For Firebase integration - provider: ^6.1.2 # For state management - dio: ^5.5.0+1 # For network requests - google_fonts: ^6.2.1 # For custom fonts like Poppins & Nunito - - # Offline Storage - hive: ^2.2.3 - hive_flutter: ^1.1.0 - - # Payments & Notifications - paystack_flutter_sdk: ^0.0.1-alpha.2 # For Paystack payments - onesignal_flutter: ^5.2.2 # For push notifications - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.8 - -dev_dependencies: - flutter_test: - sdk: flutter - change_app_package_name: ^1.1.0 - - # The "flutter_lints" package below contains a set of recommended lints to - # encourage good coding practices. The lint set provided by the package is - # activated in the `analysis_options.yaml` file located at the root of your - # package. See that file for information about deactivating specific lint - # rules and activating additional ones. - flutter_lints: ^5.0.0 - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter packages. -flutter: - - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. - uses-material-design: true - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/to/resolution-aware-images - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/to/asset-from-package - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/to/font-from-package diff --git a/edu_play/test/widget_test.dart b/edu_play/test/widget_test.dart deleted file mode 100644 index 635f718..0000000 --- a/edu_play/test/widget_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility in the flutter_test package. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; - -import 'package:edu_play/main.dart'; - -void main() { - testWidgets('Counter increments smoke test', (WidgetTester tester) async { - // Build our app and trigger a frame. - await tester.pumpWidget(const MyApp()); - - // Verify that our counter starts at 0. - expect(find.text('0'), findsOneWidget); - expect(find.text('1'), findsNothing); - - // Tap the '+' icon and trigger a frame. - await tester.tap(find.byIcon(Icons.add)); - await tester.pump(); - - // Verify that our counter has incremented. - expect(find.text('0'), findsNothing); - expect(find.text('1'), findsOneWidget); - }); -} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..8f2e28c --- /dev/null +++ b/gradle.properties @@ -0,0 +1,4 @@ +org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 +android.useAndroidX=true +android.nonTransitiveRClass=true +kotlin.code.style=official diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..e644113 Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/edu_play/android/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties similarity index 74% rename from edu_play/android/gradle/wrapper/gradle-wrapper.properties rename to gradle/wrapper/gradle-wrapper.properties index ac3b479..a441313 100644 --- a/edu_play/android/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip +networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..b740cf1 --- /dev/null +++ b/gradlew @@ -0,0 +1,249 @@ +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# +############################################################################## + +# Attempt to set APP_HOME + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" + esac +fi + +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. + +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) + + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Collect all arguments for the java command: +# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# and any embedded shellness will be escaped. +# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be +# treated as '${Hostname}' itself on the command line. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..25da30d --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,92 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%"=="" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..b9e01cb --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,16 @@ +pluginManagement { + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} +dependencyResolutionManagement { + repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) + repositories { + google() + mavenCentral() + } +} +rootProject.name = "Soulstice" +include(":app")