laravel-demo
Prathamesh-Udoshi/laravel-demo
A Laravel 13 experimentation sandbox showcase featuring YouTube transcript scraping, AI-powered course syllabus and quiz generators, an AI tweet generator, and custom MCP local servers.
Instalação
npx convez-ai Prathamesh-Udoshi/laravel-demo1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
README
A tradução para o português deste README ainda está na fila.
Laravel Demo & Experimentation Playground
A personal Laravel 13 playground containing unrelated sandbox experiments, featuring independent AI-driven modules (using Groq & Gemini fallbacks), browser-recorded speech-to-text oral exam evaluators, and local MCP server integrations.
🧪 The Experimental Modules
Here are the independent modules implemented in this playground:
1. Course Assessment Planner
An experiment in combining YouTube content scraping with LLM generation to draft academic syllabus structures and test materials.
- What it does: Takes a YouTube playlist URL, distributes the videos across a 4, 8, or 12-week course, grabs transcripts from YouTube, and uses AI (Groq/Gemini fallbacks) to write syllabus summaries. It then auto-generates 10-question MCQ quizzes and subjective homework tasks.
- Where to find it: Access it at
/courses(configured inroutes/web.phpvia CourseController).
2. AI Viva Voce (Oral Exam Evaluator)
An experiment in conversational speech-to-text academic assessments.
- What it does: Conducts a multi-turn oral exam between an AI examiner and the student. Students record their verbal responses directly in the browser, which are transcribed using the Groq Whisper API and evaluated on concepts, technical delivery, and style to compile a final scorecard.
- Where to find it: Access it from the Course Planner detail page under
/courses/{courseId}/viva(configured inroutes/web.phpvia VivaController).
3. AI Tweet Generator
A small integration testing quick prompt completions with the Groq API.
- What it does: Generates a single tweet under 280 characters based on a custom topic and selected tone (casual, professional, humorous, or inspirational).
- Where to find it: Access it at
/tweet-generator(configured via TweetGeneratorController).
4. Student & Daily Diary Evaluator
A sample CRUD and journal-logging experiment.
- What it does: Manages student records and tests daily journal/log evaluations (blockers, learnings, hours, skills) against academic guidelines by posting to an evaluation endpoint.
- Where to find it: Access it at
/sample(configured via StudentController and AIController).
5. Model Context Protocol (MCP) Server
An exploration of the Model Context Protocol to let AI agents execute actions locally.
- What it does: Configures a local MCP server (
HelloServer) usinglaravel/mcp. - Where to find it: Defined in the ai.php route file.
6. Service Container SMS Service Test
- What it does: A simple route to test resolving and invoking the custom
SmsServicefrom the Laravel service container. - Where to find it: Access it at
/test-sms.
7. Interactive AI Lecture Tutor (RAG)
An experiment in Retrieval-Augmented Generation (RAG) and local semantic search using Laravel 13 vector integrations.
- What it does: Allows students to ask questions about courses in the Course Planner. This works exclusively for courses dynamically created and processed in the Course Planner (
/courses). The system segments lecture transcripts into overlapping chunks, generates 3072-dimensional Gemini embeddings on-the-fly, and performs a semantic search. The AI Agent (LectureTutor) is strictly instructed to only answer using retrieved context, politely declining off-topic queries. - Vector Fallback Engine: If pgvector extension is not installed (common on local Windows setups), the system catches the query exception and dynamically falls back to computing cosine similarity mathematically inside PHP, keeping search fully functional.
- Where to find it: Access it at
/tutor(configured via TutorChatController and routes inroutes/web.php).
🛠️ Stack & Technologies Used
- Framework: Laravel 13 (PHP ^8.3)
- Database: PostgreSQL (with optional
pgvectorextension; fallbacks to native PHP cosine similarity logic if missing) - Frontend: Blade templates, Vanilla CSS (harmonious light mode styling), CSS micro-animations, real-time RAG context inspector
- AI Orchestration: Custom multi-model failover logic in AIService calling Groq Cloud (Llama & Whisper for Speech-to-Text) and Google Gemini APIs. Vectorization and RAG conversation memory managed via the
laravel/aiSDK. - Testing & Tools: Pest PHP, Laravel Pail, Laravel Tinker, Laravel MCP.
⚙️ How to Setup and Run Locally
-
Clone the repository:
git clone https://github.com/Prathamesh-Udoshi/laravel-demo.git cd myapp -
Configure Environment Variables: Copy
.env.exampleto.envand fill in your API keys (Groq and/or Gemini) and database credentials:cp .env.example .env -
Install Dependencies and Setup Database: Run the pre-configured Composer script which handles key generation, migrations, npm builds, and dependencies:
composer run setup -
Vectorize Transcripts and Process Background Jobs: When new courses are created or weeks are processed, transcripts are chunked and vectorized using Laravel background jobs. You can run or process these manually:
- Start the queue worker manually to process queued embedding jobs in the background:
php artisan queue:work # or php artisan queue:listen - Force run vectorization on all transcripts synchronously at once:
php artisan app:chunk-transcripts
- Start the queue worker manually to process queued embedding jobs in the background:
-
Start the local server:
npm run dev(This runs the PHP server, Vite assets, and the queue listener concurrently. If you run your server through Laravel Herd, make sure to either start the queue worker manually as shown in step 4, or set
QUEUE_CONNECTION=syncin your.envto process jobs instantly).