Home
Softono
homelearnai

homelearnai

Open source PHP
22
Stars
8
Forks
0
Issues
1
Watchers
8 months
Last Commit

About homelearnai

AI-powered homeschool learning management system with spaced repetition, curriculum planning, and multi-child support

Platforms

Web Self-hosted

Languages

PHP

Links

HomeLearnAI πŸŽ“

Laravel PHP HTMX PostgreSQL Tests

An intelligent homeschool learning management system that adapts to each child's unique learning journey. Built with modern web technologies and educational best practices.

✨ Features

πŸ§’ Multi-Child Management

  • Grade-based profiles (PreK through 12th grade)
  • Independence levels for age-appropriate interfaces
  • Kids Mode with PIN-protected parent controls
  • Individual progress tracking per child

πŸ“š Comprehensive Curriculum Planning

  • Hierarchical structure: Subjects β†’ Units β†’ Topics β†’ Sessions
  • Flexible scheduling with time blocks and commitment types
  • Age-appropriate recommendations and quality heuristics
  • ICS calendar import for external activities

🧠 Smart Learning System

  • Spaced repetition reviews with automatic scheduling
  • Performance-based interval adjustments
  • Catch-up sessions for missed content
  • Multiple flashcard types (basic, multiple choice, cloze, true/false)

🎯 Advanced Features

  • Bulk flashcard import (Anki, Quizlet, CSV formats)
  • Multi-language support (i18n ready)
  • Real-time updates with HTMX
  • Mobile-responsive design
  • Comprehensive caching for performance

πŸš€ Quick Start

Prerequisites

  • PHP 8.2 or higher
  • PostgreSQL 15+
  • Node.js 18+
  • Composer 2.x

Installation

  1. Clone the repository

    git clone https://github.com/buger/homelearnai.git
    cd homelearnai
  2. Install dependencies

    composer install
    npm install
  3. Environment setup

    cp .env.example .env
    php artisan key:generate
  4. Configure database Edit .env with your PostgreSQL credentials:

    DB_CONNECTION=pgsql
    DB_HOST=127.0.0.1
    DB_PORT=5432
    DB_DATABASE=homelearnai
    DB_USERNAME=your_username
    DB_PASSWORD=your_password
  5. Run migrations

    php artisan migrate
    php artisan db:seed  # Optional: Add sample data
  6. Build assets

    npm run build
  7. Start the development server

    php artisan serve
    npm run dev  # In another terminal for hot-reload

Visit http://localhost:8000 to access the application.

πŸ§ͺ Testing

The project includes comprehensive test coverage (100% pass rate):

# Run all tests
php artisan test

# Run with coverage
php artisan test --coverage

# Run E2E tests
npm run test:e2e

# Run specific test suites
php artisan test --testsuite=Feature
php artisan test --testsuite=Unit

πŸ“– Documentation

Project Structure

homelearnai/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ Http/Controllers/   # Request handlers
β”‚   β”œβ”€β”€ Models/             # Eloquent models
β”‚   β”œβ”€β”€ Services/           # Business logic
β”‚   └── Http/Middleware/    # Request middleware
β”œβ”€β”€ resources/
β”‚   β”œβ”€β”€ views/              # Blade templates
β”‚   β”œβ”€β”€ js/                 # JavaScript files
β”‚   └── css/                # Stylesheets
β”œβ”€β”€ database/
β”‚   β”œβ”€β”€ migrations/         # Database migrations
β”‚   └── factories/          # Model factories
β”œβ”€β”€ tests/
β”‚   β”œβ”€β”€ Feature/            # Feature tests
β”‚   β”œβ”€β”€ Unit/               # Unit tests
β”‚   └── e2e/                # End-to-end tests
└── routes/
    └── web.php             # Web routes

Key Technologies

  • Backend: Laravel 11 with PHP 8.2+
  • Database: PostgreSQL with Eloquent ORM
  • Frontend: HTMX for dynamic interactions, Alpine.js for reactivity
  • Styling: Tailwind CSS for modern, responsive design
  • Testing: PHPUnit for backend, Playwright for E2E
  • Development: Vite for asset bundling, Laravel Pint for code formatting

Core Concepts

1. Learning Hierarchy

Subject (e.g., Mathematics)
  └── Unit (e.g., Algebra Basics)
      └── Topic (e.g., Linear Equations)
          └── Session (e.g., Practice Problems)
              └── Flashcards (Study materials)

2. Review System

  • Spaced Repetition: Automatically schedules reviews based on performance
  • Intervals: 1 day β†’ 3 days β†’ 7 days β†’ 14 days β†’ 30 days
  • Performance Tracking: Adjusts intervals based on student success

3. Kids Mode

  • Simplified interface for younger learners
  • PIN-protected exit to parent dashboard
  • Age-appropriate content and interactions
  • Progress celebration and rewards

πŸ› οΈ Development

Running Locally

# Start all services
make s  # Custom makefile command

# Or run individually
php artisan serve       # Laravel server
npm run dev            # Vite dev server
php artisan queue:work # Queue worker

Code Quality

# PHP formatting
./vendor/bin/pint

# JavaScript linting
npm run lint
npm run lint:fix

# Type checking
npm run type-check

# Run all quality checks
npm run test:all

Database Management

# Create new migration
php artisan make:migration create_example_table

# Run migrations
php artisan migrate

# Rollback migrations
php artisan migrate:rollback

# Refresh database (WARNING: Deletes all data)
php artisan migrate:fresh --seed

🀝 Contributing

We welcome contributions! Please follow these steps:

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

Coding Standards

  • Follow PSR-12 for PHP code
  • Use Laravel best practices
  • Write tests for new features
  • Update documentation as needed

πŸ“„ License

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

πŸ™ Acknowledgments

πŸ“ž Support

For issues, questions, or suggestions:

🚦 Project Status

Tests Coverage Status


Made with ❀️ for homeschool families everywhere