Skip to content

smone-jovan/learning_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

100 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽ“ Learning App - Gamified Education Platform

A modern gamified learning application built with Flutter and Firebase, featuring courses, quizzes, achievements, and leaderboards to make learning fun and engaging.

Flutter Firebase GetX License


โœจ Features

๐Ÿ” Authentication

  • Email/Password login and registration
  • Password reset via email
  • Secure Firebase Authentication
  • Auto-login for returning users

๐Ÿ“š Learning Experience

  • Courses: Browse and enroll in various courses
  • Lessons: Interactive lesson viewer
  • Quizzes: Test your knowledge with timed quizzes
  • Progress Tracking: Monitor your learning journey

๐ŸŽฎ Gamification System

  • Points & Coins: Earn rewards for completing activities
  • Levels: Progress through levels as you learn
  • Achievements: Unlock badges and milestones
  • Leaderboard: Compete with other learners
  • Streaks: Maintain daily learning streaks
  • Daily Challenges: Complete daily tasks for bonus rewards

โš™๏ธ User Experience

  • Settings Page: Customize your preferences
  • Dark Mode: Toggle between light and dark themes
  • Profile Management: View your stats and progress
  • Responsive Design: Works on mobile, tablet, and web

๐Ÿ—๏ธ Architecture

lib/
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ data/
โ”‚   โ”‚   โ”œโ”€โ”€ models/          # Data models (User, Course, Quiz, etc.)
โ”‚   โ”‚   โ””โ”€โ”€ services/        # Firebase & local storage services
โ”‚   โ”œโ”€โ”€ routes/
โ”‚   โ”‚   โ”œโ”€โ”€ app_pages.dart   # Route definitions
โ”‚   โ”‚   โ””โ”€โ”€ app_routes.dart  # Route constants
โ”‚   โ””โ”€โ”€ middleware/          # Auth middleware
โ”œโ”€โ”€ core/
โ”‚   โ”œโ”€โ”€ constants/           # App constants (Firebase collections, etc.)
โ”‚   โ””โ”€โ”€ theme/              # App theme configuration
โ”œโ”€โ”€ presentation/
โ”‚   โ”œโ”€โ”€ auth/               # Authentication pages
โ”‚   โ”œโ”€โ”€ main/               # Main page with navigation
โ”‚   โ”œโ”€โ”€ pages/              # Feature pages (Courses, Quizzes, etc.)
โ”‚   โ”œโ”€โ”€ controllers/        # GetX controllers
โ”‚   โ””โ”€โ”€ bindings/           # Dependency injection bindings
โ””โ”€โ”€ main.dart               # App entry point

Architecture Pattern: Clean Architecture + MVVM
State Management: GetX
Backend: Firebase (Auth + Firestore)


๐Ÿš€ Getting Started

Prerequisites

  • Flutter SDK (3.0 or higher)
  • Dart SDK (3.0 or higher)
  • Firebase account
  • Android Studio / VS Code
  • Git

Installation

  1. Clone the repository

    git clone https://github.com/smone-jovan/learning_app.git
    cd learning_app
  2. Install dependencies

    flutter pub get
  3. Firebase Setup

    a. Create a new Firebase project at Firebase Console

    b. Enable Authentication (Email/Password)

    c. Create a Firestore Database

    d. Download and add Firebase configuration files:

    • Android: google-services.json โ†’ android/app/
    • iOS: GoogleService-Info.plist โ†’ ios/Runner/
    • Web: Copy Firebase config to web/index.html
  4. Configure Firestore Security Rules

    Go to Firebase Console โ†’ Firestore Database โ†’ Rules, and paste:

    rules_version = '2';
    service cloud.firestore {
      match /databases/{database}/documents {
        function isAuthenticated() {
          return request.auth != null;
        }
        
        function isOwner(userId) {
          return request.auth.uid == userId;
        }
        
        match /users/{userId} {
          allow read: if isAuthenticated();
          allow create, update: if isAuthenticated() && isOwner(userId);
        }
        
        match /courses/{courseId} {
          allow read: if isAuthenticated();
        }
        
        match /achievements/{achievementId} {
          allow read: if isAuthenticated();
        }
        
        match /user_achievements/{userAchievementId} {
          allow read, create, update: if isAuthenticated() && 
            resource.data.userId == request.auth.uid;
        }
        
        match /leaderboard/{userId} {
          allow read: if isAuthenticated();
        }
      }
    }
  5. Run the app

    flutter run

๐Ÿ”ฅ Firebase Setup Guide

Firestore Collections Structure

users/
โ”œโ”€โ”€ {userId}/
โ”‚   โ”œโ”€โ”€ email, displayName, photoURL
โ”‚   โ”œโ”€โ”€ points, coins, level
โ”‚   โ”œโ”€โ”€ currentStreak, longestStreak
โ”‚   โ””โ”€โ”€ enrolledCourses[], completedQuizzes[]

courses/
โ”œโ”€โ”€ {courseId}/
โ”‚   โ”œโ”€โ”€ title, description, instructor
โ”‚   โ”œโ”€โ”€ category, difficulty, duration
โ”‚   โ””โ”€โ”€ thumbnailURL, enrolledCount

achievements/
โ”œโ”€โ”€ {achievementId}/
โ”‚   โ”œโ”€โ”€ title, description, category
โ”‚   โ”œโ”€โ”€ requirement, pointsReward, coinsReward
โ”‚   โ””โ”€โ”€ iconURL, rarity

user_achievements/
โ”œโ”€โ”€ {userAchievementId}/
โ”‚   โ”œโ”€โ”€ userId, achievementId
โ”‚   โ”œโ”€โ”€ unlockedAt, isClaimed, claimedAt

leaderboard/
โ”œโ”€โ”€ {userId}/
โ”‚   โ”œโ”€โ”€ displayName, photoURL
โ”‚   โ”œโ”€โ”€ totalPoints, level, rank
โ”‚   โ””โ”€โ”€ lastUpdated

daily_challenges/
โ”œโ”€โ”€ {YYYY-MM-DD}/
โ”‚   โ”œโ”€โ”€ quizId, title, description
โ”‚   โ”œโ”€โ”€ pointsReward, coinsReward
โ”‚   โ””โ”€โ”€ expiresAt

๐Ÿ› ๏ธ Tech Stack

Category Technology
Framework Flutter 3.x
Language Dart 3.x
State Management GetX
Backend Firebase
Authentication Firebase Auth
Database Cloud Firestore
Storage Shared Preferences
UI Components Material Design 3

๐Ÿ“ฆ Key Dependencies

dependencies:
  flutter:
    sdk: flutter
  
  # State Management
  get: ^4.6.6
  
  # Firebase
  firebase_core: ^2.24.2
  firebase_auth: ^4.16.0
  cloud_firestore: ^4.14.0
  
  # Local Storage
  shared_preferences: ^2.2.2
  
  # UI
  google_fonts: ^6.1.0
  
  # Utilities
  intl: ^0.18.1


๐Ÿค Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'feat: add AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ‘จโ€๐Ÿ’ป Author

Your Name

  • GitHub: @SMONE
  • Email: ntar aja

๐Ÿ™ Acknowledgments

  • Flutter team for the amazing framework
  • Firebase for backend services
  • GetX community for state management solution
  • Material Design 3 for UI components
  • All contributors and testers

๐Ÿ“ž Support

If you like this project, please give it a โญ on GitHub!

For issues and feature requests, please use the Issues page.


Made with โค๏ธ and Flutter

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors