Learnova is a mobile learning application designed to transform the way users learn by generating personalized learning paths tailored to their needs. It leverages AI to create courses, allows users to track their progress, and explore a variety of educational content.
Live Application Link: https://learnova-0--katl41h5of.expo.app
- Description
- Features
- Tech Stack
- Project Structure
- Getting Started (For Developers)
- Available Scripts
- Context API
- Key Functionalities
- Configuration Files
Learnova empowers users to take control of their learning journey. Users can input their learning goals, and the application, with the help of AI, generates potential course topics and then detailed course structures. The app supports user authentication, course management, progress tracking, and exploration of other courses.
- User Authentication: Secure sign-up and sign-in functionality using Firebase Authentication.
- AI-Powered Course Generation: Users can describe what they want to learn, and the app uses Google Generative AI to suggest topics and create detailed course content.
- Personalized Learning Paths: Users can select topics of interest to customize their courses.
- Course Management: Created courses are saved to Firestore and associated with the user.
- Progress Tracking: Users can view their enrolled courses and track their learning progress.
- Explore Courses: Discover courses created by others, categorized for easy Browse.
- Profile Management: View user details (name, email) and logout functionality.
- Tab-Based Navigation: Intuitive navigation with tabs for Home, Explore, Progress, and Profile.
- Custom UI: Utilizes custom fonts and styling for a pleasant user experience.
- Haptic Feedback: Enhances user interaction.
- Splash Screen & Icons: Customized app loading experience.
- Frontend: React Native
- Framework: Expo (SDK 52)
- Navigation: Expo Router v4
- State Management: React Context API (
UserDetailContext) - Backend & Database: Firebase (Authentication, Firestore)
- AI: Google Generative AI (
@google/generative-ai) - Language: JavaScript (JSX) and TypeScript (TSX)
- Styling: React Native StyleSheet
- Icons:
@expo/vector-icons(Ionicons) - Local Storage:
@react-native-async-storage/async-storage - UI Components:
expo-blurreact-native-flip-cardreact-native-progress
- Development Tools:
- Jest &
jest-expofor testing - Expo CLI
- TypeScript
- Jest &
learnova/
βββ app/ # Main application screens and routing logic
β βββ (tabs)/ # Layout and screens for tab navigation
β β βββ _layout.jsx # Tab navigator configuration
β β βββ explore.jsx
β β βββ home.jsx
β β βββ profile.jsx
β β βββ progress.jsx
β βββ addCourse/ # Screen for creating new courses
β β βββ index.jsx
β βββ auth/ # Authentication screens
β β βββ signIn.jsx
β β βββ signUp.jsx
β βββ _layout.tsx # Root layout, global providers (UserDetailContext, fonts)
β βββ index.jsx # Landing/entry screen of the app
βββ assets/ # Static assets (images, fonts)
β βββ fonts/
β βββ images/
βββ components/ # Reusable UI components
β βββ Explore/
β β βββ CourseListByCategory.jsx
β βββ Home/
β β βββ CourseList.jsx
β β βββ CourseProgress.jsx
β β βββ Header.jsx
β β βββ NoCourse.jsx
β β βββ PractiseSection.jsx
β βββ Shared/
β βββ Button.jsx
β βββ CourseProgressCard.jsx
βββ config/ # Configuration files
β βββ AiModel.js # Setup for Google Generative AI
β βββ firebaseConfig.js # Firebase initialization
βββ constant/ # Static data and UI constants
β βββ Colors.js
β βββ Option.js
β βββ Prompt.js
βββ context/ # React Context API setup
β βββ UserDetailContext.js
βββ scripts/ # Project utilities
β βββ reset-project.js
βββ app.json # Expo config
βββ package.json # NPM dependencies and scripts
βββ tsconfig.json # TypeScript config
βββ babel.config.js # Babel config for Expo
- Node.js (LTS version recommended)
- npm or yarn
- Expo CLI:
npm install -g expo-cli - Git
- Clone the repository (Example):
git clone <repository-url> cd learnova
- Install dependencies:
npm install # or yarn install
- Firebase Setup:
- Create a Firebase project at https://console.firebase.google.com/.
- Enable Firestore and Firebase Authentication (Email/Password).
- Obtain your Firebase project configuration (apiKey, authDomain, projectId, etc.).
- Create a
config/firebaseConfig.jsfile (if it doesn't exist or is gitignored) and add your Firebase configuration:// Example: config/firebaseConfig.js import { initializeApp } from "firebase/app"; import { getAuth } from "firebase/auth"; import { getFirestore } from "firebase/firestore"; const firebaseConfig = { apiKey: "YOUR_API_KEY", authDomain: "YOUR_AUTH_DOMAIN", projectId: "YOUR_PROJECT_ID", storageBucket: "YOUR_STORAGE_BUCKET", messagingSenderId: "YOUR_MESSAGING_SENDER_ID", appId: "YOUR_APP_ID" }; const app = initializeApp(firebaseConfig); export const auth = getAuth(app); export const db = getFirestore(app);
- Google Generative AI Setup:
- Obtain an API key from Google AI Studio.
- In
config/AiModel.js(or wherever your AI models are initialized), ensure your API key is securely configured. It's common practice to use environment variables for this.// Example: config/AiModel.js (conceptual) import { GoogleGenerativeAI } from "@google/generative-ai"; const API_KEY = "YOUR_GOOGLE_AI_API_KEY"; // Replace with your actual key or use process.env const genAI = new GoogleGenerativeAI(API_KEY); export const GenerateTopicsAIModel = genAI.getGenerativeModel({ model: "gemini-pro" }); // Or your chosen model export const GenerateCourseAIModel = genAI.getGenerativeModel({ model: "gemini-pro" }); // Or your chosen model
- Security Note: Do not commit API keys directly into your repository. Use environment variables or a gitignored configuration file.
- Start the Expo development server:
npm start # or yarn start # or expo start
- Run on a device or emulator/simulator:
- Expo Go App: Scan the QR code with the Expo Go app (available on Android and iOS).
- Android Emulator/Device: Press
ain the terminal. - iOS Simulator/Device: Press
iin the terminal. - Web Browser: Press
win the terminal.
From package.json:
npm startoryarn start: Starts the Expo development server.npm run androidoryarn android: Starts the app on a connected Android device or emulator.npm run iosoryarn ios: Starts the app on an iOS simulator or device (macOS only).npm run weboryarn web: Starts the app in a web browser.npm testoryarn test: Runs tests using Jest.npm run lintoryarn lint: Lints the project files using Expo's lint configuration.npm run reset-projectoryarn reset-project: Executes the./scripts/reset-project.jsscript.
UserDetailContext(app/_layout.tsx&app/index.jsx):- Manages the global state of the logged-in user's details (
userDetail). - Provides
userDetailandsetUserDetailto various components for accessing and updating user information.
- Manages the global state of the logged-in user's details (
- Authentication Flow (
app/auth/,app/index.jsx):- The
app/index.jsxscreen checks the Firebase authentication state. If a user is logged in, it fetches their details from Firestore using their email as the document ID in theuserscollection and navigates to the home screen. - Sign-up (
app/auth/signUp.jsx): Creates a new user with email and password in Firebase Authentication and saves user details (name, email) to theuserscollection in Firestore. - Sign-in (
app/auth/signIn.jsx): Authenticates an existing user and fetches their details from Firestore.
- The
- AI Course Generation (
app/addCourse/index.jsx):- Users input a desired learning area.
GenerateTopicsAIModelis used with a prompt (Prompt.IDEA) to suggest relevant topics.- Users select preferred topics.
GenerateCourseAIModelis used with the selected topics and another prompt (Prompt.COURSE) to generate a detailed course structure (title, chapters, content, etc.).- The generated course is saved to the
Coursescollection in Firestore, includingcreatedBy(user's email) andcreatedOntimestamp.
- Course Display and Interaction:
- Home Screen (
app/(tabs)/home.jsx): Displays courses created by the logged-in user. Includes aCourseProgresssection and a list of their courses. - Explore Screen (
app/(tabs)/explore.jsx): Allows users to browse courses by category (defined inconstant/Option.js). - Progress Screen (
app/(tabs)/progress.jsx): Shows a list of courses created by the user, likely focusing on their progress through them. Tapping a course navigates to a detailedcourseView(route not fully shown but inferred from params).
- Home Screen (
app.json: Expo's main configuration file. Defines app metadata (name, version, icon, splash screen), platform-specific settings (iOS, Android, Web), plugins (expo-router,expo-splash-screen), and experimental features liketypedRoutes.package.json: Lists project dependencies, development dependencies, and scripts for building, running, and testing the application.tsconfig.json: Configures the TypeScript compiler, including path aliases (@/*) and strict mode.
This README provides a comprehensive overview of the Learnova application. Feel free to expand on any section or add new ones as the project evolves!