How gauthiii/movieagent works
Project type and purpose
• This is a small full-stack web application called Movie AI Agent.
• Purpose: Provide a beautiful frontend UI where users type a movie name, send it to an Express/Node backend, which in turn invokes the Google Gemini API to fetch movie details (synopsis, cast, director, poster, etc.) and returns clean JSON for the frontend to render.
File structure
• Top level:
• package.json / package-lock.json – npm dependencies (Express, dotenv, etc.)
• README.md, LICENSE, .gitignore – docs and config.
• /backend
• server.js – Express server, listens (e.g. port 3001), defines POST /leo endpoint, serves static files (likely the frontend).
• gemini.js – wraps the call to Google Gemini AI API, reads API key from .env.
• /frontend
• index.html – single-page UI, includes TailwindCSS and Animate.css.
• script.js – vanilla JS: captures user input, does fetch(POST '/leo'), parses JSON response, manipulates DOM to show cards and images.
Additional insights from README
• No internal database—relies exclusively on an external AI service.
• Uses TailwindCSS + Animate.css for styling.
• The backend’s core responsibility is routing and API orchestration (no business logic beyond wrapping Gemini).
• Frontend is purely static, dynamic UI updated via fetch.