Welcome to the Astra AI Secretary App learning guide! This document will help you understand the project structure, technologies used, and how to contribute effectively to this GirlScript Summer of Code (GSSoC) project.
Astra AI is an AI-powered personal secretary Android application designed to assist users with various tasks through voice and text interactions. It utilizes a local LLM (LLaMA 3 via Ollama) to provide intelligent responses and features memory-based context and retrieval-augmented generation (RAG) capabilities.
- π€ Voice and text input support
- π§ Intelligent responses using LLaMA 3
- πΎ Memory management for context-aware interactions
- π¬ User-friendly chat interface
- βοΈ Settings management for user preferences
- π Text-to-Speech and Speech Recognition
- π― Wake word detection with background listening
- Platform: Android
- Language: Kotlin
- Build System: Gradle with Kotlin DSL
- Architecture: Modern Android Architecture Components
build.gradle.kts- Main project build configuration using Kotlin DSLsettings.gradle.kts- Gradle settings and module configurationgradle.properties- Project-wide Gradle properties and build optimizationsgradlew/gradlew.bat- Gradle wrapper scripts for Unix/Windowslocal.properties- Local development properties (SDK paths, API keys)secrets.properties- Secure configuration file for sensitive datasecrets.properties.template- Template for required secret configurationsLICENSE- Project license informationREADME.md- Main project documentation
The main Android application module containing all source code and resources.
build.gradle.kts- App-specific build configuration and dependenciessrc/main/- Primary source code directoryAndroidManifest.xml- App permissions, components, and configurationkotlin/- All Kotlin source code organized by packagesres/- Android resources (layouts, strings, colors, etc.)
src/test/- Unit test filesbuild/- Generated build artifacts and intermediate files
MainActivity.kt- Main entry point and navigation hostSecretaryApplication.kt- Application class for global initialization
chat/- Chat interface componentsChatFragment.kt- Main chat screen UIChatViewModel.kt- Chat logic and state managementMessageAdapter.kt- RecyclerView adapter for messages
settings/- Settings and preferencesSettingsFragment.kt- Settings screen UISettingsViewModel.kt- Settings logic and preferences
memory/- Memory management interfaceMemoryFragment.kt- Memory visualization screenMemoryViewModel.kt- Memory operations logicMemoryAdapter.kt- Adapter for memory items display
model/- Data models and entitiesMessage.kt- Chat message data structureConversationContext.kt- Context for AI conversations
repository/- Data access abstractionChatRepository.kt- Chat data operationsVoiceRepository.kt- Voice processing operations
local/- Local data storagedatabase/- Room database componentsAppDatabase.kt- Main database configurationdao/MessageDao.kt- Message data access object
preferences/UserPreferences.kt- Shared preferences wrapper
llm/- Large Language Model integrationLlamaClient.kt- LLaMA 3 API clientOllamaService.kt- Ollama service integration
voice/- Voice processingSpeechRecognizer.kt- Speech-to-text functionalityTextToSpeech.kt- Text-to-speech functionality
memory/- AI memory systemConversationMemory.kt- Context memory managementMemoryManager.kt- Memory operations and cleanup
rag/- Retrieval Augmented GenerationDocumentStore.kt- Document storage for RAGRetriever.kt- Information retrieval logicVectorStore.kt- Vector embeddings storage
AppModule.kt- Dagger/Hilt module for dependency injection
layout/- XML layout files for activities and fragmentsactivity_main.xml- Main activity layoutfragment_chat.xml- Chat screen layoutfragment_settings.xml- Settings screen layout
drawable/- Vector drawables, images, and drawable resourcesmipmap-anydpi-v26/- App icons for different screen densities
navigation/- Navigation component graphsnav_graph.xml- App navigation flow
values/- App-wide values and configurationscolors.xml- Color palette definitionsstrings.xml- Text strings and localizationsthemes.xml- Material Design themes and styles
menu/- Menu definitions for navigation and options
kotlin/com/example/aisecretary/- Unit testsLlmClientTest.kt- Tests for LLM integration
- Android Studio: Latest stable version (Arctic Fox or newer)
- JDK: Java 17
- Android SDK: API level 21 (minimum) to 34 (target)
- Kotlin: 1.9.0 or newer
- Gradle: 8.0 or newer
- AndroidX Core & UI: Material Design, ConstraintLayout, AppCompat
- Architecture Components: Lifecycle, ViewModel, Room Database
- Networking: Retrofit2 with Gson converter
- Async Operations: Kotlin Coroutines
- Navigation: Navigation Component
- Image Loading: Glide
- Testing: JUnit, Mockito, Robolectric, Espresso
secrets.properties: Store sensitive configuration (API keys, URLs)OLLAMA_BASE_URL: Local Ollama server endpointLLAMA_MODEL_NAME: LLaMA model identifier
local.properties: SDK paths and local development settings
# Clone the repository
git clone https://github.com/A-Akhil/Astra-Ai.git
cd Astra-Ai
# Copy secrets template and configure
cp secrets.properties.template secrets.properties
# Edit secrets.properties with your configuration- Start with
MainActivity.ktto understand app flow - Explore
ChatFragment.ktfor UI components - Check
ChatViewModel.ktfor business logic - Review
LlamaClient.ktfor AI integration
- Pick an issue from the GSSoC issue tracker
- Create a feature branch:
git checkout -b feature/your-feature - Make changes following the established patterns
- Test your changes using unit and integration tests
- Submit a PR with clear description and testing evidence
- Follow Kotlin coding conventions
- Use MVVM architecture for new features
- Implement dependency injection for new components
- Add unit tests for business logic
- Use meaningful variable and function names
- UI improvements and bug fixes
- Documentation updates
- Test case additions
- Resource optimizations (strings, colors, layouts)
- New chat features and customizations
- Voice processing enhancements
- Database schema improvements
- Performance optimizations
- AI model integration improvements
- Memory system enhancements
- RAG implementation features
- Architecture component additions
- INTERNET: For API calls to Ollama server
- RECORD_AUDIO: For voice input functionality
- READ/WRITE_EXTERNAL_STORAGE: For file operations and caching
- Package:
com.example.aisecretary - Target SDK: 34 (Android 14)
- Minimum SDK: 21 (Android 5.0)
- Application Class:
SecretaryApplicationfor global initialization
# Build debug APK
./gradlew assembleDebug
# Install on connected device
./gradlew installDebug
# Run tests
./gradlew test- Copy
secrets.properties.templatetosecrets.properties - Configure your Ollama server URL and model:
OLLAMA_BASE_URL=http://your-server:11434 LLAMA_MODEL_NAME=llama3:8b
Build Issues:
- Ensure Java 17 is installed and selected
- Check Android SDK installation
- Verify
local.propertieshas correct SDK path - Make sure
secrets.propertiesexists with valid configuration
Runtime Issues:
- Check Ollama server is running and accessible
- Verify network permissions are granted
- Ensure microphone permissions for voice features
- Check device API level compatibility (minimum API 21)
Development Environment:
- Use Android Studio Arctic Fox or newer
- Enable Kotlin plugin
- Install Android SDK Tools and Platform Tools
- Configure proper emulator or physical device
- Check existing GitHub issues first
- Search the project documentation
- Ask in GSSoC Discord community
- Create a detailed issue with logs and steps to reproduce
- Located in
src/test/kotlin/ - Run with
./gradlew test - Cover business logic and data operations
- Mock external dependencies
- Test complete user flows
- Verify AI integration works correctly
- Test voice processing functionality
- Validate database operations
- Write tests before implementing features (TDD)
- Use descriptive test names
- Test both success and failure scenarios
- Mock network calls and external services
- β Core chat functionality
- β LLaMA 3 integration via Ollama
- β Voice input/output
- β Memory management system
- β Settings and preferences
- β Room database integration
- π Enhanced RAG capabilities
- π Improved memory visualization
- π Advanced voice commands
- π Customizable AI personalities
- π Offline mode capabilities
- UI/UX Improvements: Enhance the chat interface and memory visualization
- AI Features: Improve memory management and RAG implementation
- Performance: Optimize database operations and memory usage
- Testing: Expand test coverage and add automated testing
- Documentation: Improve code comments and user guides
- Accessibility: Add accessibility features for better inclusion
Before contributing, please read and follow our Code of Conduct. We are committed to providing a welcoming, inclusive, and harassment-free experience for everyone in the GSSoC community.
good first issue: Perfect for newcomershacktoberfest: Part of Hacktoberfest celebrationenhancement: New features and improvementsbug: Bug fixes neededdocumentation: Documentation improvements
- Fork the repository
- Create a descriptive branch name
- Follow the code style guidelines
- Add tests for new functionality
- Update documentation if needed
- Reference issues in your PR description
- Ensure compliance with the Code of Conduct
- All PRs require at least one review
- Ensure CI checks pass
- Address reviewer feedback promptly
- Maintain backwards compatibility
- Follow GSSoC community standards
- GitHub Issues: For bug reports and feature requests
- Discussions: For questions and community support
- GSSoC Discord: For real-time communication
- Email: gssoc@girlscript.tech for Code of Conduct violations
This project is part of GirlScript Summer of Code (GSSoC) - an initiative to encourage open source contributions and provide learning opportunities for students and developers.
Happy Coding! π
Last updated: July 2025