├── backend ├── __init__.py ├── tools │ ├── __init__.py │ ├── test_case_generator.py │ ├── complexity_analyser.py │ ├── explanation_generator.py │ ├── code_generator.py │ └── visualisation_generator.py ├── requirements.txt ├── langgraph.json ├── base.py ├── run_agent.py └── graph.py ├── agent ├── dsa_agent │ ├── __init__.py │ ├── nodes │ │ ├── question.py │ │ ├── visualiser.py │ │ ├── coding.py │ │ ├── explainer.py │ │ ├── complexity_finder.py │ │ └── __init__.py │ ├── demo.py │ ├── state.py │ ├── edges │ │ ├── code_verify.py │ │ ├── visualisation_verify.py │ │ ├── explanation_verify.py │ │ ├── complexity_verify.py │ │ └── __init__.py │ └── agent.py ├── .gitignore ├── .langgraph_api │ ├── store.pckl │ ├── .langgraph_ops.pckl │ ├── store.vectors.pckl │ ├── .langgraph_checkpoint.1.pckl │ ├── .langgraph_checkpoint.2.pckl │ └── .langgraph_retry_counter.pckl ├── langgraph.json └── pyproject.toml ├── screenshots ├── cover.png ├── codechef-one.png ├── codechef-two.png ├── codechef-one-diagram.png └── codechef-two-diagram.png ├── frontend-interface ├── app │ ├── favicon.ico │ ├── layout.tsx │ ├── api │ │ └── copilotkit │ │ │ └── route.ts │ ├── globals.css │ ├── not-found.tsx │ └── page.tsx ├── public │ ├── thumbnail.png │ ├── vercel.svg │ ├── window.svg │ ├── file.svg │ ├── globe.svg │ └── next.svg ├── next.config.ts ├── postcss.config.mjs ├── lib │ └── utils.ts ├── eslint.config.mjs ├── components.json ├── .gitignore ├── tsconfig.json ├── components │ ├── ui │ │ ├── textarea.tsx │ │ ├── input.tsx │ │ ├── slider.tsx │ │ ├── avatar.tsx │ │ ├── alert.tsx │ │ ├── tabs.tsx │ │ ├── button.tsx │ │ ├── card.tsx │ │ └── select.tsx │ ├── StarComponent.tsx │ ├── ProblemInput.tsx │ ├── StepNavigation.tsx │ ├── ComplexityInput.tsx │ ├── TestCases.tsx │ ├── VideoSection.tsx │ ├── ChatInterface.tsx │ ├── SolutionDisplay.tsx │ ├── Editor.tsx │ └── MermaidRenderer.tsx ├── package.json └── tailwind.config.ts ├── .github └── workflows │ └── ci.yml ├── LICENSE └── README.md /backend/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /agent/dsa_agent/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/tools/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /agent/.gitignore: -------------------------------------------------------------------------------- 1 | venv/ 2 | __pycache__/ 3 | *.pyc 4 | .env 5 | .vercel 6 | myenv/ -------------------------------------------------------------------------------- /screenshots/cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ARYPROGRAMMER/Learn-Coding-with-Copilotkit/HEAD/screenshots/cover.png -------------------------------------------------------------------------------- /backend/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ARYPROGRAMMER/Learn-Coding-with-Copilotkit/HEAD/backend/requirements.txt -------------------------------------------------------------------------------- /screenshots/codechef-one.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ARYPROGRAMMER/Learn-Coding-with-Copilotkit/HEAD/screenshots/codechef-one.png -------------------------------------------------------------------------------- /screenshots/codechef-two.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ARYPROGRAMMER/Learn-Coding-with-Copilotkit/HEAD/screenshots/codechef-two.png -------------------------------------------------------------------------------- /agent/.langgraph_api/store.pckl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ARYPROGRAMMER/Learn-Coding-with-Copilotkit/HEAD/agent/.langgraph_api/store.pckl -------------------------------------------------------------------------------- /frontend-interface/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ARYPROGRAMMER/Learn-Coding-with-Copilotkit/HEAD/frontend-interface/app/favicon.ico -------------------------------------------------------------------------------- /screenshots/codechef-one-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ARYPROGRAMMER/Learn-Coding-with-Copilotkit/HEAD/screenshots/codechef-one-diagram.png -------------------------------------------------------------------------------- /screenshots/codechef-two-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ARYPROGRAMMER/Learn-Coding-with-Copilotkit/HEAD/screenshots/codechef-two-diagram.png -------------------------------------------------------------------------------- /agent/.langgraph_api/.langgraph_ops.pckl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ARYPROGRAMMER/Learn-Coding-with-Copilotkit/HEAD/agent/.langgraph_api/.langgraph_ops.pckl -------------------------------------------------------------------------------- /agent/.langgraph_api/store.vectors.pckl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ARYPROGRAMMER/Learn-Coding-with-Copilotkit/HEAD/agent/.langgraph_api/store.vectors.pckl -------------------------------------------------------------------------------- /frontend-interface/public/thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ARYPROGRAMMER/Learn-Coding-with-Copilotkit/HEAD/frontend-interface/public/thumbnail.png -------------------------------------------------------------------------------- /frontend-interface/public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /agent/.langgraph_api/.langgraph_checkpoint.1.pckl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ARYPROGRAMMER/Learn-Coding-with-Copilotkit/HEAD/agent/.langgraph_api/.langgraph_checkpoint.1.pckl -------------------------------------------------------------------------------- /agent/.langgraph_api/.langgraph_checkpoint.2.pckl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ARYPROGRAMMER/Learn-Coding-with-Copilotkit/HEAD/agent/.langgraph_api/.langgraph_checkpoint.2.pckl -------------------------------------------------------------------------------- /agent/.langgraph_api/.langgraph_retry_counter.pckl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ARYPROGRAMMER/Learn-Coding-with-Copilotkit/HEAD/agent/.langgraph_api/.langgraph_retry_counter.pckl -------------------------------------------------------------------------------- /frontend-interface/next.config.ts: -------------------------------------------------------------------------------- 1 | import type { NextConfig } from "next"; 2 | 3 | const nextConfig: NextConfig = { 4 | /* config options here */ 5 | }; 6 | 7 | export default nextConfig; 8 | -------------------------------------------------------------------------------- /frontend-interface/postcss.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('postcss-load-config').Config} */ 2 | const config = { 3 | plugins: { 4 | tailwindcss: {}, 5 | }, 6 | }; 7 | 8 | export default config; 9 | -------------------------------------------------------------------------------- /agent/langgraph.json: -------------------------------------------------------------------------------- 1 | { 2 | "python_version": "3.12", 3 | "dockerfile_lines": [], 4 | "dependencies": ["."], 5 | "graphs": { 6 | "dsa_agent": "./dsa_agent/agent.py:graph" 7 | }, 8 | "env": ".env" 9 | } -------------------------------------------------------------------------------- /frontend-interface/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { clsx, type ClassValue } from "clsx" 2 | import { twMerge } from "tailwind-merge" 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /backend/langgraph.json: -------------------------------------------------------------------------------- 1 | { 2 | "python_version": "3.12", 3 | "dockerfile_lines": [], 4 | "dependencies": ["."], 5 | "graphs": { 6 | "dsa_agent": "./graph.py:create_graph" 7 | }, 8 | "env": ".env" 9 | } -------------------------------------------------------------------------------- /frontend-interface/public/window.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend-interface/public/file.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /agent/dsa_agent/nodes/question.py: -------------------------------------------------------------------------------- 1 | from langchain.text_splitter import RecursiveCharacterTextSplitter 2 | 3 | class QuestionRetriever: 4 | def __init__(self, question): 5 | self.question = question 6 | 7 | def update_question(self, question): 8 | self.question = question 9 | 10 | 11 | question = "Add 2 numbers without arithmetic operators" 12 | question_instance = QuestionRetriever(question) -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: Trigger Render Deploy 2 | 3 | on: 4 | schedule: 5 | - cron: '*/15 * * * *' # every 15 minutes 6 | 7 | jobs: 8 | ping-render: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Call Render Deploy Hook 12 | run: | 13 | curl https://learn-coding-with-copilotkit.onrender.com/copilotkit 14 | curl https://learn-coding-with-copilotkit-1.onrender.com/copilotkit -------------------------------------------------------------------------------- /frontend-interface/eslint.config.mjs: -------------------------------------------------------------------------------- 1 | import { dirname } from "path"; 2 | import { fileURLToPath } from "url"; 3 | import { FlatCompat } from "@eslint/eslintrc"; 4 | 5 | const __filename = fileURLToPath(import.meta.url); 6 | const __dirname = dirname(__filename); 7 | 8 | const compat = new FlatCompat({ 9 | baseDirectory: __dirname, 10 | }); 11 | 12 | const eslintConfig = [ 13 | ...compat.extends("next/core-web-vitals", "next/typescript"), 14 | ]; 15 | 16 | export default eslintConfig; 17 | -------------------------------------------------------------------------------- /frontend-interface/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "new-york", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.ts", 8 | "css": "app/globals.css", 9 | "baseColor": "neutral", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils", 16 | "ui": "@/components/ui", 17 | "lib": "@/lib", 18 | "hooks": "@/hooks" 19 | }, 20 | "iconLibrary": "lucide" 21 | } -------------------------------------------------------------------------------- /backend/base.py: -------------------------------------------------------------------------------- 1 | from typing import Dict, List, Optional 2 | from langchain_core.messages import AIMessage, HumanMessage 3 | from langchain_core.output_parsers import StrOutputParser 4 | from langchain_groq import ChatGroq 5 | from langgraph.prebuilt import ToolExecutor 6 | from langchain_core.tools import Tool 7 | import os 8 | from dotenv import load_dotenv 9 | load_dotenv() 10 | 11 | class BaseTool: 12 | def __init__(self): 13 | self.model = ChatGroq( 14 | api_key=os.getenv("GROQ_API_KEY"), 15 | model="llama-3.3-70b-versatile", 16 | temperature=0.5, 17 | ) 18 | self.output_parser = StrOutputParser() -------------------------------------------------------------------------------- /frontend-interface/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | .gitignore 3 | 4 | # dependencies 5 | /node_modules 6 | /.pnp 7 | .pnp.* 8 | .yarn/* 9 | !.yarn/patches 10 | !.yarn/plugins 11 | !.yarn/releases 12 | !.yarn/versions 13 | 14 | # testing 15 | /coverage 16 | 17 | # next.js 18 | /.next/ 19 | /out/ 20 | 21 | # production 22 | /build 23 | 24 | # misc 25 | .DS_Store 26 | *.pem 27 | 28 | # debug 29 | npm-debug.log* 30 | yarn-debug.log* 31 | yarn-error.log* 32 | .pnpm-debug.log* 33 | 34 | # env files (can opt-in for committing if needed) 35 | .env* 36 | 37 | # vercel 38 | .vercel 39 | 40 | # typescript 41 | *.tsbuildinfo 42 | next-env.d.ts 43 | -------------------------------------------------------------------------------- /frontend-interface/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2017", 4 | "lib": ["dom", "dom.iterable", "esnext"], 5 | "allowJs": true, 6 | "skipLibCheck": true, 7 | "strict": true, 8 | "noEmit": true, 9 | "esModuleInterop": true, 10 | "module": "esnext", 11 | "moduleResolution": "bundler", 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "jsx": "preserve", 15 | "incremental": true, 16 | "plugins": [ 17 | { 18 | "name": "next" 19 | } 20 | ], 21 | "paths": { 22 | "@/*": ["./*"] 23 | } 24 | }, 25 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], 26 | "exclude": ["node_modules"] 27 | } 28 | -------------------------------------------------------------------------------- /frontend-interface/components/ui/textarea.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | import { cn } from "@/lib/utils" 4 | 5 | const Textarea = React.forwardRef< 6 | HTMLTextAreaElement, 7 | React.ComponentProps<"textarea"> 8 | >(({ className, ...props }, ref) => { 9 | return ( 10 |