How shivan118/ai-powered-fitness-coach-with-personalized-workouts works
Project type and purpose
• This is a Python-based, single-page web application (full-stack monolith) that serves as an AI-powered fitness coach.
• The frontend UI is built with Streamlit; the backend contains business logic for generating workout plans via LangChain & the OpenAI API.
File structure
• Top-level files:
– app.py → Streamlit entry point (UI + routing)
– workout_generate.py → Core “service” that builds prompts and processes AI responses
– logger.py → Central logging utility for events & errors
– main.py → (Optional) script entry or orchestration (could wire modules)
– test.py/test2.py → Unit/integration tests for modules
– requirements.txt → Dependency manifest (Streamlit, LangChain, OpenAI, PDF libs, etc.)
• No separate “frontend/” and “backend/” folders; everything lives at root but naturally splits into:
– Presentation layer (app.py + Streamlit UI components)
– Business layer (workout_generate.py + LangChain integration)
– Infrastructure/utilities (logger.py, PDF export, session history in Streamlit)
– External dependencies (OpenAI API)
– Tests
README for additional insights
• Data flow is explicitly described: user input → workout generator → LangChain → OpenAI → UI → optional PDF download → session history.
• Technologies: Python 3.10, Streamlit, LangChain, OpenAI API.