A modern web application that provides AI-powered learning assistance through an interactive chat interface. Built with Laravel, Vue 3, and Google's Gemini AI.
The Learning Assistance Platform is a web-based application designed to enhance the learning experience through AI-powered chat interactions. It leverages Google's Gemini AI model to provide intelligent responses to user queries, making it an ideal tool for educational assistance and knowledge sharing.
- Framework: Laravel 12
- Language: PHP 8.4
- Database: PostgreSQL
- Authentication: Laravel Breeze
- API Integration: Google Gemini AI
- Framework: Vue 3
- Build Tool: Vite
- UI Components: Shadcn UI
- State Management: Vue 3 Composition API
- Styling: Tailwind CSS
- Icons: Lucide Vue
- Package Manager: npm
- Code Formatting: Prettier
- Linting: ESLint
- Testing: PHPUnit
- API Testing: Postman
graph TD
A[User Browser] --> B[Vue 3 Frontend]
B --> C[API Routes]
C --> D[Laravel Backend]
D --> E[Google Gemini API]
E --> F[AI Response]
F --> D
D --> B
B --> A
graph TD
A[Chatbot.vue] --> B[Message Input]
A --> C[Message Display]
A --> D[API Integration]
D --> E[ChatController]
E --> F[Google Gemini API]
F --> E
E --> D
D --> A
- AI-powered chat interface using Google Gemini
- Real-time message sending and receiving
- User authentication and authorization
- Role-based access control (RBAC)
- Smooth scrolling chat interface
- Error handling and loading states
- Responsive design
The application uses a role-based access control system with three main roles:
- Full access to all system features
- Can manage users, including creating and deleting admin accounts
- Can modify user roles and permissions
- Has access to system settings and configurations
- Can create, edit, and delete lessons
- Can view user activity and analytics
- Cannot modify other admin or super admin accounts
- Can view and read lessons
- Can interact with the AI chat assistant
- Can track personal learning progress
Permissions are enforced at both the route and controller level, ensuring that users can only access features appropriate to their role.
Watch the project in action:
- Clone the repository:
git clone [email protected]:jvc-byte/learning_assistance.git cd learning_assistance
- Install PHP dependencies:
composer install
- Install Node.js dependencies:
npm install
- Copy
.env.example
to.env
and configure:- Database settings
- Google AI API key
- Other environment variables
- Generate application key:
php artisan key:generate
- Run database migrations:
php artisan migrate
- Build the Vue assets:
npm run build
- Start the Laravel development server:
php artisan serve --host=0.0.0.0 php artisan serve
- Access the application at
http://localhost:8000
GOOGLE_AI_API_KEY
: Your Google AI API keyDB_DATABASE
: Database nameDB_USERNAME
: Database usernameDB_PASSWORD
: Database password- Other Laravel standard environment variables
The application uses Google's Gemini API for AI responses. Ensure you have:
- A valid Google Cloud project
- The Generative AI API enabled
- Billing enabled in your Google Cloud project
- A valid API key with proper permissions
learning_assistance/
βββ app/ # Laravel application code
β βββ Http/ # Controllers and middleware
β β βββ Controllers/ # Main controllers
β β β βββ Controller.php # Base controller
β β βββ Api/ # API controllers
β β β βββ ChatController.php # AI chat API
β β βββ Auth/ # Authentication controllers
β β βββ Settings/ # Settings controllers
β βββ ...
βββ resources/ # Frontend resources
β βββ js/ # JavaScript code
β β βββ pages/ # Vue components
β β βββ Chatbot.vue # AI chat interface
β β βββ Dashboard.vue # Main dashboard
β β βββ Welcome.vue # Welcome page
β β βββ auth/ # Authentication components
β β βββ settings/ # Settings components
β βββ views/ # Blade templates
βββ routes/ # Route definitions
β βββ web.php
βββ public/ # Public assets
βββ storage/ # Application storage
βββ tests/ # Test files
- All API requests are authenticated
- CSRF protection is enabled
- Input validation is implemented
- Environment variables are properly secured
- API keys are stored in environment variables
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Laravel Framework
- Vue 3
- Google Gemini AI
- Shadcn UI
- Tailwind CSS
- All contributors who helped with this project