Skip to content

Chran19/StudyPlannerAIAssistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StudyPlanner AI Assistant

An intelligent Android application that leverages AI (Groq LLM) to help students create personalized study plans, set reminders, and get AI-powered study assistance.


Introduction

StudyPlanner AI Assistant is a comprehensive study management application that combines the power of Large Language Models (LLM) with traditional study planning features. The app uses Groq's Llama 3.1 model to provide intelligent study recommendations, generate personalized study plans, and offer an interactive AI chat interface.

This project demonstrates integration of modern AI APIs with Android development, including proper architecture patterns like Room database, Retrofit networking, and ViewModel.


Project Structure

StudyPlannerAIAssistant/
├── app/
│   ├── src/
│   │   └── main/
│   │       ├── java/com/example/studyplannerassistant/
│   │       │   ├── activities/
│   │       │   │   ├── WelcomeActivity.java    # Animated splash screen
│   │       │   │   ├── MainActivity.java       # Main navigation hub
│   │       │   │   ├── ChatActivity.java       # AI chat interface
│   │       │   │   ├── StudyPlanActivity.java  # AI study plan generation
│   │       │   │   └── ReminderActivity.java   # Reminder management
│   │       │   ├── api/
│   │       │   │   └── GroqApiService.java     # Retrofit API interface
│   │       │   ├── database/
│   │       │   │   ├── AppDatabase.java        # Room database setup
│   │       │   │   ├── PlanDao.java            # Study plans DAO
│   │       │   │   └── ReminderDao.java        # Reminders DAO
│   │       │   ├── models/
│   │       │   │   ├── Plan.java               # Study plan entity
│   │       │   │   └── Reminder.java           # Reminder entity
│   │       │   └── utils/
│   │       ├── res/
│   │       │   ├── anim/                       # Animation files
│   │       │   ├── layout/                     # Activity layouts
│   │       │   └── values/
│   │       └── AndroidManifest.xml
│   └── build.gradle.kts
├── gradle/
│   └── libs.versions.toml
├── build.gradle.kts
├── settings.gradle.kts
└── README.md

Features

AI-Powered Features

Feature Description
AI Chat Interactive chat with Llama 3.1 model
Smart Plans AI-generated personalized study plans
Topic Analysis Intelligent breakdown of study topics
Time Optimization AI-suggested study durations

Planning Features

Feature Description
Create Plans Manual study plan creation
View Plans List all saved study plans
Reminders Set study reminders with AlarmManager
Notifications Push notifications for reminders

User Features

Feature Description
Firebase Auth User authentication
Guest Mode Use without account
Animations Smooth welcome screen animations

Technologies Used

  • Language: Java
  • Min SDK: 24 (Android 7.0)
  • Target SDK: 35
  • AI/API:
    • Groq API (Llama 3.1-8b-instant model)
    • Retrofit 2
    • OkHttp with Logging Interceptor
    • Gson Converter
  • Database: Room (AndroidX)
  • Authentication: Firebase Auth
  • Architecture:
    • DAO Pattern
    • Repository Pattern
  • Other:
    • AlarmManager for reminders
    • NotificationManager

App Flow

┌─────────────────────────────────────────┐
│           Welcome Activity               │
│     (Animated Splash + Login/Guest)      │
└────────────────┬────────────────────────┘
                 │
                 ▼
┌─────────────────────────────────────────┐
│           Main Activity                  │
│  ┌─────────────────────────────────┐    │
│  │    AI Chat       Study Plans    │    │
│  │                                  │    │
│  │    Reminders     Profile        │    │
│  └─────────────────────────────────┘    │
└─────────────────────────────────────────┘
         │              │
         ▼              ▼
┌──────────────┐ ┌──────────────────┐
│  Chat with   │ │  Generate Study  │
│   Groq AI    │ │    Plan with AI  │
└──────────────┘ └──────────────────┘

AI Integration

Groq API Setup

The app uses Groq's API with the Llama 3.1 model:

// API Interface
public interface GroqApiService {
    @POST("chat/completions")
    Call<ChatResponse> createChatCompletion(
        @Header("Authorization") String authToken,
        @Body ChatRequest request
    );
}

Chat Request Structure

{
  "model": "llama-3.1-8b-instant",
  "messages": [
    { "role": "system", "content": "You are a helpful study assistant..." },
    { "role": "user", "content": "Help me create a study plan for Java" }
  ]
}

Database Schema

Plans Table

@Entity(tableName = "plans")
public class Plan {
    @PrimaryKey(autoGenerate = true)
    public int id;
    public String topic;
    public String duration;
    public String content;
    public long createdAt;
}

Reminders Table

@Entity(tableName = "reminders")
public class Reminder {
    @PrimaryKey(autoGenerate = true)
    public int id;
    public String title;
    public long triggerTime;
    public boolean isActive;
}

Setup Instructions

Prerequisites

  1. Android Studio
  2. Groq API Key (Get one here)
  3. Firebase Project (optional, for auth)

Configuration

  1. Clone the repository
  2. Add your Groq API key in the appropriate file
  3. (Optional) Add google-services.json for Firebase
  4. Build and run

Getting Groq API Key

  1. Visit Groq Console
  2. Sign up / Log in
  3. Navigate to API Keys
  4. Create a new API key
  5. Add to your app

Screenshots

Add screenshots of your app here

Welcome Main AI Chat
Welcome Main Chat
Study Plan Reminders
Plan Reminder

Dependencies

// Room Database
implementation("androidx.room:room-runtime:2.6.1")
annotationProcessor("androidx.room:room-compiler:2.6.1")

// Retrofit + OkHttp
implementation("com.squareup.retrofit2:retrofit:2.9.0")
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
implementation("com.squareup.okhttp3:logging-interceptor:4.12.0")

// Firebase Auth
implementation("com.google.firebase:firebase-auth:22.3.0")

Important Notes

  • Keep your Groq API key secure (don't commit to public repos)
  • API calls require internet connection
  • Firebase Auth is optional (guest mode available)
  • Reminders use AlarmManager (may be affected by Doze mode)

Future Enhancements

  • Offline mode with cached responses
  • Multiple AI model options
  • Study progress tracking
  • Spaced repetition integration
  • Export study plans to PDF
  • Sync across devices
  • Voice input for chat

License

This project is for educational purposes.


Author

Ranjeet

GitHub: @Chran19


Built with AI for better learning

About

AI-powered Study Planner app using Groq LLM (Llama 3.1) - Create personalized study plans, AI chat, and reminders

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages