Skillwern is a learning platform I built earlier. For this hackathon, I added an AI course advisor and PayPal checkout on top of it.

WHAT IT DOES A student tells the advisor what they want to learn and their budget. The agent searches the real course catalog in MongoDB, checks which courses the student already owns, and recommends options. When the student picks a course, the agent shows a checkout card. The agent can never charge anyone: the student approves every payment on PayPal.

HOW PAYPAL IS USED PayPal Orders v2 REST API in sandbox: the server creates the order and captures it after approval, with the price always read from the database. PayPal JS SDK buttons are used in the browser. After a completed capture, the student is enrolled automatically. Payments are stored in the database and each order can only be captured once.

HOW AI IS USED Google Gemini through the @google/genai SDK with function calling. The agent has three tools: search_courses, get_my_enrollments, and show_checkout. It can only recommend courses returned by the catalog search, and show_checkout only displays a card; it does not move money. An Agent Activity panel shows every tool the agent used. Chat history is saved per user. If one Gemini model is busy or out of quota, the agent falls back to another.

WHAT I BUILT DURING THE HACKATHON (after Oct 1, 2026) The LMS (auth, courses, enrollment, lessons, progress, dashboard, admin) existed before. New: course prices, the PayPal integration and payment records, paid checkout on the course page that also blocks free enrollment for paid courses, the AI agent, the assistant page with chat, checkout card and Agent Activity panel, saved chat history, and the model fallback.

CHALLENGES Sandbox accounts created for India failed at the PayPal checkout step, while US sandbox accounts worked. The free Gemini tier also has small daily limits, so I added model fallback, timeouts, and a lower thinking level for faster replies.

WHAT'S NEXT Refunds with human approval, instructor payouts, and richer course matching.

HOW TO TEST Open the live demo and log in with the demo account listed in the README, or sign up. Open AI Advisor, ask for a course, then pay with the PayPal sandbox buyer from the README. Note: the free Gemini tier has a daily limit, so if the AI says it is busy, try again in a few minutes. The demo video shows the full flow.

Built With

Share this project:

Updates

Submission history