From d7e572490af90b3082201ef9598d02dfb60d5481 Mon Sep 17 00:00:00 2001 From: Shiv Date: Mon, 29 Jun 2026 16:16:00 +0530 Subject: [PATCH 1/8] refactor(core): add database architecture foundation --- lib/db/repositories/pyq.repository.ts | 0 lib/db/repositories/subject.repository.ts | 0 lib/db/repositories/topic.repository.ts | 0 lib/db/utils/slug.ts | 41 +++++++++++++++++++ lib/db/utils/topic-id.ts | 48 +++++++++++++++++++++++ lib/services/syllabus.service.ts | 0 lib/services/topic.service.ts | 0 7 files changed, 89 insertions(+) create mode 100644 lib/db/repositories/pyq.repository.ts create mode 100644 lib/db/repositories/subject.repository.ts create mode 100644 lib/db/repositories/topic.repository.ts create mode 100644 lib/db/utils/slug.ts create mode 100644 lib/db/utils/topic-id.ts create mode 100644 lib/services/syllabus.service.ts create mode 100644 lib/services/topic.service.ts diff --git a/lib/db/repositories/pyq.repository.ts b/lib/db/repositories/pyq.repository.ts new file mode 100644 index 0000000..e69de29 diff --git a/lib/db/repositories/subject.repository.ts b/lib/db/repositories/subject.repository.ts new file mode 100644 index 0000000..e69de29 diff --git a/lib/db/repositories/topic.repository.ts b/lib/db/repositories/topic.repository.ts new file mode 100644 index 0000000..e69de29 diff --git a/lib/db/utils/slug.ts b/lib/db/utils/slug.ts new file mode 100644 index 0000000..10b8bf1 --- /dev/null +++ b/lib/db/utils/slug.ts @@ -0,0 +1,41 @@ +/** + * Converts a title into a canonical URL-safe slug. + * + * Examples: + * "Binary Search Tree" -> "binary-search-tree" + * "DFS/BFS" -> "dfs-bfs" + * " Hash Table " -> "hash-table" + * */ + +export function createSlug(value: string): string { + if (!value || typeof value !== "string") { + throw new Error("createSlug(): value must be a non-empty string."); + } + + return ( + value + .trim() + .toLowerCase() + + // Replace "&" with "and" + .replace(/&/g, " and ") + + // Replace "/" "\" "_" with spaces + .replace(/[\/\\_]+/g, " ") + + // Remove apostrophes + .replace(/['’]/g, "") + + // Remove all remaining special characters + .replace(/[^a-z0-9\s-]/g, "") + + // Collapse whitespace + .replace(/\s+/g, "-") + + // Collapse multiple dashes + .replace(/-+/g, "-") + + // Remove leading/trailing dash + .replace(/^-|-$/g, "") + ); +} diff --git a/lib/db/utils/topic-id.ts b/lib/db/utils/topic-id.ts new file mode 100644 index 0000000..c6e0f5b --- /dev/null +++ b/lib/db/utils/topic-id.ts @@ -0,0 +1,48 @@ +import { createSlug } from "./slug"; + +export interface TopicIdentifierInput { + subjectCode: string; + moduleNumber: number; + topicTitle: string; +} + +/** + * Generates a stable topic ID. + * + * Example: + * + * subjectCode : BT202 + * moduleNumber : 2 + * topicTitle : Binary Search Tree + * + * Returns: + * + * bt202-u2-binary-search-tree + */ + +export function createTopicId({ + subjectCode, + moduleNumber, + topicTitle, +}: TopicIdentifierInput): string { + if (!subjectCode.trim()) { + throw new Error("Subject code is required."); + } + + if (moduleNumber < 1) { + throw new Error("Module number must be greater than zero."); + } + + if (!topicTitle.trim()) { + throw new Error("Topic title is required."); + } + + const normalizedSubject = subjectCode + .trim() + .toLowerCase() + .replace(/\s+/g, ""); + + const slug = createSlug(topicTitle); + + return `${normalizedSubject}-u${moduleNumber}-${slug}`; +} diff --git a/lib/services/syllabus.service.ts b/lib/services/syllabus.service.ts new file mode 100644 index 0000000..e69de29 diff --git a/lib/services/topic.service.ts b/lib/services/topic.service.ts new file mode 100644 index 0000000..e69de29 From 8444e677e5443741d63038b805cfb3b02ca8b523 Mon Sep 17 00:00:00 2001 From: Shiv Date: Mon, 29 Jun 2026 16:37:02 +0530 Subject: [PATCH 2/8] chore(migration): initialize syllabus discovery tool --- scripts/migrate-syllabus.ts | 62 +++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 scripts/migrate-syllabus.ts diff --git a/scripts/migrate-syllabus.ts b/scripts/migrate-syllabus.ts new file mode 100644 index 0000000..da82b29 --- /dev/null +++ b/scripts/migrate-syllabus.ts @@ -0,0 +1,62 @@ +import fs from "node:fs"; +import path from "node:path"; + +const ROOT_DIRECTORY = path.join( + process.cwd(), + "content", + "rgpv", + "common" +); + +const SYLLABUS_FILE_NAME = "syllabus.json"; + +function findSyllabusFiles(directory: string, results: string[] = []): string[] { + const entries = fs.readdirSync(directory, { withFileTypes: true }); + + for (const entry of entries) { + const fullPath = path.join(directory, entry.name); + + if (entry.isDirectory()) { + findSyllabusFiles(fullPath, results); + continue; + } + + if (entry.isFile() && entry.name === SYLLABUS_FILE_NAME) { + results.push(fullPath); + } + } + + return results; +} + +function main() { + console.log("\nšŸ” HyperLearningTech Syllabus Discovery Tool\n"); + + if (!fs.existsSync(ROOT_DIRECTORY)) { + console.error(`āŒ Directory not found:\n${ROOT_DIRECTORY}`); + process.exit(1); + } + + const syllabusFiles = findSyllabusFiles(ROOT_DIRECTORY); + + if (syllabusFiles.length === 0) { + console.log("⚠ No syllabus files found."); + return; + } + + console.log(`āœ… Found ${syllabusFiles.length} syllabus files\n`); + + syllabusFiles + .sort() + .forEach((filePath, index) => { + const relativePath = path.relative(ROOT_DIRECTORY, filePath); + + console.log( + `${String(index + 1).padStart(2, "0")}. ${relativePath}` + ); + }); + + console.log("\nšŸŽ‰ Discovery completed successfully."); +} + +main(); From 0ccdb431053e6dd50e5633797a061e63b305e086 Mon Sep 17 00:00:00 2001 From: Shiv Date: Sat, 4 Jul 2026 14:53:53 +0530 Subject: [PATCH 3/8] refactor(ai): migrate syllabus to structured topic model --- app/api/ai/workspace/route.ts | 20 +- .../[branch]/[semester]/[subject]/ai/page.tsx | 113 +++--- .../[semester]/[subject]/syllabus/page.tsx | 3 +- components/ai/workspace-chat.tsx | 14 +- components/syllabus/module-card.tsx | 13 +- .../common/semester-1/bt-201/syllabus.json | 339 +++++++++++++++--- .../common/semester-1/bt-203/syllabus.json | 237 +++++++++--- .../common/semester-1/bt-204/syllabus.json | 230 +++++++++--- .../common/semester-1/bt-205/syllabus.json | 244 ++++++++++--- .../common/semester-2/bt-101/syllabus.json | 315 +++++++++++++--- .../common/semester-2/bt-103/syllabus.json | 230 +++++++++--- .../common/semester-2/bt-104/syllabus.json | 300 +++++++++++++--- .../common/semester-2/bt-105/syllabus.json | 195 ++++++++-- .../common/semester-2/bt-202/syllabus.json | 283 ++++++++++++--- lib/content/index.ts | 50 +++ scripts/migrate-syllabus.ts | 307 ++++++++++++++-- types/syllabus.ts | 11 + types/topic.ts | 8 + 18 files changed, 2422 insertions(+), 490 deletions(-) create mode 100644 types/syllabus.ts diff --git a/app/api/ai/workspace/route.ts b/app/api/ai/workspace/route.ts index 158a2a0..530fb8a 100644 --- a/app/api/ai/workspace/route.ts +++ b/app/api/ai/workspace/route.ts @@ -5,10 +5,10 @@ import { generateWorkspace } from "@/lib/ai/workspace-service"; import { WorkspaceAction } from "@/types/ai"; import { getPrimaryKey } from "@/lib/ai/key-manager"; import { trackMetric } from "@/lib/ai/metrics"; +import { getTopicById } from "@/lib/content"; interface WorkspaceBody { - topic?: string; - module?: string; + topicId?: string; subjectCode?: string; action?: WorkspaceAction; forceRefresh?: boolean; @@ -163,9 +163,21 @@ export async function POST(request: NextRequest) { try { const body = (await request.json()) as WorkspaceBody; - const topic = body.topic?.trim(); - const moduleTitle = body.module?.trim(); + const topicId = body.topicId?.trim(); const subjectCode = body.subjectCode?.trim().toUpperCase(); + const topicData = + topicId && subjectCode + ? await getTopicById( + "common", + "semester-1", + subjectCode.toLowerCase(), + topicId + ) + : null; + + const topic = topicData?.topic.title; + + const moduleTitle = topicData?.module.title; const forceRefresh = body.forceRefresh ?? false; const question = body.question?.trim(); const messages = body.messages || []; diff --git a/app/rgpv/[branch]/[semester]/[subject]/ai/page.tsx b/app/rgpv/[branch]/[semester]/[subject]/ai/page.tsx index 0187a25..e5fc97e 100644 --- a/app/rgpv/[branch]/[semester]/[subject]/ai/page.tsx +++ b/app/rgpv/[branch]/[semester]/[subject]/ai/page.tsx @@ -1,5 +1,6 @@ import { BrainCircuit } from "lucide-react"; import WorkspaceChat from "@/components/ai/workspace-chat"; +import { getTopicById } from "@/lib/content"; interface AIPageProps { params: Promise<{ @@ -9,17 +10,24 @@ interface AIPageProps { }>; searchParams: Promise<{ - topic?: string; - module?: string; + topicId?: string; }>; } export default async function AIPage({ params, searchParams }: AIPageProps) { const { branch, semester, subject } = await params; - const { topic, module } = await searchParams; + const { topicId } = await searchParams; - const isTopicMode = Boolean(topic) && Boolean(module); + const topicData = topicId + ? await getTopicById(branch, semester, subject, topicId) + : null; + + const topicTitle = topicData?.topic.title ?? ""; + + const moduleTitle = topicData?.module.title ?? ""; + + const isTopicMode = topicData !== null; // Suggested prompts based on topic const getSuggestedPrompts = (mainTopic: string) => { @@ -41,51 +49,57 @@ export default async function AIPage({ params, searchParams }: AIPageProps) { ]; }; - const suggestedPrompts = - isTopicMode && topic - ? getSuggestedPrompts(topic) - : [ - "Explain the concept", - "Generate notes", - "Create revision sheet", - "Generate exam questions", - "Explain with examples", - ]; + const suggestedPrompts = isTopicMode + ? getSuggestedPrompts(topicTitle) + : [ + "Explain the concept", + "Generate notes", + "Create revision sheet", + "Generate exam questions", + "Explain with examples", + ]; // Initial prompts for WorkspaceChat - const initialPrompts = - isTopicMode && topic && module - ? [ - { - prompt: `Explain ${topic} in detail`, - action: "explain", - topic: topic, - module: module, - }, - { - prompt: `Generate 5 mark answer on ${topic}`, - action: "generate", - topic: topic, - module: module, - }, - { - prompt: `Create revision sheet for ${topic}`, - action: "summarize", - topic: topic, - module: module, - }, - ] - : [ - { prompt: "Explain the concept", action: "explain" }, - { prompt: "Generate notes", action: "generate" }, - { prompt: "Create revision sheet", action: "summarize" }, - ]; + const initialPrompts = isTopicMode + ? [ + { + prompt: `Explain ${topicTitle} in detail`, + action: "explain", + topic: topicTitle, + module: moduleTitle, + }, + { + prompt: `Generate 5 mark answer on ${topicTitle}`, + action: "generate", + topic: topicTitle, + module: moduleTitle, + }, + { + prompt: `Create revision sheet for ${topicTitle}`, + action: "summarize", + topic: topicTitle, + module: moduleTitle, + }, + ] + : [ + { + prompt: "Explain the concept", + action: "explain", + }, + { + prompt: "Generate notes", + action: "generate", + }, + { + prompt: "Create revision sheet", + action: "summarize", + }, + ]; // Build welcome message with topic context - const welcomeMessage = - isTopicMode && topic - ? `Ask me anything about **${topic}**. I can help with explanations, examples, exam preparation, and suggest related topics based on your learning needs.` - : "Ask me anything about your subject. I can help with explanations, examples, and exam preparation."; + const welcomeMessage = isTopicMode + ? `Ask me anything about **${topicTitle}**. I can help with explanations, examples, exam preparation, and suggest related topics based on your learning needs.` + : "Ask me anything about your subject. I can help with explanations, examples, and exam preparation."; return (
@@ -106,11 +120,11 @@ export default async function AIPage({ params, searchParams }: AIPageProps) { {isTopicMode ? ( <>

- {topic} + {topicTitle}

- {module} + {moduleTitle}

@@ -150,14 +164,13 @@ export default async function AIPage({ params, searchParams }: AIPageProps) {

{/* Main Chat Area */} -
+
diff --git a/app/rgpv/[branch]/[semester]/[subject]/syllabus/page.tsx b/app/rgpv/[branch]/[semester]/[subject]/syllabus/page.tsx index d1367f5..9c86ac0 100644 --- a/app/rgpv/[branch]/[semester]/[subject]/syllabus/page.tsx +++ b/app/rgpv/[branch]/[semester]/[subject]/syllabus/page.tsx @@ -3,13 +3,14 @@ import { BookOpen } from "lucide-react"; import { getSyllabus, getPYQs } from "@/lib/content"; import { getQuestionsForModule } from "@/lib/content/question-mapper"; import ModuleCard from "@/components/syllabus/module-card"; +import type { Topic } from "@/types/topic"; interface Module { id: string; number: number; title: string; hours: number; - topics?: string[]; + topics?: Topic[]; questionIds?: string[]; predictedQuestionIds?: string[]; } diff --git a/components/ai/workspace-chat.tsx b/components/ai/workspace-chat.tsx index d92bc8f..01e656c 100644 --- a/components/ai/workspace-chat.tsx +++ b/components/ai/workspace-chat.tsx @@ -18,15 +18,13 @@ interface WorkspaceChatProps { subjectCode: string; initialPrompts?: Array<{ prompt: string; - topic?: string; - module?: string; + topicId?: string; action?: string; }>; welcomeMessage?: string; inputPlaceholder?: string; apiEndpoint?: string; - topic?: string; - module?: string; + topicId?: string; } export default function WorkspaceChat({ @@ -35,8 +33,7 @@ export default function WorkspaceChat({ welcomeMessage = "Ask me anything about your subject. I can help with explanations, examples, and exam preparation.", inputPlaceholder = "Type your question here...", apiEndpoint = API_ENDPOINTS.AI_WORKSPACE, - topic, - module, + topicId, }: WorkspaceChatProps) { const [messages, setMessages] = useState([]); const [input, setInput] = useState(""); @@ -95,8 +92,7 @@ export default function WorkspaceChat({ body: JSON.stringify({ question: content.trim(), subjectCode, - topic, - module, + topicId, messages: messages.map((m) => ({ role: m.role, content: m.content, @@ -223,7 +219,7 @@ export default function WorkspaceChat({

{initialPrompts.map((item, index) => { const promptText = - item.prompt || `Ask about ${item.topic || "this topic"}`; + item.prompt || `Ask about ${item.topicId || "this topic"}`; return (
diff --git a/content/rgpv/common/semester-1/bt-201/syllabus.json b/content/rgpv/common/semester-1/bt-201/syllabus.json index 8ca9690..3d79da0 100644 --- a/content/rgpv/common/semester-1/bt-201/syllabus.json +++ b/content/rgpv/common/semester-1/bt-201/syllabus.json @@ -13,20 +13,65 @@ }, "modules": [ { - "id": "module-1", + "id": "bt201-u1", "number": 1, "title": "Wave nature of particles and the Schrodinger equation", "hours": 8, "topics": [ - "Introduction to Quantum mechanics", - "Wave nature of Particles", - "operators", - "Time-dependent and time-independent Schrodinger equation for wavefunction", - "Application: Particle in a One dimensional Box", - "Born interpretation", - "Free-particle wavefunction and wave-packets", - "vg and vp relation", - "Uncertainty principle" + { + "id": "bt201-u1-introduction-to-quantum-mechanics", + "slug": "introduction-to-quantum-mechanics", + "title": "Introduction to Quantum mechanics", + "displayOrder": 1 + }, + { + "id": "bt201-u1-wave-nature-of-particles", + "slug": "wave-nature-of-particles", + "title": "Wave nature of Particles", + "displayOrder": 2 + }, + { + "id": "bt201-u1-operators", + "slug": "operators", + "title": "operators", + "displayOrder": 3 + }, + { + "id": "bt201-u1-time-dependent-and-time-independent-schrodinger-equation-for-wavefunction", + "slug": "time-dependent-and-time-independent-schrodinger-equation-for-wavefunction", + "title": "Time-dependent and time-independent Schrodinger equation for wavefunction", + "displayOrder": 4 + }, + { + "id": "bt201-u1-application-particle-in-a-one-dimensional-box", + "slug": "application-particle-in-a-one-dimensional-box", + "title": "Application: Particle in a One dimensional Box", + "displayOrder": 5 + }, + { + "id": "bt201-u1-born-interpretation", + "slug": "born-interpretation", + "title": "Born interpretation", + "displayOrder": 6 + }, + { + "id": "bt201-u1-free-particle-wavefunction-and-wave-packets", + "slug": "free-particle-wavefunction-and-wave-packets", + "title": "Free-particle wavefunction and wave-packets", + "displayOrder": 7 + }, + { + "id": "bt201-u1-vg-and-vp-relation", + "slug": "vg-and-vp-relation", + "title": "vg and vp relation", + "displayOrder": 8 + }, + { + "id": "bt201-u1-uncertainty-principle", + "slug": "uncertainty-principle", + "title": "Uncertainty principle", + "displayOrder": 9 + } ], "questionIds": [ "bt201_m1_dec2022_q1", @@ -64,20 +109,65 @@ ] }, { - "id": "module-2", + "id": "bt201-u2", "number": 2, "title": "Wave optics", "hours": 8, "topics": [ - "Huygens' principle", - "superposition of waves and interference of light by wave front splitting and amplitude splitting", - "Young's double slit experiment", - "Newton's rings", - "Michelson interferometer", - "Mach-Zehnder interferometer", - "Fraunhofer diffraction from a single slit and a circular aperture", - "the Rayleigh criterion for limit of resolution and its application to vision", - "Diffraction gratings and their resolving power" + { + "id": "bt201-u2-huygens-principle", + "slug": "huygens-principle", + "title": "Huygens' principle", + "displayOrder": 1 + }, + { + "id": "bt201-u2-superposition-of-waves-and-interference-of-light-by-wave-front-splitting-and-amplitude-splitting", + "slug": "superposition-of-waves-and-interference-of-light-by-wave-front-splitting-and-amplitude-splitting", + "title": "superposition of waves and interference of light by wave front splitting and amplitude splitting", + "displayOrder": 2 + }, + { + "id": "bt201-u2-youngs-double-slit-experiment", + "slug": "youngs-double-slit-experiment", + "title": "Young's double slit experiment", + "displayOrder": 3 + }, + { + "id": "bt201-u2-newtons-rings", + "slug": "newtons-rings", + "title": "Newton's rings", + "displayOrder": 4 + }, + { + "id": "bt201-u2-michelson-interferometer", + "slug": "michelson-interferometer", + "title": "Michelson interferometer", + "displayOrder": 5 + }, + { + "id": "bt201-u2-mach-zehnder-interferometer", + "slug": "mach-zehnder-interferometer", + "title": "Mach-Zehnder interferometer", + "displayOrder": 6 + }, + { + "id": "bt201-u2-fraunhofer-diffraction-from-a-single-slit-and-a-circular-aperture", + "slug": "fraunhofer-diffraction-from-a-single-slit-and-a-circular-aperture", + "title": "Fraunhofer diffraction from a single slit and a circular aperture", + "displayOrder": 7 + }, + { + "id": "bt201-u2-the-rayleigh-criterion-for-limit-of-resolution-and-its-application-to-vision", + "slug": "the-rayleigh-criterion-for-limit-of-resolution-and-its-application-to-vision", + "title": "the Rayleigh criterion for limit of resolution and its application to vision", + "displayOrder": 8 + }, + { + "id": "bt201-u2-diffraction-gratings-and-their-resolving-power", + "slug": "diffraction-gratings-and-their-resolving-power", + "title": "Diffraction gratings and their resolving power", + "displayOrder": 9 + } ], "questionIds": [ "bt201_m2_dec2022_q1", @@ -120,20 +210,65 @@ ] }, { - "id": "module-3", + "id": "bt201-u3", "number": 3, "title": "Introduction to solids", "hours": 8, "topics": [ - "Free electron theory of metals", - "Fermi level of Intrinsic and extrinsic", - "density of states", - "Bloch's theorem for particles in a periodic potential", - "Kronig-Penney model (no derivation) and origin of energy bands", - "V-I characteristics of PN junction", - "Zener diode", - "Solar Cell", - "Hall Effect" + { + "id": "bt201-u3-free-electron-theory-of-metals", + "slug": "free-electron-theory-of-metals", + "title": "Free electron theory of metals", + "displayOrder": 1 + }, + { + "id": "bt201-u3-fermi-level-of-intrinsic-and-extrinsic", + "slug": "fermi-level-of-intrinsic-and-extrinsic", + "title": "Fermi level of Intrinsic and extrinsic", + "displayOrder": 2 + }, + { + "id": "bt201-u3-density-of-states", + "slug": "density-of-states", + "title": "density of states", + "displayOrder": 3 + }, + { + "id": "bt201-u3-blochs-theorem-for-particles-in-a-periodic-potential", + "slug": "blochs-theorem-for-particles-in-a-periodic-potential", + "title": "Bloch's theorem for particles in a periodic potential", + "displayOrder": 4 + }, + { + "id": "bt201-u3-kronig-penney-model-no-derivation-and-origin-of-energy-bands", + "slug": "kronig-penney-model-no-derivation-and-origin-of-energy-bands", + "title": "Kronig-Penney model (no derivation) and origin of energy bands", + "displayOrder": 5 + }, + { + "id": "bt201-u3-v-i-characteristics-of-pn-junction", + "slug": "v-i-characteristics-of-pn-junction", + "title": "V-I characteristics of PN junction", + "displayOrder": 6 + }, + { + "id": "bt201-u3-zener-diode", + "slug": "zener-diode", + "title": "Zener diode", + "displayOrder": 7 + }, + { + "id": "bt201-u3-solar-cell", + "slug": "solar-cell", + "title": "Solar Cell", + "displayOrder": 8 + }, + { + "id": "bt201-u3-hall-effect", + "slug": "hall-effect", + "title": "Hall Effect", + "displayOrder": 9 + } ], "questionIds": [ "bt201_m3_dec2022_q1", @@ -172,22 +307,77 @@ ] }, { - "id": "module-4", + "id": "bt201-u4", "number": 4, "title": "Lasers", "hours": 8, "topics": [ - "Einstein's theory of matter radiation interaction and A and B coefficients", - "amplification of light by population inversion", - "different types of lasers: gas lasers (He-Ne, CO2), solid-state lasers (ruby, Neodymium)", - "Properties of laser beams: mono-chromaticity, coherence, directionality and brightness", - "laser speckles", - "applications of lasers in science, engineering and medicine", - "Introduction to Optical fiber", - "acceptance angle and cone", - "Numerical aperture", - "V number", - "attenuation" + { + "id": "bt201-u4-einsteins-theory-of-matter-radiation-interaction-and-a-and-b-coefficients", + "slug": "einsteins-theory-of-matter-radiation-interaction-and-a-and-b-coefficients", + "title": "Einstein's theory of matter radiation interaction and A and B coefficients", + "displayOrder": 1 + }, + { + "id": "bt201-u4-amplification-of-light-by-population-inversion", + "slug": "amplification-of-light-by-population-inversion", + "title": "amplification of light by population inversion", + "displayOrder": 2 + }, + { + "id": "bt201-u4-different-types-of-lasers-gas-lasers-he-ne-co2-solid-state-lasers-ruby-neodymium", + "slug": "different-types-of-lasers-gas-lasers-he-ne-co2-solid-state-lasers-ruby-neodymium", + "title": "different types of lasers: gas lasers (He-Ne, CO2), solid-state lasers (ruby, Neodymium)", + "displayOrder": 3 + }, + { + "id": "bt201-u4-properties-of-laser-beams-mono-chromaticity-coherence-directionality-and-brightness", + "slug": "properties-of-laser-beams-mono-chromaticity-coherence-directionality-and-brightness", + "title": "Properties of laser beams: mono-chromaticity, coherence, directionality and brightness", + "displayOrder": 4 + }, + { + "id": "bt201-u4-laser-speckles", + "slug": "laser-speckles", + "title": "laser speckles", + "displayOrder": 5 + }, + { + "id": "bt201-u4-applications-of-lasers-in-science-engineering-and-medicine", + "slug": "applications-of-lasers-in-science-engineering-and-medicine", + "title": "applications of lasers in science, engineering and medicine", + "displayOrder": 6 + }, + { + "id": "bt201-u4-introduction-to-optical-fiber", + "slug": "introduction-to-optical-fiber", + "title": "Introduction to Optical fiber", + "displayOrder": 7 + }, + { + "id": "bt201-u4-acceptance-angle-and-cone", + "slug": "acceptance-angle-and-cone", + "title": "acceptance angle and cone", + "displayOrder": 8 + }, + { + "id": "bt201-u4-numerical-aperture", + "slug": "numerical-aperture", + "title": "Numerical aperture", + "displayOrder": 9 + }, + { + "id": "bt201-u4-v-number", + "slug": "v-number", + "title": "V number", + "displayOrder": 10 + }, + { + "id": "bt201-u4-attenuation", + "slug": "attenuation", + "title": "attenuation", + "displayOrder": 11 + } ], "questionIds": [ "bt201_m4_dec2022_q1", @@ -231,20 +421,65 @@ ] }, { - "id": "module-5", + "id": "bt201-u5", "number": 5, "title": "Electrostatics in vacuum", "hours": 8, "topics": [ - "Calculation of electric field and electrostatic potential for a charge distribution", - "Electric displacement", - "Basic Introduction to Dielectrics", - "Gradient, Divergence and curl", - "Stokes' theorem", - "Gauss Theorem", - "Continuity equation for current densities", - "Maxwell's equation in vacuum and non-conducting medium", - "Poynting vector" + { + "id": "bt201-u5-calculation-of-electric-field-and-electrostatic-potential-for-a-charge-distribution", + "slug": "calculation-of-electric-field-and-electrostatic-potential-for-a-charge-distribution", + "title": "Calculation of electric field and electrostatic potential for a charge distribution", + "displayOrder": 1 + }, + { + "id": "bt201-u5-electric-displacement", + "slug": "electric-displacement", + "title": "Electric displacement", + "displayOrder": 2 + }, + { + "id": "bt201-u5-basic-introduction-to-dielectrics", + "slug": "basic-introduction-to-dielectrics", + "title": "Basic Introduction to Dielectrics", + "displayOrder": 3 + }, + { + "id": "bt201-u5-gradient-divergence-and-curl", + "slug": "gradient-divergence-and-curl", + "title": "Gradient, Divergence and curl", + "displayOrder": 4 + }, + { + "id": "bt201-u5-stokes-theorem", + "slug": "stokes-theorem", + "title": "Stokes' theorem", + "displayOrder": 5 + }, + { + "id": "bt201-u5-gauss-theorem", + "slug": "gauss-theorem", + "title": "Gauss Theorem", + "displayOrder": 6 + }, + { + "id": "bt201-u5-continuity-equation-for-current-densities", + "slug": "continuity-equation-for-current-densities", + "title": "Continuity equation for current densities", + "displayOrder": 7 + }, + { + "id": "bt201-u5-maxwells-equation-in-vacuum-and-non-conducting-medium", + "slug": "maxwells-equation-in-vacuum-and-non-conducting-medium", + "title": "Maxwell's equation in vacuum and non-conducting medium", + "displayOrder": 8 + }, + { + "id": "bt201-u5-poynting-vector", + "slug": "poynting-vector", + "title": "Poynting vector", + "displayOrder": 9 + } ], "questionIds": [ "bt201_m5_dec2022_q1", diff --git a/content/rgpv/common/semester-1/bt-203/syllabus.json b/content/rgpv/common/semester-1/bt-203/syllabus.json index 53e5961..446b310 100644 --- a/content/rgpv/common/semester-1/bt-203/syllabus.json +++ b/content/rgpv/common/semester-1/bt-203/syllabus.json @@ -13,19 +13,59 @@ }, "modules": [ { - "id": "module-1", + "id": "bt203-u1", "number": 1, "title": "Materials", - "hours": null, + "hours": 8, "topics": [ - "Classification of engineering material", - "Composition of Cast iron and Carbon steels", - "Iron Carbon diagram", - "Alloy steels their applications", - "Mechanical properties like strength, hardness, toughness, ductility, brittleness, malleability etc. of materials", - "Tensile test- Stress-strain diagram of ductile and brittle materials", - "Hooks law and modulus of elasticity", - "Hardness and Impact testing of materials, BHN etc." + { + "id": "bt203-u1-classification-of-engineering-material", + "slug": "classification-of-engineering-material", + "title": "Classification of engineering material", + "displayOrder": 1 + }, + { + "id": "bt203-u1-composition-of-cast-iron-and-carbon-steels", + "slug": "composition-of-cast-iron-and-carbon-steels", + "title": "Composition of Cast iron and Carbon steels", + "displayOrder": 2 + }, + { + "id": "bt203-u1-iron-carbon-diagram", + "slug": "iron-carbon-diagram", + "title": "Iron Carbon diagram", + "displayOrder": 3 + }, + { + "id": "bt203-u1-alloy-steels-their-applications", + "slug": "alloy-steels-their-applications", + "title": "Alloy steels their applications", + "displayOrder": 4 + }, + { + "id": "bt203-u1-mechanical-properties-like-strength-hardness-toughness-ductility-brittleness-malleability-etc-of-materials", + "slug": "mechanical-properties-like-strength-hardness-toughness-ductility-brittleness-malleability-etc-of-materials", + "title": "Mechanical properties like strength, hardness, toughness, ductility, brittleness, malleability etc. of materials", + "displayOrder": 5 + }, + { + "id": "bt203-u1-tensile-test-stress-strain-diagram-of-ductile-and-brittle-materials", + "slug": "tensile-test-stress-strain-diagram-of-ductile-and-brittle-materials", + "title": "Tensile test- Stress-strain diagram of ductile and brittle materials", + "displayOrder": 6 + }, + { + "id": "bt203-u1-hooks-law-and-modulus-of-elasticity", + "slug": "hooks-law-and-modulus-of-elasticity", + "title": "Hooks law and modulus of elasticity", + "displayOrder": 7 + }, + { + "id": "bt203-u1-hardness-and-impact-testing-of-materials-bhn-etc", + "slug": "hardness-and-impact-testing-of-materials-bhn-etc", + "title": "Hardness and Impact testing of materials, BHN etc.", + "displayOrder": 8 + } ], "questionIds": [ "bt203_m1_nov2022_q1", @@ -59,16 +99,41 @@ ] }, { - "id": "module-2", + "id": "bt203-u2", "number": 2, "title": "Measurement & Production Engineering", - "hours": null, + "hours": 8, "topics": [ - "Concept of measurements, errors in measurement", - "Temperature, Pressure, Velocity, Flow strain, Force and torque measurement", - "Vernier caliper, Micrometer, Dial gauge, Slip gauge, Sine-bar and Combination set", - "Elementary theoretical aspects of production processes like casting, carpentry, welding etc", - "Introduction to Lathe and Drilling machines and their various operations" + { + "id": "bt203-u2-concept-of-measurements-errors-in-measurement", + "slug": "concept-of-measurements-errors-in-measurement", + "title": "Concept of measurements, errors in measurement", + "displayOrder": 1 + }, + { + "id": "bt203-u2-temperature-pressure-velocity-flow-strain-force-and-torque-measurement", + "slug": "temperature-pressure-velocity-flow-strain-force-and-torque-measurement", + "title": "Temperature, Pressure, Velocity, Flow strain, Force and torque measurement", + "displayOrder": 2 + }, + { + "id": "bt203-u2-vernier-caliper-micrometer-dial-gauge-slip-gauge-sine-bar-and-combination-set", + "slug": "vernier-caliper-micrometer-dial-gauge-slip-gauge-sine-bar-and-combination-set", + "title": "Vernier caliper, Micrometer, Dial gauge, Slip gauge, Sine-bar and Combination set", + "displayOrder": 3 + }, + { + "id": "bt203-u2-elementary-theoretical-aspects-of-production-processes-like-casting-carpentry-welding-etc", + "slug": "elementary-theoretical-aspects-of-production-processes-like-casting-carpentry-welding-etc", + "title": "Elementary theoretical aspects of production processes like casting, carpentry, welding etc", + "displayOrder": 4 + }, + { + "id": "bt203-u2-introduction-to-lathe-and-drilling-machines-and-their-various-operations", + "slug": "introduction-to-lathe-and-drilling-machines-and-their-various-operations", + "title": "Introduction to Lathe and Drilling machines and their various operations", + "displayOrder": 5 + } ], "questionIds": [ "bt203_m2_nov2022_q1", @@ -104,17 +169,47 @@ ] }, { - "id": "module-3", + "id": "bt203-u3", "number": 3, "title": "Fluids", - "hours": null, + "hours": 8, "topics": [ - "Fluid properties pressure, density and viscosity etc.", - "Types of fluids", - "Newton's law of viscosity", - "Pascal's law", - "Bernoulli's equation for incompressible fluids", - "Only working principle of Hydraulic machines, pumps, turbines, Reciprocating pumps" + { + "id": "bt203-u3-fluid-properties-pressure-density-and-viscosity-etc", + "slug": "fluid-properties-pressure-density-and-viscosity-etc", + "title": "Fluid properties pressure, density and viscosity etc.", + "displayOrder": 1 + }, + { + "id": "bt203-u3-types-of-fluids", + "slug": "types-of-fluids", + "title": "Types of fluids", + "displayOrder": 2 + }, + { + "id": "bt203-u3-newtons-law-of-viscosity", + "slug": "newtons-law-of-viscosity", + "title": "Newton's law of viscosity", + "displayOrder": 3 + }, + { + "id": "bt203-u3-pascals-law", + "slug": "pascals-law", + "title": "Pascal's law", + "displayOrder": 4 + }, + { + "id": "bt203-u3-bernoullis-equation-for-incompressible-fluids", + "slug": "bernoullis-equation-for-incompressible-fluids", + "title": "Bernoulli's equation for incompressible fluids", + "displayOrder": 5 + }, + { + "id": "bt203-u3-only-working-principle-of-hydraulic-machines-pumps-turbines-reciprocating-pumps", + "slug": "only-working-principle-of-hydraulic-machines-pumps-turbines-reciprocating-pumps", + "title": "Only working principle of Hydraulic machines, pumps, turbines, Reciprocating pumps", + "displayOrder": 6 + } ], "questionIds": [ "bt203_m3_nov2022_q1", @@ -147,19 +242,59 @@ ] }, { - "id": "module-4", + "id": "bt203-u4", "number": 4, "title": "Thermodynamics & Steam Engineering", - "hours": null, + "hours": 8, "topics": [ - "Thermodynamic system, properties, state, process", - "Zeroth, First and second law of thermodynamics", - "thermodynamic processes at constant pressure, volume, enthalpy & entropy", - "Classification and working of boilers", - "mountings and accessories of boilers", - "Efficiency and performance analysis", - "natural and artificial draught", - "steam properties, use of steam tables" + { + "id": "bt203-u4-thermodynamic-system-properties-state-process", + "slug": "thermodynamic-system-properties-state-process", + "title": "Thermodynamic system, properties, state, process", + "displayOrder": 1 + }, + { + "id": "bt203-u4-zeroth-first-and-second-law-of-thermodynamics", + "slug": "zeroth-first-and-second-law-of-thermodynamics", + "title": "Zeroth, First and second law of thermodynamics", + "displayOrder": 2 + }, + { + "id": "bt203-u4-thermodynamic-processes-at-constant-pressure-volume-enthalpy-and-entropy", + "slug": "thermodynamic-processes-at-constant-pressure-volume-enthalpy-and-entropy", + "title": "thermodynamic processes at constant pressure, volume, enthalpy & entropy", + "displayOrder": 3 + }, + { + "id": "bt203-u4-classification-and-working-of-boilers", + "slug": "classification-and-working-of-boilers", + "title": "Classification and working of boilers", + "displayOrder": 4 + }, + { + "id": "bt203-u4-mountings-and-accessories-of-boilers", + "slug": "mountings-and-accessories-of-boilers", + "title": "mountings and accessories of boilers", + "displayOrder": 5 + }, + { + "id": "bt203-u4-efficiency-and-performance-analysis", + "slug": "efficiency-and-performance-analysis", + "title": "Efficiency and performance analysis", + "displayOrder": 6 + }, + { + "id": "bt203-u4-natural-and-artificial-draught", + "slug": "natural-and-artificial-draught", + "title": "natural and artificial draught", + "displayOrder": 7 + }, + { + "id": "bt203-u4-steam-properties-use-of-steam-tables", + "slug": "steam-properties-use-of-steam-tables", + "title": "steam properties, use of steam tables", + "displayOrder": 8 + } ], "questionIds": [ "bt203_m4_nov2022_q1", @@ -194,15 +329,35 @@ ] }, { - "id": "module-5", + "id": "bt203-u5", "number": 5, "title": "Reciprocating Machines", - "hours": null, + "hours": 8, "topics": [ - "Working principle of steam Engine", - "Carnot, Otto, Diesel and Dual cycles P-V & T-S diagrams and its efficiency", - "working of Two stroke & Four stroke Petrol & Diesel engines", - "Working principle of compressor" + { + "id": "bt203-u5-working-principle-of-steam-engine", + "slug": "working-principle-of-steam-engine", + "title": "Working principle of steam Engine", + "displayOrder": 1 + }, + { + "id": "bt203-u5-carnot-otto-diesel-and-dual-cycles-pv-and-ts-diagrams-and-its-efficiency", + "slug": "carnot-otto-diesel-and-dual-cycles-pv-and-ts-diagrams-and-its-efficiency", + "title": "Carnot, Otto, Diesel and Dual cycles P-V & T-S diagrams and its efficiency", + "displayOrder": 2 + }, + { + "id": "bt203-u5-working-of-two-stroke-and-four-stroke-petrol-and-diesel-engines", + "slug": "working-of-two-stroke-and-four-stroke-petrol-and-diesel-engines", + "title": "working of Two stroke & Four stroke Petrol & Diesel engines", + "displayOrder": 3 + }, + { + "id": "bt203-u5-working-principle-of-compressor", + "slug": "working-principle-of-compressor", + "title": "Working principle of compressor", + "displayOrder": 4 + } ], "questionIds": [ "bt203_m5_nov2022_q1", diff --git a/content/rgpv/common/semester-1/bt-204/syllabus.json b/content/rgpv/common/semester-1/bt-204/syllabus.json index 869441f..bfade6f 100644 --- a/content/rgpv/common/semester-1/bt-204/syllabus.json +++ b/content/rgpv/common/semester-1/bt-204/syllabus.json @@ -13,19 +13,59 @@ }, "modules": [ { - "id": "module-1", + "id": "bt204-u1", "number": 1, "title": "Building Materials & Construction", - "hours": null, + "hours": 8, "topics": [ - "Stones, bricks, cement, lime, timber-types, properties, test & uses", - "laboratory tests concrete and mortar Materials", - "Workability, Strength properties of Concrete", - "Nominal proportion of Concrete preparation of concrete, compaction, curing", - "Elements of Building Construction", - "Foundations conventional spread footings, RCC footings", - "brick masonry walls, plastering and pointing", - "floors, roofs, Doors, windows, lintels, staircases – types and their suitability" + { + "id": "bt204-u1-stones-bricks-cement-lime-timber-types-properties-test-and-uses", + "slug": "stones-bricks-cement-lime-timber-types-properties-test-and-uses", + "title": "Stones, bricks, cement, lime, timber-types, properties, test & uses", + "displayOrder": 1 + }, + { + "id": "bt204-u1-laboratory-tests-concrete-and-mortar-materials", + "slug": "laboratory-tests-concrete-and-mortar-materials", + "title": "laboratory tests concrete and mortar Materials", + "displayOrder": 2 + }, + { + "id": "bt204-u1-workability-strength-properties-of-concrete", + "slug": "workability-strength-properties-of-concrete", + "title": "Workability, Strength properties of Concrete", + "displayOrder": 3 + }, + { + "id": "bt204-u1-nominal-proportion-of-concrete-preparation-of-concrete-compaction-curing", + "slug": "nominal-proportion-of-concrete-preparation-of-concrete-compaction-curing", + "title": "Nominal proportion of Concrete preparation of concrete, compaction, curing", + "displayOrder": 4 + }, + { + "id": "bt204-u1-elements-of-building-construction", + "slug": "elements-of-building-construction", + "title": "Elements of Building Construction", + "displayOrder": 5 + }, + { + "id": "bt204-u1-foundations-conventional-spread-footings-rcc-footings", + "slug": "foundations-conventional-spread-footings-rcc-footings", + "title": "Foundations conventional spread footings, RCC footings", + "displayOrder": 6 + }, + { + "id": "bt204-u1-brick-masonry-walls-plastering-and-pointing", + "slug": "brick-masonry-walls-plastering-and-pointing", + "title": "brick masonry walls, plastering and pointing", + "displayOrder": 7 + }, + { + "id": "bt204-u1-floors-roofs-doors-windows-lintels-staircases-types-and-their-suitability", + "slug": "floors-roofs-doors-windows-lintels-staircases-types-and-their-suitability", + "title": "floors, roofs, Doors, windows, lintels, staircases – types and their suitability", + "displayOrder": 8 + } ], "questionIds": [ "bt204_m1_nov2022_q1", @@ -60,17 +100,47 @@ ] }, { - "id": "module-2", + "id": "bt204-u2", "number": 2, "title": "Surveying & Positioning", - "hours": null, + "hours": 8, "topics": [ - "Introduction to surveying Instruments – levels, theodolites, plane tables and related devices", - "Electronic surveying instruments etc.", - "Measurement of distances – conventional and EDM methods", - "measurement of directions by different methods", - "measurement of elevations by different methods", - "Reciprocal leveling" + { + "id": "bt204-u2-introduction-to-surveying-instruments-levels-theodolites-plane-tables-and-related-devices", + "slug": "introduction-to-surveying-instruments-levels-theodolites-plane-tables-and-related-devices", + "title": "Introduction to surveying Instruments – levels, theodolites, plane tables and related devices", + "displayOrder": 1 + }, + { + "id": "bt204-u2-electronic-surveying-instruments-etc", + "slug": "electronic-surveying-instruments-etc", + "title": "Electronic surveying instruments etc.", + "displayOrder": 2 + }, + { + "id": "bt204-u2-measurement-of-distances-conventional-and-edm-methods", + "slug": "measurement-of-distances-conventional-and-edm-methods", + "title": "Measurement of distances – conventional and EDM methods", + "displayOrder": 3 + }, + { + "id": "bt204-u2-measurement-of-directions-by-different-methods", + "slug": "measurement-of-directions-by-different-methods", + "title": "measurement of directions by different methods", + "displayOrder": 4 + }, + { + "id": "bt204-u2-measurement-of-elevations-by-different-methods", + "slug": "measurement-of-elevations-by-different-methods", + "title": "measurement of elevations by different methods", + "displayOrder": 5 + }, + { + "id": "bt204-u2-reciprocal-leveling", + "slug": "reciprocal-leveling", + "title": "Reciprocal leveling", + "displayOrder": 6 + } ], "questionIds": [ "bt204_m2_nov2022_q1", @@ -101,16 +171,41 @@ ] }, { - "id": "module-3", + "id": "bt204-u3", "number": 3, "title": "Mapping & Sensing", - "hours": null, + "hours": 8, "topics": [ - "Mapping details and contouring", - "Profile Cross sectioning and measurement of areas, volumes", - "application of measurements in quantity computations", - "Survey stations", - "Introduction of remote sensing and its applications" + { + "id": "bt204-u3-mapping-details-and-contouring", + "slug": "mapping-details-and-contouring", + "title": "Mapping details and contouring", + "displayOrder": 1 + }, + { + "id": "bt204-u3-profile-cross-sectioning-and-measurement-of-areas-volumes", + "slug": "profile-cross-sectioning-and-measurement-of-areas-volumes", + "title": "Profile Cross sectioning and measurement of areas, volumes", + "displayOrder": 2 + }, + { + "id": "bt204-u3-application-of-measurements-in-quantity-computations", + "slug": "application-of-measurements-in-quantity-computations", + "title": "application of measurements in quantity computations", + "displayOrder": 3 + }, + { + "id": "bt204-u3-survey-stations", + "slug": "survey-stations", + "title": "Survey stations", + "displayOrder": 4 + }, + { + "id": "bt204-u3-introduction-of-remote-sensing-and-its-applications", + "slug": "introduction-of-remote-sensing-and-its-applications", + "title": "Introduction of remote sensing and its applications", + "displayOrder": 5 + } ], "questionIds": [ "bt204_m3_nov2022_q1", @@ -137,16 +232,41 @@ ] }, { - "id": "module-4", + "id": "bt204-u4", "number": 4, "title": "Forces and Equilibrium", - "hours": null, + "hours": 8, "topics": [ - "Engineering Mechanics: Forces and Equilibrium", - "Graphical and Analytical Treatment of Concurrent and non-concurrent Co-planar forces", - "free Diagram, Force Diagram and Bow's notations", - "Application of Equilibrium Concepts: Analysis of plane Trusses: Method of joints, Method of Sections", - "Frictional force in equilibrium problems" + { + "id": "bt204-u4-engineering-mechanics-forces-and-equilibrium", + "slug": "engineering-mechanics-forces-and-equilibrium", + "title": "Engineering Mechanics: Forces and Equilibrium", + "displayOrder": 1 + }, + { + "id": "bt204-u4-graphical-and-analytical-treatment-of-concurrent-and-non-concurrent-co-planar-forces", + "slug": "graphical-and-analytical-treatment-of-concurrent-and-non-concurrent-co-planar-forces", + "title": "Graphical and Analytical Treatment of Concurrent and non-concurrent Co-planar forces", + "displayOrder": 2 + }, + { + "id": "bt204-u4-free-diagram-force-diagram-and-bows-notations", + "slug": "free-diagram-force-diagram-and-bows-notations", + "title": "free Diagram, Force Diagram and Bow's notations", + "displayOrder": 3 + }, + { + "id": "bt204-u4-application-of-equilibrium-concepts-analysis-of-plane-trusses-method-of-joints-method-of-sections", + "slug": "application-of-equilibrium-concepts-analysis-of-plane-trusses-method-of-joints-method-of-sections", + "title": "Application of Equilibrium Concepts: Analysis of plane Trusses: Method of joints, Method of Sections", + "displayOrder": 4 + }, + { + "id": "bt204-u4-frictional-force-in-equilibrium-problems", + "slug": "frictional-force-in-equilibrium-problems", + "title": "Frictional force in equilibrium problems", + "displayOrder": 5 + } ], "questionIds": [ "bt204_m4_nov2022_q1", @@ -175,17 +295,47 @@ ] }, { - "id": "module-5", + "id": "bt204-u5", "number": 5, "title": "Centre of Gravity and Moment of Inertia", - "hours": null, + "hours": 8, "topics": [ - "Centre of Gravity and moment of Inertia", - "Centroid and Centre of Gravity", - "Moment Inertia of Area and Mass, Radius of Gyration", - "Introduction to product of Inertia and Principle Axes", - "Support Reactions", - "Shear force and bending moment Diagram for Cantilever & simply supported beam with concentrated, distributed load and Couple" + { + "id": "bt204-u5-centre-of-gravity-and-moment-of-inertia", + "slug": "centre-of-gravity-and-moment-of-inertia", + "title": "Centre of Gravity and moment of Inertia", + "displayOrder": 1 + }, + { + "id": "bt204-u5-centroid-and-centre-of-gravity", + "slug": "centroid-and-centre-of-gravity", + "title": "Centroid and Centre of Gravity", + "displayOrder": 2 + }, + { + "id": "bt204-u5-moment-inertia-of-area-and-mass-radius-of-gyration", + "slug": "moment-inertia-of-area-and-mass-radius-of-gyration", + "title": "Moment Inertia of Area and Mass, Radius of Gyration", + "displayOrder": 3 + }, + { + "id": "bt204-u5-introduction-to-product-of-inertia-and-principle-axes", + "slug": "introduction-to-product-of-inertia-and-principle-axes", + "title": "Introduction to product of Inertia and Principle Axes", + "displayOrder": 4 + }, + { + "id": "bt204-u5-support-reactions", + "slug": "support-reactions", + "title": "Support Reactions", + "displayOrder": 5 + }, + { + "id": "bt204-u5-shear-force-and-bending-moment-diagram-for-cantilever-and-simply-supported-beam-with-concentrated-distributed-load-and-couple", + "slug": "shear-force-and-bending-moment-diagram-for-cantilever-and-simply-supported-beam-with-concentrated-distributed-load-and-couple", + "title": "Shear force and bending moment Diagram for Cantilever & simply supported beam with concentrated, distributed load and Couple", + "displayOrder": 6 + } ], "questionIds": [ "bt204_m5_nov2022_q1", diff --git a/content/rgpv/common/semester-1/bt-205/syllabus.json b/content/rgpv/common/semester-1/bt-205/syllabus.json index 8d14a3f..6fb3a43 100644 --- a/content/rgpv/common/semester-1/bt-205/syllabus.json +++ b/content/rgpv/common/semester-1/bt-205/syllabus.json @@ -13,16 +13,41 @@ }, "modules": [ { - "id": "module-1", + "id": "bt205-u1", "number": 1, "title": "Computer & Operating System", - "hours": null, + "hours": 8, "topics": [ - "Computer: Definition, Classification, Organization i.e. CPU, register, Bus architecture, Instruction set", - "Memory & Storage Systems, I/O Devices, and System & Application Software", - "Computer Application in e-Business, Bio-Informatics, health Care, Remote Sensing & GIS, Meteorology and Climatology, Computer Gaming, Multimedia and Animation etc.", - "Operating System: Definition, Function, Types, Management of File, Process & Memory", - "Introduction to MS word, MS powerpoint, MS Excel" + { + "id": "bt205-u1-computer-definition-classification-organization-ie-cpu-register-bus-architecture-instruction-set", + "slug": "computer-definition-classification-organization-ie-cpu-register-bus-architecture-instruction-set", + "title": "Computer: Definition, Classification, Organization i.e. CPU, register, Bus architecture, Instruction set", + "displayOrder": 1 + }, + { + "id": "bt205-u1-memory-and-storage-systems-io-devices-and-system-and-application-software", + "slug": "memory-and-storage-systems-io-devices-and-system-and-application-software", + "title": "Memory & Storage Systems, I/O Devices, and System & Application Software", + "displayOrder": 2 + }, + { + "id": "bt205-u1-computer-application-in-e-business-bio-informatics-health-care-remote-sensing-and-gis-meteorology-and-climatology-computer-gaming-multimedia-and-animation-etc", + "slug": "computer-application-in-e-business-bio-informatics-health-care-remote-sensing-and-gis-meteorology-and-climatology-computer-gaming-multimedia-and-animation-etc", + "title": "Computer Application in e-Business, Bio-Informatics, health Care, Remote Sensing & GIS, Meteorology and Climatology, Computer Gaming, Multimedia and Animation etc.", + "displayOrder": 3 + }, + { + "id": "bt205-u1-operating-system-definition-function-types-management-of-file-process-and-memory", + "slug": "operating-system-definition-function-types-management-of-file-process-and-memory", + "title": "Operating System: Definition, Function, Types, Management of File, Process & Memory", + "displayOrder": 4 + }, + { + "id": "bt205-u1-introduction-to-ms-word-ms-powerpoint-ms-excel", + "slug": "introduction-to-ms-word-ms-powerpoint-ms-excel", + "title": "Introduction to MS word, MS powerpoint, MS Excel", + "displayOrder": 5 + } ], "questionIds": [ "bt205_m1_nov2022_q1", @@ -52,18 +77,53 @@ ] }, { - "id": "module-2", + "id": "bt205-u2", "number": 2, "title": "Algorithms & Introduction to C++", - "hours": null, + "hours": 8, "topics": [ - "Introduction to Algorithms, Complexities and Flowchart", - "Introduction to Programming, Categories of Programming Languages, Program Design", - "Programming Paradigms, Characteristics or Concepts of OOP", - "Procedure Oriented Programming VS object oriented Programming", - "Introduction to C++: Character Set, Tokens, Precedence and Associativity, Program Structure", - "Data Types, Variables, Operators, Expressions, Statements and control structures", - "I/O operations, Array, Functions" + { + "id": "bt205-u2-introduction-to-algorithms-complexities-and-flowchart", + "slug": "introduction-to-algorithms-complexities-and-flowchart", + "title": "Introduction to Algorithms, Complexities and Flowchart", + "displayOrder": 1 + }, + { + "id": "bt205-u2-introduction-to-programming-categories-of-programming-languages-program-design", + "slug": "introduction-to-programming-categories-of-programming-languages-program-design", + "title": "Introduction to Programming, Categories of Programming Languages, Program Design", + "displayOrder": 2 + }, + { + "id": "bt205-u2-programming-paradigms-characteristics-or-concepts-of-oop", + "slug": "programming-paradigms-characteristics-or-concepts-of-oop", + "title": "Programming Paradigms, Characteristics or Concepts of OOP", + "displayOrder": 3 + }, + { + "id": "bt205-u2-procedure-oriented-programming-vs-object-oriented-programming", + "slug": "procedure-oriented-programming-vs-object-oriented-programming", + "title": "Procedure Oriented Programming VS object oriented Programming", + "displayOrder": 4 + }, + { + "id": "bt205-u2-introduction-to-cpp-character-set-tokens-precedence-and-associativity-program-structure", + "slug": "introduction-to-cpp-character-set-tokens-precedence-and-associativity-program-structure", + "title": "Introduction to C++: Character Set, Tokens, Precedence and Associativity, Program Structure", + "displayOrder": 5 + }, + { + "id": "bt205-u2-data-types-variables-operators-expressions-statements-and-control-structures", + "slug": "data-types-variables-operators-expressions-statements-and-control-structures", + "title": "Data Types, Variables, Operators, Expressions, Statements and control structures", + "displayOrder": 6 + }, + { + "id": "bt205-u2-io-operations-array-functions", + "slug": "io-operations-array-functions", + "title": "I/O operations, Array, Functions", + "displayOrder": 7 + } ], "questionIds": [ "bt205_m2_nov2022_q1", @@ -92,16 +152,41 @@ ] }, { - "id": "module-3", + "id": "bt205-u3", "number": 3, "title": "C++ Object Oriented Programming", - "hours": null, + "hours": 8, "topics": [ - "Object & Classes, Scope Resolution Operator", - "Constructors & Destructors, Friend Functions", - "Inheritance, Polymorphism, Overloading Functions & Operators", - "Types of Inheritance, Virtual functions", - "Introduction to Data Structures" + { + "id": "bt205-u3-object-and-classes-scope-resolution-operator", + "slug": "object-and-classes-scope-resolution-operator", + "title": "Object & Classes, Scope Resolution Operator", + "displayOrder": 1 + }, + { + "id": "bt205-u3-constructors-and-destructors-friend-functions", + "slug": "constructors-and-destructors-friend-functions", + "title": "Constructors & Destructors, Friend Functions", + "displayOrder": 2 + }, + { + "id": "bt205-u3-inheritance-polymorphism-overloading-functions-and-operators", + "slug": "inheritance-polymorphism-overloading-functions-and-operators", + "title": "Inheritance, Polymorphism, Overloading Functions & Operators", + "displayOrder": 3 + }, + { + "id": "bt205-u3-types-of-inheritance-virtual-functions", + "slug": "types-of-inheritance-virtual-functions", + "title": "Types of Inheritance, Virtual functions", + "displayOrder": 4 + }, + { + "id": "bt205-u3-introduction-to-data-structures", + "slug": "introduction-to-data-structures", + "title": "Introduction to Data Structures", + "displayOrder": 5 + } ], "questionIds": [ "bt205_m3_nov2022_q1", @@ -126,18 +211,53 @@ ] }, { - "id": "module-4", + "id": "bt205-u4", "number": 4, "title": "Networking & Security", - "hours": null, + "hours": 8, "topics": [ - "Computer Networking: Introduction, Goals, ISO-OSI Model, Functions of Different Layers", - "Internetworking Concepts, Devices, TCP/IP Model", - "Introduction to Internet, World Wide Web, E-commerce", - "Computer Security Basics: Introduction to viruses, worms, malware, Trojans, Spyware and Anti-Spyware Software", - "Different types of attacks like Money Laundering, Information Theft, Cyber Pornography, Email spoofing, Denial of Service (DoS), Cyber Stalking, Logic bombs, Hacking Spamming, Cyber Defamation, pharming", - "Security measures Firewall, Computer Ethics & Good Practices", - "Introduction of Cyber Laws about Internet Fraud, Good Computer Security Habits" + { + "id": "bt205-u4-computer-networking-introduction-goals-iso-osi-model-functions-of-different-layers", + "slug": "computer-networking-introduction-goals-iso-osi-model-functions-of-different-layers", + "title": "Computer Networking: Introduction, Goals, ISO-OSI Model, Functions of Different Layers", + "displayOrder": 1 + }, + { + "id": "bt205-u4-internetworking-concepts-devices-tcpip-model", + "slug": "internetworking-concepts-devices-tcpip-model", + "title": "Internetworking Concepts, Devices, TCP/IP Model", + "displayOrder": 2 + }, + { + "id": "bt205-u4-introduction-to-internet-world-wide-web-e-commerce", + "slug": "introduction-to-internet-world-wide-web-e-commerce", + "title": "Introduction to Internet, World Wide Web, E-commerce", + "displayOrder": 3 + }, + { + "id": "bt205-u4-computer-security-basics-introduction-to-viruses-worms-malware-trojans-spyware-and-anti-spyware-software", + "slug": "computer-security-basics-introduction-to-viruses-worms-malware-trojans-spyware-and-anti-spyware-software", + "title": "Computer Security Basics: Introduction to viruses, worms, malware, Trojans, Spyware and Anti-Spyware Software", + "displayOrder": 4 + }, + { + "id": "bt205-u4-different-types-of-attacks-like-money-laundering-information-theft-cyber-pornography-email-spoofing-denial-of-service-dos-cyber-stalking-logic-bombs-hacking-spamming-cyber-defamation-pharming", + "slug": "different-types-of-attacks-like-money-laundering-information-theft-cyber-pornography-email-spoofing-denial-of-service-dos-cyber-stalking-logic-bombs-hacking-spamming-cyber-defamation-pharming", + "title": "Different types of attacks like Money Laundering, Information Theft, Cyber Pornography, Email spoofing, Denial of Service (DoS), Cyber Stalking, Logic bombs, Hacking Spamming, Cyber Defamation, pharming", + "displayOrder": 5 + }, + { + "id": "bt205-u4-security-measures-firewall-computer-ethics-and-good-practices", + "slug": "security-measures-firewall-computer-ethics-and-good-practices", + "title": "Security measures Firewall, Computer Ethics & Good Practices", + "displayOrder": 6 + }, + { + "id": "bt205-u4-introduction-of-cyber-laws-about-internet-fraud-good-computer-security-habits", + "slug": "introduction-of-cyber-laws-about-internet-fraud-good-computer-security-habits", + "title": "Introduction of Cyber Laws about Internet Fraud, Good Computer Security Habits", + "displayOrder": 7 + } ], "questionIds": [ "bt205_m4_nov2022_q1", @@ -165,19 +285,59 @@ ] }, { - "id": "module-5", + "id": "bt205-u5", "number": 5, "title": "DBMS & Cloud Computing", - "hours": null, + "hours": 8, "topics": [ - "Database Management System: Introduction, File oriented approach and Database approach", - "Data Models, Architecture of Database System", - "Data independence, Data dictionary, DBA, Primary Key", - "Data definition language and Manipulation Languages", - "Cloud computing: definition, cloud infrastructure", - "cloud segments or service delivery models (IaaS, PaaS and SaaS)", - "cloud deployment models/ types of cloud (public, private, community and hybrid clouds)", - "Pros and Cons of cloud computing" + { + "id": "bt205-u5-database-management-system-introduction-file-oriented-approach-and-database-approach", + "slug": "database-management-system-introduction-file-oriented-approach-and-database-approach", + "title": "Database Management System: Introduction, File oriented approach and Database approach", + "displayOrder": 1 + }, + { + "id": "bt205-u5-data-models-architecture-of-database-system", + "slug": "data-models-architecture-of-database-system", + "title": "Data Models, Architecture of Database System", + "displayOrder": 2 + }, + { + "id": "bt205-u5-data-independence-data-dictionary-dba-primary-key", + "slug": "data-independence-data-dictionary-dba-primary-key", + "title": "Data independence, Data dictionary, DBA, Primary Key", + "displayOrder": 3 + }, + { + "id": "bt205-u5-data-definition-language-and-manipulation-languages", + "slug": "data-definition-language-and-manipulation-languages", + "title": "Data definition language and Manipulation Languages", + "displayOrder": 4 + }, + { + "id": "bt205-u5-cloud-computing-definition-cloud-infrastructure", + "slug": "cloud-computing-definition-cloud-infrastructure", + "title": "Cloud computing: definition, cloud infrastructure", + "displayOrder": 5 + }, + { + "id": "bt205-u5-cloud-segments-or-service-delivery-models-iaas-paas-and-saas", + "slug": "cloud-segments-or-service-delivery-models-iaas-paas-and-saas", + "title": "cloud segments or service delivery models (IaaS, PaaS and SaaS)", + "displayOrder": 6 + }, + { + "id": "bt205-u5-cloud-deployment-models-types-of-cloud-public-private-community-and-hybrid-clouds", + "slug": "cloud-deployment-models-types-of-cloud-public-private-community-and-hybrid-clouds", + "title": "cloud deployment models/ types of cloud (public, private, community and hybrid clouds)", + "displayOrder": 7 + }, + { + "id": "bt205-u5-pros-and-cons-of-cloud-computing", + "slug": "pros-and-cons-of-cloud-computing", + "title": "Pros and Cons of cloud computing", + "displayOrder": 8 + } ], "questionIds": [ "bt205_m5_nov2022_q1", diff --git a/content/rgpv/common/semester-2/bt-101/syllabus.json b/content/rgpv/common/semester-2/bt-101/syllabus.json index ea00cc6..a7bc507 100644 --- a/content/rgpv/common/semester-2/bt-101/syllabus.json +++ b/content/rgpv/common/semester-2/bt-101/syllabus.json @@ -11,17 +11,47 @@ }, "modules": [ { - "id": "module-1", + "id": "bt101-u1", "number": 1, "title": "Water – Analysis, Treatments and Industrial Applications", "hours": 4, "topics": [ - "Sources", - "Impurities", - "Hardness & its units", - "Determination of hardness by EDTA method", - "Alkalinity & It's determination", - "Related numerical problems" + { + "id": "bt101-u1-sources", + "slug": "sources", + "title": "Sources", + "displayOrder": 1 + }, + { + "id": "bt101-u1-impurities", + "slug": "impurities", + "title": "Impurities", + "displayOrder": 2 + }, + { + "id": "bt101-u1-hardness-and-its-units", + "slug": "hardness-and-its-units", + "title": "Hardness & its units", + "displayOrder": 3 + }, + { + "id": "bt101-u1-determination-of-hardness-by-edta-method", + "slug": "determination-of-hardness-by-edta-method", + "title": "Determination of hardness by EDTA method", + "displayOrder": 4 + }, + { + "id": "bt101-u1-alkalinity-and-its-determination", + "slug": "alkalinity-and-its-determination", + "title": "Alkalinity & It's determination", + "displayOrder": 5 + }, + { + "id": "bt101-u1-related-numerical-problems", + "slug": "related-numerical-problems", + "title": "Related numerical problems", + "displayOrder": 6 + } ], "questionIds": [ "bt101_nov2022_q1a", @@ -43,14 +73,29 @@ ] }, { - "id": "module-2", + "id": "bt101-u2", "number": 2, "title": "Boiler problem & softening methods", "hours": 4, "topics": [ - "Boiler troubles (Sludge & Scale, Priming & Foaming, Boiler Corrosion, Caustic Embrittlement)", - "Softening methods (Lime-Soda, Zeolite and Ion Exchange Methods)", - "Related numerical problems" + { + "id": "bt101-u2-boiler-troubles-sludge-and-scale-priming-and-foaming-boiler-corrosion-caustic-embrittlement", + "slug": "boiler-troubles-sludge-and-scale-priming-and-foaming-boiler-corrosion-caustic-embrittlement", + "title": "Boiler troubles (Sludge & Scale, Priming & Foaming, Boiler Corrosion, Caustic Embrittlement)", + "displayOrder": 1 + }, + { + "id": "bt101-u2-softening-methods-lime-soda-zeolite-and-ion-exchange-methods", + "slug": "softening-methods-lime-soda-zeolite-and-ion-exchange-methods", + "title": "Softening methods (Lime-Soda, Zeolite and Ion Exchange Methods)", + "displayOrder": 2 + }, + { + "id": "bt101-u2-related-numerical-problems", + "slug": "related-numerical-problems", + "title": "Related numerical problems", + "displayOrder": 3 + } ], "questionIds": [ "bt101_nov2022_q2a", @@ -83,22 +128,77 @@ ] }, { - "id": "module-3", + "id": "bt101-u3", "number": 3, "title": "Lubricants and Lubrication", "hours": 4, "topics": [ - "Introduction", - "Mechanism of lubrication", - "Classification of lubricants", - "Significance & determination of Viscosity and Viscosity Index", - "Flash & Fire Points", - "Cloud & Pour Points", - "Aniline Point", - "Acid Number", - "Saponification Number", - "Steam Emulsification Number", - "Related numerical problems" + { + "id": "bt101-u3-introduction", + "slug": "introduction", + "title": "Introduction", + "displayOrder": 1 + }, + { + "id": "bt101-u3-mechanism-of-lubrication", + "slug": "mechanism-of-lubrication", + "title": "Mechanism of lubrication", + "displayOrder": 2 + }, + { + "id": "bt101-u3-classification-of-lubricants", + "slug": "classification-of-lubricants", + "title": "Classification of lubricants", + "displayOrder": 3 + }, + { + "id": "bt101-u3-significance-and-determination-of-viscosity-and-viscosity-index", + "slug": "significance-and-determination-of-viscosity-and-viscosity-index", + "title": "Significance & determination of Viscosity and Viscosity Index", + "displayOrder": 4 + }, + { + "id": "bt101-u3-flash-and-fire-points", + "slug": "flash-and-fire-points", + "title": "Flash & Fire Points", + "displayOrder": 5 + }, + { + "id": "bt101-u3-cloud-and-pour-points", + "slug": "cloud-and-pour-points", + "title": "Cloud & Pour Points", + "displayOrder": 6 + }, + { + "id": "bt101-u3-aniline-point", + "slug": "aniline-point", + "title": "Aniline Point", + "displayOrder": 7 + }, + { + "id": "bt101-u3-acid-number", + "slug": "acid-number", + "title": "Acid Number", + "displayOrder": 8 + }, + { + "id": "bt101-u3-saponification-number", + "slug": "saponification-number", + "title": "Saponification Number", + "displayOrder": 9 + }, + { + "id": "bt101-u3-steam-emulsification-number", + "slug": "steam-emulsification-number", + "title": "Steam Emulsification Number", + "displayOrder": 10 + }, + { + "id": "bt101-u3-related-numerical-problems", + "slug": "related-numerical-problems", + "title": "Related numerical problems", + "displayOrder": 11 + } ], "questionIds": [ "bt101_nov2022_q3", @@ -124,19 +224,59 @@ ] }, { - "id": "module-4", + "id": "bt101-u4", "number": 4, "title": "Polymer & polymerization", "hours": 4, "topics": [ - "Introduction", - "Types of polymerisation", - "Classification", - "Mechanism of polymerisation (Free radical & Ionic polymerization)", - "Thermoplastic & Thermosetting polymers", - "Elementary idea of Biodegradable polymers", - "Preparation, properties & uses of: PVC, PMMA, Teflon, Nylon 6, Nylon 6:6, Polyester, Phenol formaldehyde, Urea-Formaldehyde, Buna N, Buna S", - "Vulcanization of Rubber" + { + "id": "bt101-u4-introduction", + "slug": "introduction", + "title": "Introduction", + "displayOrder": 1 + }, + { + "id": "bt101-u4-types-of-polymerisation", + "slug": "types-of-polymerisation", + "title": "Types of polymerisation", + "displayOrder": 2 + }, + { + "id": "bt101-u4-classification", + "slug": "classification", + "title": "Classification", + "displayOrder": 3 + }, + { + "id": "bt101-u4-mechanism-of-polymerisation-free-radical-and-ionic-polymerization", + "slug": "mechanism-of-polymerisation-free-radical-and-ionic-polymerization", + "title": "Mechanism of polymerisation (Free radical & Ionic polymerization)", + "displayOrder": 4 + }, + { + "id": "bt101-u4-thermoplastic-and-thermosetting-polymers", + "slug": "thermoplastic-and-thermosetting-polymers", + "title": "Thermoplastic & Thermosetting polymers", + "displayOrder": 5 + }, + { + "id": "bt101-u4-elementary-idea-of-biodegradable-polymers", + "slug": "elementary-idea-of-biodegradable-polymers", + "title": "Elementary idea of Biodegradable polymers", + "displayOrder": 6 + }, + { + "id": "bt101-u4-preparation-properties-and-uses-of-pvc-pmma-teflon-nylon-6-nylon-66-polyester-phenol-formaldehyde-urea-formaldehyde-buna-n-buna-s", + "slug": "preparation-properties-and-uses-of-pvc-pmma-teflon-nylon-6-nylon-66-polyester-phenol-formaldehyde-urea-formaldehyde-buna-n-buna-s", + "title": "Preparation, properties & uses of: PVC, PMMA, Teflon, Nylon 6, Nylon 6:6, Polyester, Phenol formaldehyde, Urea-Formaldehyde, Buna N, Buna S", + "displayOrder": 7 + }, + { + "id": "bt101-u4-vulcanization-of-rubber", + "slug": "vulcanization-of-rubber", + "title": "Vulcanization of Rubber", + "displayOrder": 8 + } ], "questionIds": [ "bt101_nov2022_q4a", @@ -165,16 +305,41 @@ ] }, { - "id": "module-5", + "id": "bt101-u5", "number": 5, "title": "Phase equilibrium and Corrosion", "hours": 5, "topics": [ - "Phase diagram of single component system (Water)", - "Phase diagram of binary Eutectic System (Cu-Ag)", - "Corrosion: Types", - "Corrosion: Mechanisms", - "Corrosion: Prevention" + { + "id": "bt101-u5-phase-diagram-of-single-component-system-water", + "slug": "phase-diagram-of-single-component-system-water", + "title": "Phase diagram of single component system (Water)", + "displayOrder": 1 + }, + { + "id": "bt101-u5-phase-diagram-of-binary-eutectic-system-cu-ag", + "slug": "phase-diagram-of-binary-eutectic-system-cu-ag", + "title": "Phase diagram of binary Eutectic System (Cu-Ag)", + "displayOrder": 2 + }, + { + "id": "bt101-u5-corrosion-types", + "slug": "corrosion-types", + "title": "Corrosion: Types", + "displayOrder": 3 + }, + { + "id": "bt101-u5-corrosion-mechanisms", + "slug": "corrosion-mechanisms", + "title": "Corrosion: Mechanisms", + "displayOrder": 4 + }, + { + "id": "bt101-u5-corrosion-prevention", + "slug": "corrosion-prevention", + "title": "Corrosion: Prevention", + "displayOrder": 5 + } ], "questionIds": [ "bt101_nov2022_q5a", @@ -200,15 +365,35 @@ ] }, { - "id": "module-6", + "id": "bt101-u6", "number": 6, "title": "Spectroscopic techniques and application", "hours": 6, "topics": [ - "Principle", - "Instrumentation & Applications", - "Electronics spectroscopy", - "Vibrational & Rotational Spectroscopy of diatomic molecules" + { + "id": "bt101-u6-principle", + "slug": "principle", + "title": "Principle", + "displayOrder": 1 + }, + { + "id": "bt101-u6-instrumentation-and-applications", + "slug": "instrumentation-and-applications", + "title": "Instrumentation & Applications", + "displayOrder": 2 + }, + { + "id": "bt101-u6-electronics-spectroscopy", + "slug": "electronics-spectroscopy", + "title": "Electronics spectroscopy", + "displayOrder": 3 + }, + { + "id": "bt101-u6-vibrational-and-rotational-spectroscopy-of-diatomic-molecules", + "slug": "vibrational-and-rotational-spectroscopy-of-diatomic-molecules", + "title": "Vibrational & Rotational Spectroscopy of diatomic molecules", + "displayOrder": 4 + } ], "questionIds": [ "bt101_nov2022_q6a", @@ -234,17 +419,47 @@ ] }, { - "id": "module-7", + "id": "bt101-u7", "number": 7, "title": "Periodic properties", "hours": 4, "topics": [ - "Effective Nuclear Charge", - "Variations: S, P, d & f Orbital energies of atoms in periodic table", - "Electronics Configuration", - "Atomic & Ionic sizes", - "Electron affinity & Electro negativity", - "Polarizability & Oxidation States" + { + "id": "bt101-u7-effective-nuclear-charge", + "slug": "effective-nuclear-charge", + "title": "Effective Nuclear Charge", + "displayOrder": 1 + }, + { + "id": "bt101-u7-variations-s-p-d-and-f-orbital-energies-of-atoms-in-periodic-table", + "slug": "variations-s-p-d-and-f-orbital-energies-of-atoms-in-periodic-table", + "title": "Variations: S, P, d & f Orbital energies of atoms in periodic table", + "displayOrder": 2 + }, + { + "id": "bt101-u7-electronics-configuration", + "slug": "electronics-configuration", + "title": "Electronics Configuration", + "displayOrder": 3 + }, + { + "id": "bt101-u7-atomic-and-ionic-sizes", + "slug": "atomic-and-ionic-sizes", + "title": "Atomic & Ionic sizes", + "displayOrder": 4 + }, + { + "id": "bt101-u7-electron-affinity-and-electro-negativity", + "slug": "electron-affinity-and-electro-negativity", + "title": "Electron affinity & Electro negativity", + "displayOrder": 5 + }, + { + "id": "bt101-u7-polarizability-and-oxidation-states", + "slug": "polarizability-and-oxidation-states", + "title": "Polarizability & Oxidation States", + "displayOrder": 6 + } ], "questionIds": [ "bt101_nov2022_q8d", diff --git a/content/rgpv/common/semester-2/bt-103/syllabus.json b/content/rgpv/common/semester-2/bt-103/syllabus.json index 34c248e..af4914e 100644 --- a/content/rgpv/common/semester-2/bt-103/syllabus.json +++ b/content/rgpv/common/semester-2/bt-103/syllabus.json @@ -13,17 +13,47 @@ }, "modules": [ { - "id": "module-1", + "id": "bt103-u1", "number": 1, "title": "Identifying Common errors in writing", - "hours": null, + "hours": 8, "topics": [ - "Articles", - "Subject-Verb Agreement", - "Prepositions", - "Active and Passive Voice", - "Reported Speech: Direct and Indirect", - "Sentence Structure" + { + "id": "bt103-u1-articles", + "slug": "articles", + "title": "Articles", + "displayOrder": 1 + }, + { + "id": "bt103-u1-subject-verb-agreement", + "slug": "subject-verb-agreement", + "title": "Subject-Verb Agreement", + "displayOrder": 2 + }, + { + "id": "bt103-u1-prepositions", + "slug": "prepositions", + "title": "Prepositions", + "displayOrder": 3 + }, + { + "id": "bt103-u1-active-and-passive-voice", + "slug": "active-and-passive-voice", + "title": "Active and Passive Voice", + "displayOrder": 4 + }, + { + "id": "bt103-u1-reported-speech-direct-and-indirect", + "slug": "reported-speech-direct-and-indirect", + "title": "Reported Speech: Direct and Indirect", + "displayOrder": 5 + }, + { + "id": "bt103-u1-sentence-structure", + "slug": "sentence-structure", + "title": "Sentence Structure", + "displayOrder": 6 + } ], "questionIds": [ "bt103_m1_nov2022_q1", @@ -48,15 +78,35 @@ ] }, { - "id": "module-2", + "id": "bt103-u2", "number": 2, "title": "Vocabulary building and Comprehension", - "hours": null, + "hours": 8, "topics": [ - "Acquaintance with prefixes and suffixes from foreign languages in English to form derivatives", - "synonyms", - "antonyms", - "Reading comprehension" + { + "id": "bt103-u2-acquaintance-with-prefixes-and-suffixes-from-foreign-languages-in-english-to-form-derivatives", + "slug": "acquaintance-with-prefixes-and-suffixes-from-foreign-languages-in-english-to-form-derivatives", + "title": "Acquaintance with prefixes and suffixes from foreign languages in English to form derivatives", + "displayOrder": 1 + }, + { + "id": "bt103-u2-synonyms", + "slug": "synonyms", + "title": "synonyms", + "displayOrder": 2 + }, + { + "id": "bt103-u2-antonyms", + "slug": "antonyms", + "title": "antonyms", + "displayOrder": 3 + }, + { + "id": "bt103-u2-reading-comprehension", + "slug": "reading-comprehension", + "title": "Reading comprehension", + "displayOrder": 4 + } ], "questionIds": [ "bt103_m2_nov2022_q1", @@ -82,18 +132,53 @@ ] }, { - "id": "module-3", + "id": "bt103-u3", "number": 3, "title": "Communication", - "hours": null, + "hours": 8, "topics": [ - "Introduction, Meaning and Significance", - "Process of Communication", - "Oral and Written Communication", - "7 c's of Communication", - "Barriers to Communication and Ways to overcome them", - "Importance of Communication for Technical students", - "nonverbal communication" + { + "id": "bt103-u3-introduction-meaning-and-significance", + "slug": "introduction-meaning-and-significance", + "title": "Introduction, Meaning and Significance", + "displayOrder": 1 + }, + { + "id": "bt103-u3-process-of-communication", + "slug": "process-of-communication", + "title": "Process of Communication", + "displayOrder": 2 + }, + { + "id": "bt103-u3-oral-and-written-communication", + "slug": "oral-and-written-communication", + "title": "Oral and Written Communication", + "displayOrder": 3 + }, + { + "id": "bt103-u3-7-cs-of-communication", + "slug": "7-cs-of-communication", + "title": "7 c's of Communication", + "displayOrder": 4 + }, + { + "id": "bt103-u3-barriers-to-communication-and-ways-to-overcome-them", + "slug": "barriers-to-communication-and-ways-to-overcome-them", + "title": "Barriers to Communication and Ways to overcome them", + "displayOrder": 5 + }, + { + "id": "bt103-u3-importance-of-communication-for-technical-students", + "slug": "importance-of-communication-for-technical-students", + "title": "Importance of Communication for Technical students", + "displayOrder": 6 + }, + { + "id": "bt103-u3-nonverbal-communication", + "slug": "nonverbal-communication", + "title": "nonverbal communication", + "displayOrder": 7 + } ], "questionIds": [ "bt103_m3_nov2022_q1", @@ -130,17 +215,47 @@ ] }, { - "id": "module-4", + "id": "bt103-u4", "number": 4, "title": "Developing Writing Skills", - "hours": null, + "hours": 8, "topics": [ - "Planning, Drafting and Editing", - "Precise Writing, PrĆ©cis", - "Technical definition and Technical description", - "Report Writing: Features of writing a good Report", - "Structure of a Formal Report", - "Report of Trouble, Laboratory Report, Progress Report" + { + "id": "bt103-u4-planning-drafting-and-editing", + "slug": "planning-drafting-and-editing", + "title": "Planning, Drafting and Editing", + "displayOrder": 1 + }, + { + "id": "bt103-u4-precise-writing-precis", + "slug": "precise-writing-precis", + "title": "Precise Writing, PrĆ©cis", + "displayOrder": 2 + }, + { + "id": "bt103-u4-technical-definition-and-technical-description", + "slug": "technical-definition-and-technical-description", + "title": "Technical definition and Technical description", + "displayOrder": 3 + }, + { + "id": "bt103-u4-report-writing-features-of-writing-a-good-report", + "slug": "report-writing-features-of-writing-a-good-report", + "title": "Report Writing: Features of writing a good Report", + "displayOrder": 4 + }, + { + "id": "bt103-u4-structure-of-a-formal-report", + "slug": "structure-of-a-formal-report", + "title": "Structure of a Formal Report", + "displayOrder": 5 + }, + { + "id": "bt103-u4-report-of-trouble-laboratory-report-progress-report", + "slug": "report-of-trouble-laboratory-report-progress-report", + "title": "Report of Trouble, Laboratory Report, Progress Report", + "displayOrder": 6 + } ], "questionIds": [ "bt103_m4_nov2022_q1", @@ -180,18 +295,53 @@ ] }, { - "id": "module-5", + "id": "bt103-u5", "number": 5, "title": "Business Correspondence", - "hours": null, + "hours": 8, "topics": [ - "Importance of Business Letters, Parts and Layout", - "Application, Contents of good Resume", - "guidelines for writing Resume", - "Calling/Sending Quotation", - "Order", - "Complaint", - "E-mail and Tender" + { + "id": "bt103-u5-importance-of-business-letters-parts-and-layout", + "slug": "importance-of-business-letters-parts-and-layout", + "title": "Importance of Business Letters, Parts and Layout", + "displayOrder": 1 + }, + { + "id": "bt103-u5-application-contents-of-good-resume", + "slug": "application-contents-of-good-resume", + "title": "Application, Contents of good Resume", + "displayOrder": 2 + }, + { + "id": "bt103-u5-guidelines-for-writing-resume", + "slug": "guidelines-for-writing-resume", + "title": "guidelines for writing Resume", + "displayOrder": 3 + }, + { + "id": "bt103-u5-calling-sending-quotation", + "slug": "calling-sending-quotation", + "title": "Calling/Sending Quotation", + "displayOrder": 4 + }, + { + "id": "bt103-u5-order", + "slug": "order", + "title": "Order", + "displayOrder": 5 + }, + { + "id": "bt103-u5-complaint", + "slug": "complaint", + "title": "Complaint", + "displayOrder": 6 + }, + { + "id": "bt103-u5-e-mail-and-tender", + "slug": "e-mail-and-tender", + "title": "E-mail and Tender", + "displayOrder": 7 + } ], "questionIds": [ "bt103_m5_nov2022_q1", diff --git a/content/rgpv/common/semester-2/bt-104/syllabus.json b/content/rgpv/common/semester-2/bt-104/syllabus.json index c664776..d3335a9 100644 --- a/content/rgpv/common/semester-2/bt-104/syllabus.json +++ b/content/rgpv/common/semester-2/bt-104/syllabus.json @@ -13,18 +13,53 @@ }, "modules": [ { - "id": "module-1", + "id": "bt104-u1", "number": 1, "title": "D.C. Circuits", - "hours": null, + "hours": 8, "topics": [ - "Voltage and current sources, dependent and independent sources", - "Units and dimensions, Source Conversion", - "Ohm's Law, Kirchhoff's Law", - "Superposition theorem, Thevenin's theorem and their application for analysis of series and parallel resistive circuits excited by independent voltage sources", - "Power & Energy in such circuits", - "Mesh & nodal analysis", - "Star Delta transformation & circuits" + { + "id": "bt104-u1-voltage-and-current-sources-dependent-and-independent-sources", + "slug": "voltage-and-current-sources-dependent-and-independent-sources", + "title": "Voltage and current sources, dependent and independent sources", + "displayOrder": 1 + }, + { + "id": "bt104-u1-units-and-dimensions-source-conversion", + "slug": "units-and-dimensions-source-conversion", + "title": "Units and dimensions, Source Conversion", + "displayOrder": 2 + }, + { + "id": "bt104-u1-ohms-law-kirchhoffs-law", + "slug": "ohms-law-kirchhoffs-law", + "title": "Ohm's Law, Kirchhoff's Law", + "displayOrder": 3 + }, + { + "id": "bt104-u1-superposition-theorem-thevenins-theorem-and-their-application-for-analysis-of-series-and-parallel-resistive-circuits-excited-by-independent-voltage-sources", + "slug": "superposition-theorem-thevenins-theorem-and-their-application-for-analysis-of-series-and-parallel-resistive-circuits-excited-by-independent-voltage-sources", + "title": "Superposition theorem, Thevenin's theorem and their application for analysis of series and parallel resistive circuits excited by independent voltage sources", + "displayOrder": 4 + }, + { + "id": "bt104-u1-power-and-energy-in-such-circuits", + "slug": "power-and-energy-in-such-circuits", + "title": "Power & Energy in such circuits", + "displayOrder": 5 + }, + { + "id": "bt104-u1-mesh-and-nodal-analysis", + "slug": "mesh-and-nodal-analysis", + "title": "Mesh & nodal analysis", + "displayOrder": 6 + }, + { + "id": "bt104-u1-star-delta-transformation-and-circuits", + "slug": "star-delta-transformation-and-circuits", + "title": "Star Delta transformation & circuits", + "displayOrder": 7 + } ], "questionIds": [ "bt104_m1_nov2022_q1", @@ -60,20 +95,65 @@ ] }, { - "id": "module-2", + "id": "bt104-u2", "number": 2, "title": "AC Circuits", - "hours": null, + "hours": 8, "topics": [ - "1-phase AC Circuits: Generation of sinusoidal AC voltage", - "definition of average value, R.M.S. value, form factor and peak factor of AC quantity", - "Concept of phasor, Concept of Power factor", - "Concept of impedance and admittance, Active, reactive and apparent power", - "analysis of R-L, R-C, R-L-C series & parallel circuit", - "3-phase AC Circuits: Necessity and advantages of three phase systems", - "Meaning of Phase sequence, balanced and unbalanced supply and loads", - "Relationship between line and phase values for balanced star and delta connections", - "Power in balanced & unbalanced three-phase system and their measurements" + { + "id": "bt104-u2-1-phase-ac-circuits-generation-of-sinusoidal-ac-voltage", + "slug": "1-phase-ac-circuits-generation-of-sinusoidal-ac-voltage", + "title": "1-phase AC Circuits: Generation of sinusoidal AC voltage", + "displayOrder": 1 + }, + { + "id": "bt104-u2-definition-of-average-value-rms-value-form-factor-and-peak-factor-of-ac-quantity", + "slug": "definition-of-average-value-rms-value-form-factor-and-peak-factor-of-ac-quantity", + "title": "definition of average value, R.M.S. value, form factor and peak factor of AC quantity", + "displayOrder": 2 + }, + { + "id": "bt104-u2-concept-of-phasor-concept-of-power-factor", + "slug": "concept-of-phasor-concept-of-power-factor", + "title": "Concept of phasor, Concept of Power factor", + "displayOrder": 3 + }, + { + "id": "bt104-u2-concept-of-impedance-and-admittance-active-reactive-and-apparent-power", + "slug": "concept-of-impedance-and-admittance-active-reactive-and-apparent-power", + "title": "Concept of impedance and admittance, Active, reactive and apparent power", + "displayOrder": 4 + }, + { + "id": "bt104-u2-analysis-of-r-l-r-c-r-l-c-series-and-parallel-circuit", + "slug": "analysis-of-r-l-r-c-r-l-c-series-and-parallel-circuit", + "title": "analysis of R-L, R-C, R-L-C series & parallel circuit", + "displayOrder": 5 + }, + { + "id": "bt104-u2-3-phase-ac-circuits-necessity-and-advantages-of-three-phase-systems", + "slug": "3-phase-ac-circuits-necessity-and-advantages-of-three-phase-systems", + "title": "3-phase AC Circuits: Necessity and advantages of three phase systems", + "displayOrder": 6 + }, + { + "id": "bt104-u2-meaning-of-phase-sequence-balanced-and-unbalanced-supply-and-loads", + "slug": "meaning-of-phase-sequence-balanced-and-unbalanced-supply-and-loads", + "title": "Meaning of Phase sequence, balanced and unbalanced supply and loads", + "displayOrder": 7 + }, + { + "id": "bt104-u2-relationship-between-line-and-phase-values-for-balanced-star-and-delta-connections", + "slug": "relationship-between-line-and-phase-values-for-balanced-star-and-delta-connections", + "title": "Relationship between line and phase values for balanced star and delta connections", + "displayOrder": 8 + }, + { + "id": "bt104-u2-power-in-balanced-and-unbalanced-three-phase-system-and-their-measurements", + "slug": "power-in-balanced-and-unbalanced-three-phase-system-and-their-measurements", + "title": "Power in balanced & unbalanced three-phase system and their measurements", + "displayOrder": 9 + } ], "questionIds": [ "bt104_m2_nov2022_q1", @@ -110,21 +190,71 @@ ] }, { - "id": "module-3", + "id": "bt104-u3", "number": 3, "title": "Magnetic Circuits", - "hours": null, + "hours": 8, "topics": [ - "Magnetic Circuits: Basic definitions", - "magnetization characteristics of Ferro magnetic materials", - "self inductance and mutual inductance, energy in linear magnetic systems", - "coils connected in series, AC excitation in magnetic circuits", - "magnetic field produced by current carrying conductor", - "Force on a current carrying conductor. Induced voltage", - "laws of electromagnetic Induction, direction of induced E.M.F.", - "Single phase transformer- General construction, working principle, e.m.f. equation", - "equivalent circuits, phasor diagram, voltage regulation", - "losses and efficiency, open circuit and short circuit test" + { + "id": "bt104-u3-magnetic-circuits-basic-definitions", + "slug": "magnetic-circuits-basic-definitions", + "title": "Magnetic Circuits: Basic definitions", + "displayOrder": 1 + }, + { + "id": "bt104-u3-magnetization-characteristics-of-ferro-magnetic-materials", + "slug": "magnetization-characteristics-of-ferro-magnetic-materials", + "title": "magnetization characteristics of Ferro magnetic materials", + "displayOrder": 2 + }, + { + "id": "bt104-u3-self-inductance-and-mutual-inductance-energy-in-linear-magnetic-systems", + "slug": "self-inductance-and-mutual-inductance-energy-in-linear-magnetic-systems", + "title": "self inductance and mutual inductance, energy in linear magnetic systems", + "displayOrder": 3 + }, + { + "id": "bt104-u3-coils-connected-in-series-ac-excitation-in-magnetic-circuits", + "slug": "coils-connected-in-series-ac-excitation-in-magnetic-circuits", + "title": "coils connected in series, AC excitation in magnetic circuits", + "displayOrder": 4 + }, + { + "id": "bt104-u3-magnetic-field-produced-by-current-carrying-conductor", + "slug": "magnetic-field-produced-by-current-carrying-conductor", + "title": "magnetic field produced by current carrying conductor", + "displayOrder": 5 + }, + { + "id": "bt104-u3-force-on-a-current-carrying-conductor-induced-voltage", + "slug": "force-on-a-current-carrying-conductor-induced-voltage", + "title": "Force on a current carrying conductor. Induced voltage", + "displayOrder": 6 + }, + { + "id": "bt104-u3-laws-of-electromagnetic-induction-direction-of-induced-emf", + "slug": "laws-of-electromagnetic-induction-direction-of-induced-emf", + "title": "laws of electromagnetic Induction, direction of induced E.M.F.", + "displayOrder": 7 + }, + { + "id": "bt104-u3-single-phase-transformer-general-construction-working-principle-emf-equation", + "slug": "single-phase-transformer-general-construction-working-principle-emf-equation", + "title": "Single phase transformer- General construction, working principle, e.m.f. equation", + "displayOrder": 8 + }, + { + "id": "bt104-u3-equivalent-circuits-phasor-diagram-voltage-regulation", + "slug": "equivalent-circuits-phasor-diagram-voltage-regulation", + "title": "equivalent circuits, phasor diagram, voltage regulation", + "displayOrder": 9 + }, + { + "id": "bt104-u3-losses-and-efficiency-open-circuit-and-short-circuit-test", + "slug": "losses-and-efficiency-open-circuit-and-short-circuit-test", + "title": "losses and efficiency, open circuit and short circuit test", + "displayOrder": 10 + } ], "questionIds": [ "bt104_m3_nov2022_q1", @@ -160,17 +290,47 @@ ] }, { - "id": "module-4", + "id": "bt104-u4", "number": 4, "title": "Electrical Machines", - "hours": null, + "hours": 8, "topics": [ - "Construction, Classification & Working Principle of DC machine, induction machine and synchronous machine", - "Working principle of 3-Phase induction motor", - "Concept of slip in 3-Phase induction motor", - "Explanation of Torque-slip characteristics of 3-Phase induction motor", - "Types of losses occurring in electrical machines", - "Applications of DC machine, induction machine and synchronous machine" + { + "id": "bt104-u4-construction-classification-and-working-principle-of-dc-machine-induction-machine-and-synchronous-machine", + "slug": "construction-classification-and-working-principle-of-dc-machine-induction-machine-and-synchronous-machine", + "title": "Construction, Classification & Working Principle of DC machine, induction machine and synchronous machine", + "displayOrder": 1 + }, + { + "id": "bt104-u4-working-principle-of-3-phase-induction-motor", + "slug": "working-principle-of-3-phase-induction-motor", + "title": "Working principle of 3-Phase induction motor", + "displayOrder": 2 + }, + { + "id": "bt104-u4-concept-of-slip-in-3-phase-induction-motor", + "slug": "concept-of-slip-in-3-phase-induction-motor", + "title": "Concept of slip in 3-Phase induction motor", + "displayOrder": 3 + }, + { + "id": "bt104-u4-explanation-of-torque-slip-characteristics-of-3-phase-induction-motor", + "slug": "explanation-of-torque-slip-characteristics-of-3-phase-induction-motor", + "title": "Explanation of Torque-slip characteristics of 3-Phase induction motor", + "displayOrder": 4 + }, + { + "id": "bt104-u4-types-of-losses-occurring-in-electrical-machines", + "slug": "types-of-losses-occurring-in-electrical-machines", + "title": "Types of losses occurring in electrical machines", + "displayOrder": 5 + }, + { + "id": "bt104-u4-applications-of-dc-machine-induction-machine-and-synchronous-machine", + "slug": "applications-of-dc-machine-induction-machine-and-synchronous-machine", + "title": "Applications of DC machine, induction machine and synchronous machine", + "displayOrder": 6 + } ], "questionIds": [ "bt104_m4_nov2022_q1", @@ -202,19 +362,59 @@ ] }, { - "id": "module-5", + "id": "bt104-u5", "number": 5, "title": "Basic Electronics", - "hours": null, + "hours": 8, "topics": [ - "Number systems & Their conversion used in digital electronics", - "De morgan's theorem, Logic Gates", - "half and full adder circuits", - "R-S flip flop, J-K flip flop", - "Introduction to Semiconductors, Diodes, V-I characteristics", - "Bipolar junction transistors (BJT) and their working", - "introduction to CC, CB & CE transistor configurations", - "different configurations and modes of operation of BJT" + { + "id": "bt104-u5-number-systems-and-their-conversion-used-in-digital-electronics", + "slug": "number-systems-and-their-conversion-used-in-digital-electronics", + "title": "Number systems & Their conversion used in digital electronics", + "displayOrder": 1 + }, + { + "id": "bt104-u5-de-morgans-theorem-logic-gates", + "slug": "de-morgans-theorem-logic-gates", + "title": "De morgan's theorem, Logic Gates", + "displayOrder": 2 + }, + { + "id": "bt104-u5-half-and-full-adder-circuits", + "slug": "half-and-full-adder-circuits", + "title": "half and full adder circuits", + "displayOrder": 3 + }, + { + "id": "bt104-u5-r-s-flip-flop-j-k-flip-flop", + "slug": "r-s-flip-flop-j-k-flip-flop", + "title": "R-S flip flop, J-K flip flop", + "displayOrder": 4 + }, + { + "id": "bt104-u5-introduction-to-semiconductors-diodes-v-i-characteristics", + "slug": "introduction-to-semiconductors-diodes-v-i-characteristics", + "title": "Introduction to Semiconductors, Diodes, V-I characteristics", + "displayOrder": 5 + }, + { + "id": "bt104-u5-bipolar-junction-transistors-bjt-and-their-working", + "slug": "bipolar-junction-transistors-bjt-and-their-working", + "title": "Bipolar junction transistors (BJT) and their working", + "displayOrder": 6 + }, + { + "id": "bt104-u5-introduction-to-cc-cb-and-ce-transistor-configurations", + "slug": "introduction-to-cc-cb-and-ce-transistor-configurations", + "title": "introduction to CC, CB & CE transistor configurations", + "displayOrder": 7 + }, + { + "id": "bt104-u5-different-configurations-and-modes-of-operation-of-bjt", + "slug": "different-configurations-and-modes-of-operation-of-bjt", + "title": "different configurations and modes of operation of BJT", + "displayOrder": 8 + } ], "questionIds": [ "bt104_m5_nov2022_q1", diff --git a/content/rgpv/common/semester-2/bt-105/syllabus.json b/content/rgpv/common/semester-2/bt-105/syllabus.json index 46bd011..4ba4c31 100644 --- a/content/rgpv/common/semester-2/bt-105/syllabus.json +++ b/content/rgpv/common/semester-2/bt-105/syllabus.json @@ -13,16 +13,41 @@ }, "modules": [ { - "id": "module-1", + "id": "bt105-u1", "number": 1, "title": "Introduction to Engineering Drawing & Curves", - "hours": null, + "hours": 8, "topics": [ - "Principles of Engineering Graphics and their significance", - "usage of Drawing instruments, lettering", - "Conic sections including the Rectangular Hyperbola (General method only)", - "Cycloid, Epicycloid, Hypocycloid and Involute", - "Scales – Plain, Diagonal and Vernier Scales" + { + "id": "bt105-u1-principles-of-engineering-graphics-and-their-significance", + "slug": "principles-of-engineering-graphics-and-their-significance", + "title": "Principles of Engineering Graphics and their significance", + "displayOrder": 1 + }, + { + "id": "bt105-u1-usage-of-drawing-instruments-lettering", + "slug": "usage-of-drawing-instruments-lettering", + "title": "usage of Drawing instruments, lettering", + "displayOrder": 2 + }, + { + "id": "bt105-u1-conic-sections-including-the-rectangular-hyperbola-general-method-only", + "slug": "conic-sections-including-the-rectangular-hyperbola-general-method-only", + "title": "Conic sections including the Rectangular Hyperbola (General method only)", + "displayOrder": 3 + }, + { + "id": "bt105-u1-cycloid-epicycloid-hypocycloid-and-involute", + "slug": "cycloid-epicycloid-hypocycloid-and-involute", + "title": "Cycloid, Epicycloid, Hypocycloid and Involute", + "displayOrder": 4 + }, + { + "id": "bt105-u1-scales-plain-diagonal-and-vernier-scales", + "slug": "scales-plain-diagonal-and-vernier-scales", + "title": "Scales – Plain, Diagonal and Vernier Scales", + "displayOrder": 5 + } ], "questionIds": [ "bt105_m1_nov2022_q1", @@ -55,15 +80,35 @@ ] }, { - "id": "module-2", + "id": "bt105-u2", "number": 2, "title": "Orthographic Projections", - "hours": null, + "hours": 8, "topics": [ - "Principles of Orthographic Projections- Conventions", - "Projections of Points and lines inclined to both planes", - "Projections of planes inclined Planes", - "Auxiliary Planes" + { + "id": "bt105-u2-principles-of-orthographic-projections-conventions", + "slug": "principles-of-orthographic-projections-conventions", + "title": "Principles of Orthographic Projections- Conventions", + "displayOrder": 1 + }, + { + "id": "bt105-u2-projections-of-points-and-lines-inclined-to-both-planes", + "slug": "projections-of-points-and-lines-inclined-to-both-planes", + "title": "Projections of Points and lines inclined to both planes", + "displayOrder": 2 + }, + { + "id": "bt105-u2-projections-of-planes-inclined-planes", + "slug": "projections-of-planes-inclined-planes", + "title": "Projections of planes inclined Planes", + "displayOrder": 3 + }, + { + "id": "bt105-u2-auxiliary-planes", + "slug": "auxiliary-planes", + "title": "Auxiliary Planes", + "displayOrder": 4 + } ], "questionIds": [ "bt105_m2_nov2022_q1", @@ -96,15 +141,35 @@ ] }, { - "id": "module-3", + "id": "bt105-u3", "number": 3, "title": "Projections of Regular Solids", - "hours": null, + "hours": 8, "topics": [ - "Projections of Regular Solids covering, those inclined to both the Planes", - "Auxiliary Views", - "Draw simple annotation, dimensioning and scale", - "Floor plans that include: windows, doors, and fixtures such as WC, bath, sink, shower, etc." + { + "id": "bt105-u3-projections-of-regular-solids-covering-those-inclined-to-both-the-planes", + "slug": "projections-of-regular-solids-covering-those-inclined-to-both-the-planes", + "title": "Projections of Regular Solids covering, those inclined to both the Planes", + "displayOrder": 1 + }, + { + "id": "bt105-u3-auxiliary-views", + "slug": "auxiliary-views", + "title": "Auxiliary Views", + "displayOrder": 2 + }, + { + "id": "bt105-u3-draw-simple-annotation-dimensioning-and-scale", + "slug": "draw-simple-annotation-dimensioning-and-scale", + "title": "Draw simple annotation, dimensioning and scale", + "displayOrder": 3 + }, + { + "id": "bt105-u3-floor-plans-that-include-windows-doors-and-fixtures-such-as-wc-bath-sink-shower-etc", + "slug": "floor-plans-that-include-windows-doors-and-fixtures-such-as-wc-bath-sink-shower-etc", + "title": "Floor plans that include: windows, doors, and fixtures such as WC, bath, sink, shower, etc.", + "displayOrder": 4 + } ], "questionIds": [ "bt105_m3_nov2022_q1", @@ -126,15 +191,35 @@ ] }, { - "id": "module-4", + "id": "bt105-u4", "number": 4, "title": "Sections of Solids & Development of Surfaces", - "hours": null, + "hours": 8, "topics": [ - "Sections and Sectional Views of Right Angular Solids covering, Prism, Cylinder, Pyramid, Cone", - "Auxiliary Views", - "Development of surfaces of Right Regular Solids - Prism, Pyramid, Cylinder and Cone", - "Draw the sectional orthographic views of geometrical solids, objects from industry and dwellings (foundation to slab only)" + { + "id": "bt105-u4-sections-and-sectional-views-of-right-angular-solids-covering-prism-cylinder-pyramid-cone", + "slug": "sections-and-sectional-views-of-right-angular-solids-covering-prism-cylinder-pyramid-cone", + "title": "Sections and Sectional Views of Right Angular Solids covering, Prism, Cylinder, Pyramid, Cone", + "displayOrder": 1 + }, + { + "id": "bt105-u4-auxiliary-views", + "slug": "auxiliary-views", + "title": "Auxiliary Views", + "displayOrder": 2 + }, + { + "id": "bt105-u4-development-of-surfaces-of-right-regular-solids-prism-pyramid-cylinder-and-cone", + "slug": "development-of-surfaces-of-right-regular-solids-prism-pyramid-cylinder-and-cone", + "title": "Development of surfaces of Right Regular Solids - Prism, Pyramid, Cylinder and Cone", + "displayOrder": 3 + }, + { + "id": "bt105-u4-draw-the-sectional-orthographic-views-of-geometrical-solids-objects-from-industry-and-dwellings-foundation-to-slab-only", + "slug": "draw-the-sectional-orthographic-views-of-geometrical-solids-objects-from-industry-and-dwellings-foundation-to-slab-only", + "title": "Draw the sectional orthographic views of geometrical solids, objects from industry and dwellings (foundation to slab only)", + "displayOrder": 4 + } ], "questionIds": [ "bt105_m4_dec2023_q1", @@ -157,19 +242,59 @@ ] }, { - "id": "module-5", + "id": "bt105-u5", "number": 5, "title": "Isometric Projections & Computer Graphics (CAD)", - "hours": null, + "hours": 8, "topics": [ - "Principles of Isometric projection – Isometric Scale, Isometric Views, Conventions", - "Isometric Views of lines, Planes, Simple and compound Solids", - "Conversion of Isometric Views to Orthographic Views and Vice-versa, Conventions", - "Overview of Computer Graphics... Theory of CAD software [Menu System, Toolbars, Drawing Area, etc.]", - "Customisation & CAD Drawing", - "Annotations, layering & other functions", - "Demonstration of a simple team design project", - "Introduction to Building Information Modelling (BIM)" + { + "id": "bt105-u5-principles-of-isometric-projection-isometric-scale-isometric-views-conventions", + "slug": "principles-of-isometric-projection-isometric-scale-isometric-views-conventions", + "title": "Principles of Isometric projection – Isometric Scale, Isometric Views, Conventions", + "displayOrder": 1 + }, + { + "id": "bt105-u5-isometric-views-of-lines-planes-simple-and-compound-solids", + "slug": "isometric-views-of-lines-planes-simple-and-compound-solids", + "title": "Isometric Views of lines, Planes, Simple and compound Solids", + "displayOrder": 2 + }, + { + "id": "bt105-u5-conversion-of-isometric-views-to-orthographic-views-and-vice-versa-conventions", + "slug": "conversion-of-isometric-views-to-orthographic-views-and-vice-versa-conventions", + "title": "Conversion of Isometric Views to Orthographic Views and Vice-versa, Conventions", + "displayOrder": 3 + }, + { + "id": "bt105-u5-overview-of-computer-graphics-theory-of-cad-software-menu-system-toolbars-drawing-area-etc", + "slug": "overview-of-computer-graphics-theory-of-cad-software-menu-system-toolbars-drawing-area-etc", + "title": "Overview of Computer Graphics... Theory of CAD software [Menu System, Toolbars, Drawing Area, etc.]", + "displayOrder": 4 + }, + { + "id": "bt105-u5-customisation-and-cad-drawing", + "slug": "customisation-and-cad-drawing", + "title": "Customisation & CAD Drawing", + "displayOrder": 5 + }, + { + "id": "bt105-u5-annotations-layering-and-other-functions", + "slug": "annotations-layering-and-other-functions", + "title": "Annotations, layering & other functions", + "displayOrder": 6 + }, + { + "id": "bt105-u5-demonstration-of-a-simple-team-design-project", + "slug": "demonstration-of-a-simple-team-design-project", + "title": "Demonstration of a simple team design project", + "displayOrder": 7 + }, + { + "id": "bt105-u5-introduction-to-building-information-modelling-bim", + "slug": "introduction-to-building-information-modelling-bim", + "title": "Introduction to Building Information Modelling (BIM)", + "displayOrder": 8 + } ], "questionIds": [ "bt105_m5_nov2022_q1", diff --git a/content/rgpv/common/semester-2/bt-202/syllabus.json b/content/rgpv/common/semester-2/bt-202/syllabus.json index 82a40fb..ba656b0 100644 --- a/content/rgpv/common/semester-2/bt-202/syllabus.json +++ b/content/rgpv/common/semester-2/bt-202/syllabus.json @@ -11,19 +11,59 @@ }, "modules": [ { - "id": "module-1", + "id": "bt202-u1", "number": 1, "title": "Ordinary Differential Equations I", "hours": 6, "topics": [ - "Differential Equations of First Order and First Degree", - "Leibnitz linear", - "Bernoulli's", - "Exact", - "Differential Equations of First Order and Higher Degree", - "Higher order differential equations with constants coefficients", - "Homogeneous Linear Differential equations", - "Simultaneous Differential Equations" + { + "id": "bt202-u1-differential-equations-of-first-order-and-first-degree", + "slug": "differential-equations-of-first-order-and-first-degree", + "title": "Differential Equations of First Order and First Degree", + "displayOrder": 1 + }, + { + "id": "bt202-u1-leibnitz-linear", + "slug": "leibnitz-linear", + "title": "Leibnitz linear", + "displayOrder": 2 + }, + { + "id": "bt202-u1-bernoullis", + "slug": "bernoullis", + "title": "Bernoulli's", + "displayOrder": 3 + }, + { + "id": "bt202-u1-exact", + "slug": "exact", + "title": "Exact", + "displayOrder": 4 + }, + { + "id": "bt202-u1-differential-equations-of-first-order-and-higher-degree", + "slug": "differential-equations-of-first-order-and-higher-degree", + "title": "Differential Equations of First Order and Higher Degree", + "displayOrder": 5 + }, + { + "id": "bt202-u1-higher-order-differential-equations-with-constants-coefficients", + "slug": "higher-order-differential-equations-with-constants-coefficients", + "title": "Higher order differential equations with constants coefficients", + "displayOrder": 6 + }, + { + "id": "bt202-u1-homogeneous-linear-differential-equations", + "slug": "homogeneous-linear-differential-equations", + "title": "Homogeneous Linear Differential equations", + "displayOrder": 7 + }, + { + "id": "bt202-u1-simultaneous-differential-equations", + "slug": "simultaneous-differential-equations", + "title": "Simultaneous Differential Equations", + "displayOrder": 8 + } ], "questionIds": [ "bt202_nov2022_q1", @@ -54,17 +94,47 @@ ] }, { - "id": "module-2", + "id": "bt202-u2", "number": 2, "title": "Ordinary Differential Equations II", "hours": 8, "topics": [ - "Second order linear differential equations with variable coefficients", - "Method of variation of parameters", - "Power series solutions", - "Legendre polynomials", - "Bessel functions of the first kind", - "Properties of Bessel functions" + { + "id": "bt202-u2-second-order-linear-differential-equations-with-variable-coefficients", + "slug": "second-order-linear-differential-equations-with-variable-coefficients", + "title": "Second order linear differential equations with variable coefficients", + "displayOrder": 1 + }, + { + "id": "bt202-u2-method-of-variation-of-parameters", + "slug": "method-of-variation-of-parameters", + "title": "Method of variation of parameters", + "displayOrder": 2 + }, + { + "id": "bt202-u2-power-series-solutions", + "slug": "power-series-solutions", + "title": "Power series solutions", + "displayOrder": 3 + }, + { + "id": "bt202-u2-legendre-polynomials", + "slug": "legendre-polynomials", + "title": "Legendre polynomials", + "displayOrder": 4 + }, + { + "id": "bt202-u2-bessel-functions-of-the-first-kind", + "slug": "bessel-functions-of-the-first-kind", + "title": "Bessel functions of the first kind", + "displayOrder": 5 + }, + { + "id": "bt202-u2-properties-of-bessel-functions", + "slug": "properties-of-bessel-functions", + "title": "Properties of Bessel functions", + "displayOrder": 6 + } ], "questionIds": [ "bt202_nov2022_q5", @@ -89,14 +159,29 @@ ] }, { - "id": "module-3", + "id": "bt202-u3", "number": 3, "title": "Partial Differential Equations", "hours": 8, "topics": [ - "Formulation of Partial Differential equations", - "Linear and Non-Linear Partial Differential Equations", - "Homogeneous Linear Partial Differential Equations with Constants Coefficients" + { + "id": "bt202-u3-formulation-of-partial-differential-equations", + "slug": "formulation-of-partial-differential-equations", + "title": "Formulation of Partial Differential equations", + "displayOrder": 1 + }, + { + "id": "bt202-u3-linear-and-non-linear-partial-differential-equations", + "slug": "linear-and-non-linear-partial-differential-equations", + "title": "Linear and Non-Linear Partial Differential Equations", + "displayOrder": 2 + }, + { + "id": "bt202-u3-homogeneous-linear-partial-differential-equations-with-constants-coefficients", + "slug": "homogeneous-linear-partial-differential-equations-with-constants-coefficients", + "title": "Homogeneous Linear Partial Differential Equations with Constants Coefficients", + "displayOrder": 3 + } ], "questionIds": [ "bt202_nov2022_q6", @@ -124,21 +209,71 @@ ] }, { - "id": "module-4", + "id": "bt202-u4", "number": 4, "title": "Functions of Complex Variable", "hours": 8, "topics": [ - "Analytic Functions", - "Harmonic Conjugate", - "Cauchy-Riemann Equations", - "Line Integral", - "Cauchy-Goursat theorem", - "Cauchy Integral formula", - "Singular Points", - "Poles & Residues", - "Residue Theorem", - "Application of Residues theorem for Evaluation of Real Integral (Unit Circle)" + { + "id": "bt202-u4-analytic-functions", + "slug": "analytic-functions", + "title": "Analytic Functions", + "displayOrder": 1 + }, + { + "id": "bt202-u4-harmonic-conjugate", + "slug": "harmonic-conjugate", + "title": "Harmonic Conjugate", + "displayOrder": 2 + }, + { + "id": "bt202-u4-cauchy-riemann-equations", + "slug": "cauchy-riemann-equations", + "title": "Cauchy-Riemann Equations", + "displayOrder": 3 + }, + { + "id": "bt202-u4-line-integral", + "slug": "line-integral", + "title": "Line Integral", + "displayOrder": 4 + }, + { + "id": "bt202-u4-cauchy-goursat-theorem", + "slug": "cauchy-goursat-theorem", + "title": "Cauchy-Goursat theorem", + "displayOrder": 5 + }, + { + "id": "bt202-u4-cauchy-integral-formula", + "slug": "cauchy-integral-formula", + "title": "Cauchy Integral formula", + "displayOrder": 6 + }, + { + "id": "bt202-u4-singular-points", + "slug": "singular-points", + "title": "Singular Points", + "displayOrder": 7 + }, + { + "id": "bt202-u4-poles-and-residues", + "slug": "poles-and-residues", + "title": "Poles & Residues", + "displayOrder": 8 + }, + { + "id": "bt202-u4-residue-theorem", + "slug": "residue-theorem", + "title": "Residue Theorem", + "displayOrder": 9 + }, + { + "id": "bt202-u4-application-of-residues-theorem-for-evaluation-of-real-integral-unit-circle", + "slug": "application-of-residues-theorem-for-evaluation-of-real-integral-unit-circle", + "title": "Application of Residues theorem for Evaluation of Real Integral (Unit Circle)", + "displayOrder": 10 + } ], "questionIds": [ "bt202_nov2022_q8", @@ -173,23 +308,83 @@ ] }, { - "id": "module-5", + "id": "bt202-u5", "number": 5, "title": "Vector Calculus", "hours": 10, "topics": [ - "Differentiation of Vectors", - "Scalar and vector point function", - "Gradient", - "Geometrical meaning of gradient", - "Directional Derivative", - "Divergence and Curl", - "Line Integral", - "Surface Integral", - "Volume Integral", - "Gauss Divergence", - "Stokes theorem", - "Green theorems" + { + "id": "bt202-u5-differentiation-of-vectors", + "slug": "differentiation-of-vectors", + "title": "Differentiation of Vectors", + "displayOrder": 1 + }, + { + "id": "bt202-u5-scalar-and-vector-point-function", + "slug": "scalar-and-vector-point-function", + "title": "Scalar and vector point function", + "displayOrder": 2 + }, + { + "id": "bt202-u5-gradient", + "slug": "gradient", + "title": "Gradient", + "displayOrder": 3 + }, + { + "id": "bt202-u5-geometrical-meaning-of-gradient", + "slug": "geometrical-meaning-of-gradient", + "title": "Geometrical meaning of gradient", + "displayOrder": 4 + }, + { + "id": "bt202-u5-directional-derivative", + "slug": "directional-derivative", + "title": "Directional Derivative", + "displayOrder": 5 + }, + { + "id": "bt202-u5-divergence-and-curl", + "slug": "divergence-and-curl", + "title": "Divergence and Curl", + "displayOrder": 6 + }, + { + "id": "bt202-u5-line-integral", + "slug": "line-integral", + "title": "Line Integral", + "displayOrder": 7 + }, + { + "id": "bt202-u5-surface-integral", + "slug": "surface-integral", + "title": "Surface Integral", + "displayOrder": 8 + }, + { + "id": "bt202-u5-volume-integral", + "slug": "volume-integral", + "title": "Volume Integral", + "displayOrder": 9 + }, + { + "id": "bt202-u5-gauss-divergence", + "slug": "gauss-divergence", + "title": "Gauss Divergence", + "displayOrder": 10 + }, + { + "id": "bt202-u5-stokes-theorem", + "slug": "stokes-theorem", + "title": "Stokes theorem", + "displayOrder": 11 + }, + { + "id": "bt202-u5-green-theorems", + "slug": "green-theorems", + "title": "Green theorems", + "displayOrder": 12 + } ], "questionIds": [ "bt202_nov2022_q12", diff --git a/lib/content/index.ts b/lib/content/index.ts index b392375..a073467 100644 --- a/lib/content/index.ts +++ b/lib/content/index.ts @@ -1,5 +1,6 @@ import fs from "fs/promises"; import path from "path"; +import type { Topic } from "@/types/topic"; export async function getSyllabus( branch: string, @@ -64,3 +65,52 @@ export async function getPYQs( return null; } } +interface SyllabusModule { + id: string; + number: number; + title: string; + hours: number; + topics?: Topic[]; +} + +export interface TopicLookupResult { + topic: Topic; + module: { + id: string; + number: number; + title: string; + }; +} +export async function getTopicById( + branch: string, + semester: string, + subjectCode: string, + topicId: string +): Promise { + const syllabus = await getSyllabus(branch, semester, subjectCode); + + if (!syllabus) { + return null; + } + + const modules = (syllabus.modules ?? []) as SyllabusModule[]; + + for (const syllabusModule of modules) { + const topics = syllabusModule.topics ?? []; + + const topic = topics.find((item) => item.id === topicId); + + if (topic) { + return { + topic, + module: { + id: syllabusModule.id, + number: syllabusModule.number, + title: syllabusModule.title, + }, + }; + } + } + + return null; +} diff --git a/scripts/migrate-syllabus.ts b/scripts/migrate-syllabus.ts index da82b29..7bc5a8b 100644 --- a/scripts/migrate-syllabus.ts +++ b/scripts/migrate-syllabus.ts @@ -1,17 +1,51 @@ import fs from "node:fs"; import path from "node:path"; -const ROOT_DIRECTORY = path.join( - process.cwd(), - "content", - "rgpv", - "common" -); +const ROOT_DIRECTORY = path.join(process.cwd(), "content", "rgpv", "common"); const SYLLABUS_FILE_NAME = "syllabus.json"; -function findSyllabusFiles(directory: string, results: string[] = []): string[] { - const entries = fs.readdirSync(directory, { withFileTypes: true }); +interface Subject { + id: string; + code: string; + name: string; + title: string; +} + +interface Module { + id: string; + number: number; + title: string; + hours: number; + topics: string[]; + questionIds: string[]; + predictedQuestionIds: string[]; +} + +interface Syllabus { + subject: Subject; + modules: Module[]; +} + +interface ValidationReport { + file: string; + subjectCode: string; + subjectName: string; + moduleCount: number; + topicCount: number; + questionCount: number; + predictedQuestionCount: number; + valid: boolean; + errors: string[]; +} + +function findSyllabusFiles( + directory: string, + results: string[] = [] +): string[] { + const entries = fs.readdirSync(directory, { + withFileTypes: true, + }); for (const entry of entries) { const fullPath = path.join(directory, entry.name); @@ -29,34 +63,255 @@ function findSyllabusFiles(directory: string, results: string[] = []): string[] return results; } -function main() { - console.log("\nšŸ” HyperLearningTech Syllabus Discovery Tool\n"); +function readSyllabus(filePath: string): Syllabus { + const raw = fs.readFileSync(filePath, "utf8"); - if (!fs.existsSync(ROOT_DIRECTORY)) { - console.error(`āŒ Directory not found:\n${ROOT_DIRECTORY}`); - process.exit(1); + return JSON.parse(raw); +} + +function validateSyllabus( + syllabus: Syllabus, + filePath: string +): ValidationReport { + const errors: string[] = []; + + if (!syllabus.subject) { + errors.push("Missing subject object."); + } + + if (!syllabus.subject?.code) { + errors.push("Missing subject.code"); } - const syllabusFiles = findSyllabusFiles(ROOT_DIRECTORY); + if (!syllabus.subject?.name) { + errors.push("Missing subject.name"); + } - if (syllabusFiles.length === 0) { - console.log("⚠ No syllabus files found."); - return; + if (!syllabus.subject?.title) { + errors.push("Missing subject.title"); } - console.log(`āœ… Found ${syllabusFiles.length} syllabus files\n`); + if (!Array.isArray(syllabus.modules)) { + errors.push("modules must be an array."); + } - syllabusFiles - .sort() - .forEach((filePath, index) => { - const relativePath = path.relative(ROOT_DIRECTORY, filePath); + let moduleCount = 0; + let topicCount = 0; + let questionCount = 0; + let predictedQuestionCount = 0; - console.log( - `${String(index + 1).padStart(2, "0")}. ${relativePath}` - ); + if (Array.isArray(syllabus.modules)) { + moduleCount = syllabus.modules.length; + + syllabus.modules.forEach((module, moduleIndex) => { + if (!module.id) { + errors.push(`Module ${moduleIndex + 1}: missing id`); + } + + if (typeof module.number !== "number") { + errors.push(`Module ${moduleIndex + 1}: invalid number`); + } + + if (!module.title) { + errors.push(`Module ${moduleIndex + 1}: missing title`); + } + + if (typeof module.hours !== "number") { + errors.push(`Module ${moduleIndex + 1}: invalid hours`); + } + + if (!Array.isArray(module.topics)) { + errors.push(`Module ${moduleIndex + 1}: topics must be an array`); + } else { + topicCount += module.topics.length; + + const topicSet = new Set(); + + module.topics.forEach((topic) => { + if (typeof topic !== "string") { + errors.push(`Module ${moduleIndex + 1}: topic must be string`); + return; + } + + if (!topic.trim()) { + errors.push(`Module ${moduleIndex + 1}: empty topic detected`); + } + + if (topicSet.has(topic.trim())) { + errors.push( + `Module ${moduleIndex + 1}: duplicate topic "${topic}"` + ); + } + + topicSet.add(topic.trim()); + }); + } + + if (!Array.isArray(module.questionIds)) { + errors.push(`Module ${moduleIndex + 1}: questionIds must be an array`); + } else { + questionCount += module.questionIds.length; + } + + if (!Array.isArray(module.predictedQuestionIds)) { + errors.push( + `Module ${moduleIndex + 1}: predictedQuestionIds must be an array` + ); + } else { + predictedQuestionCount += module.predictedQuestionIds.length; + } + }); + } + + return { + file: path.relative(ROOT_DIRECTORY, filePath), + subjectCode: syllabus.subject?.code ?? "UNKNOWN", + subjectName: syllabus.subject?.name ?? "Unknown Subject", + moduleCount, + topicCount, + questionCount, + predictedQuestionCount, + valid: errors.length === 0, + errors, + }; +} + +function printReport(report: ValidationReport) { + console.log("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"); + + console.log(report.subjectCode); + console.log(report.subjectName); + + console.log(""); + + console.log(`Modules : ${report.moduleCount}`); + console.log(`Topics : ${report.topicCount}`); + console.log(`Question IDs : ${report.questionCount}`); + console.log(`Predicted Question IDs : ${report.predictedQuestionCount}`); + + console.log( + `Status : ${report.valid ? "āœ… VALID" : "āŒ INVALID"}` + ); + + if (!report.valid) { + console.log(""); + + console.log("Errors:"); + + report.errors.forEach((error) => { + console.log(` • ${error}`); }); + } + + console.log(""); +} + +function main() { + interface MigrationSummary { + files: number; + valid: number; + invalid: number; + modules: number; + topics: number; + questions: number; + predicted: number; + } + + function main(): MigrationSummary { + console.log("\nšŸ” HyperLearningTech Migration Validator\n"); + + if (!fs.existsSync(ROOT_DIRECTORY)) { + throw new Error(`Directory not found:\n${ROOT_DIRECTORY}`); + } + + const files = findSyllabusFiles(ROOT_DIRECTORY).sort(); + + if (files.length === 0) { + throw new Error("No syllabus files found."); + } + + const reports: ValidationReport[] = []; + + for (const file of files) { + const syllabus = readSyllabus(file); + + const report = validateSyllabus(syllabus, file); + + reports.push(report); + + printReport(report); + } - console.log("\nšŸŽ‰ Discovery completed successfully."); + const summary: MigrationSummary = reports.reduce( + (acc, report) => { + acc.files++; + + if (report.valid) { + acc.valid++; + } else { + acc.invalid++; + } + + acc.modules += report.moduleCount; + acc.topics += report.topicCount; + acc.questions += report.questionCount; + acc.predicted += report.predictedQuestionCount; + + return acc; + }, + { + files: 0, + valid: 0, + invalid: 0, + modules: 0, + topics: 0, + questions: 0, + predicted: 0, + } + ); + + console.log("========================================"); + console.log("Migration Summary"); + console.log("========================================"); + + console.log(`Files : ${summary.files}`); + console.log(`Valid : ${summary.valid}`); + console.log(`Invalid : ${summary.invalid}`); + console.log(`Modules : ${summary.modules}`); + console.log(`Topics : ${summary.topics}`); + console.log(`Question IDs : ${summary.questions}`); + console.log(`Predicted Question IDs : ${summary.predicted}`); + + console.log("\nšŸŽ‰ Validation completed."); + + return summary; + } + + try { + const summary = main(); + + if (summary.invalid > 0) { + console.error( + `\nāŒ Validation failed. ${summary.invalid} syllabus file(s) contain errors.` + ); + + process.exit(1); + } + + console.log("\nāœ… All syllabus files are valid."); + + process.exit(0); + } catch (error) { + console.error("\nāŒ Migration validator crashed."); + + if (error instanceof Error) { + console.error(error.message); + } else { + console.error(error); + } + + process.exit(1); + } } main(); diff --git a/types/syllabus.ts b/types/syllabus.ts new file mode 100644 index 0000000..76deb55 --- /dev/null +++ b/types/syllabus.ts @@ -0,0 +1,11 @@ +import type { Topic } from "./topic"; + +export interface SyllabusModule { + id: string; + number: number; + title: string; + hours: number; + topics: Topic[]; + questionIds: string[]; + predictedQuestionIds: string[]; +} diff --git a/types/topic.ts b/types/topic.ts index e69de29..a398770 100644 --- a/types/topic.ts +++ b/types/topic.ts @@ -0,0 +1,8 @@ +// types/topic.ts + +export interface Topic { + id: string; + slug: string; + title: string; + displayOrder: number; +} From 7a4ab4f0ba19e297f2ad9c9c1a1f2c0ea77b7435 Mon Sep 17 00:00:00 2001 From: Shiv Date: Sat, 4 Jul 2026 15:05:52 +0530 Subject: [PATCH 4/8] chore(ui): remove unused navbar variables --- components/navbar.tsx | 49 ------------------------------------------- 1 file changed, 49 deletions(-) diff --git a/components/navbar.tsx b/components/navbar.tsx index 67234f1..e369a6b 100644 --- a/components/navbar.tsx +++ b/components/navbar.tsx @@ -43,55 +43,6 @@ const navLinks = [ }, ]; -function MagneticNavItem({ - children, - isActive, - onClick, - href, - label, -}: { - children: React.ReactNode; - isActive: boolean; - onClick: (e: React.MouseEvent, href: string) => void; - href: string; - label: string; -}) { - const ref = useRef(null); - const [position, setPosition] = useState({ x: 0, y: 0 }); - - const handleMouse = (e: React.MouseEvent) => { - const { clientX, clientY } = e; - if (!ref.current) return; - const { height, width, left, top } = ref.current.getBoundingClientRect(); - const middleX = clientX - (left + width / 2); - const middleY = clientY - (top + height / 2); - setPosition({ x: middleX * 0.1, y: middleY * 0.1 }); - }; - - const reset = () => { - setPosition({ x: 0, y: 0 }); - }; - - return ( - onClick(e, href)} - animate={{ x: position.x, y: position.y }} - transition={{ type: "spring", stiffness: 200, damping: 20, mass: 0.1 }} - className="group relative flex h-[48px] w-[64px] cursor-pointer items-center justify-center rounded-[8px] outline-none transition-colors duration-200 hover:bg-white/[0.04]" - aria-label={label} - title={label} - > -
- {children} -
-
- ); -} - export default function Navbar() { const [isOpen, setIsOpen] = useState(false); const [isMobileSearchOpen, setIsMobileSearchOpen] = useState(false); From 4fad80bcdb88196e4116a10f8eaa42779c8a6041 Mon Sep 17 00:00:00 2001 From: Shiv Date: Sun, 5 Jul 2026 23:44:51 +0530 Subject: [PATCH 5/8] feat(ai): implement canonical topic cache architecture --- app/api/ai/workspace/route.ts | 53 +++++------ lib/ai/metrics.ts | 2 +- lib/ai/topic-cache.ts | 94 +++++++++++++++++++ lib/ai/topic-service.ts | 168 ++++++++++++++++++++++++++++++++++ types/ai.ts | 3 +- types/topic-cache.ts | 39 ++++++++ 6 files changed, 327 insertions(+), 32 deletions(-) create mode 100644 lib/ai/topic-cache.ts create mode 100644 lib/ai/topic-service.ts create mode 100644 types/topic-cache.ts diff --git a/app/api/ai/workspace/route.ts b/app/api/ai/workspace/route.ts index 530fb8a..fe62b7f 100644 --- a/app/api/ai/workspace/route.ts +++ b/app/api/ai/workspace/route.ts @@ -1,13 +1,14 @@ import { NextRequest, NextResponse } from "next/server"; import { GoogleGenAI } from "@google/genai"; -import { generateWorkspace } from "@/lib/ai/workspace-service"; +import { generateTopicAnswer } from "@/lib/ai/topic-service"; import { WorkspaceAction } from "@/types/ai"; import { getPrimaryKey } from "@/lib/ai/key-manager"; import { trackMetric } from "@/lib/ai/metrics"; -import { getTopicById } from "@/lib/content"; interface WorkspaceBody { + branch?: string; + semester?: string; topicId?: string; subjectCode?: string; action?: WorkspaceAction; @@ -163,24 +164,13 @@ export async function POST(request: NextRequest) { try { const body = (await request.json()) as WorkspaceBody; + const branch = body.branch?.trim().toLowerCase(); + const semester = body.semester?.trim().toLowerCase(); const topicId = body.topicId?.trim(); const subjectCode = body.subjectCode?.trim().toUpperCase(); - const topicData = - topicId && subjectCode - ? await getTopicById( - "common", - "semester-1", - subjectCode.toLowerCase(), - topicId - ) - : null; - - const topic = topicData?.topic.title; - - const moduleTitle = topicData?.module.title; const forceRefresh = body.forceRefresh ?? false; const question = body.question?.trim(); - const messages = body.messages || []; + const messages = body.messages ?? []; // Chat/question mode if (question) { @@ -196,8 +186,8 @@ export async function POST(request: NextRequest) { const prompt = buildChatPrompt( question, detectedAction, - topic, - moduleTitle, + undefined, + undefined, subjectCode, context ); @@ -215,7 +205,7 @@ export async function POST(request: NextRequest) { }); const relatedTopics = await generateRelatedTopics( - topic || question, + question, subjectCode || "unknown" ); @@ -231,15 +221,21 @@ export async function POST(request: NextRequest) { // Workspace action mode const action = body.action; - if (!topic) { + if (!branch) { + return NextResponse.json( + { success: false, error: "Branch is required." }, + { status: 400 } + ); + } + if (!semester) { return NextResponse.json( - { success: false, error: "Topic is required." }, + { success: false, error: "Semester is required." }, { status: 400 } ); } - if (!moduleTitle) { + if (!topicId) { return NextResponse.json( - { success: false, error: "Module is required." }, + { success: false, error: "Topic ID is required." }, { status: 400 } ); } @@ -256,22 +252,21 @@ export async function POST(request: NextRequest) { ); } - const result = await generateWorkspace({ - topic, - module: moduleTitle, + const result = await generateTopicAnswer({ + branch, + semester, subjectCode, + topicId, action, forceRefresh, }); - const relatedTopics = await generateRelatedTopics(topic, subjectCode); - return NextResponse.json({ success: true, answer: result.answer, cached: result.cached, action, - relatedTopics, + relatedTopics: [], }); } catch (error) { console.error("Workspace API Error:", error); diff --git a/lib/ai/metrics.ts b/lib/ai/metrics.ts index b10157c..1e9fa22 100644 --- a/lib/ai/metrics.ts +++ b/lib/ai/metrics.ts @@ -3,10 +3,10 @@ import { saveMetric } from "./analytics-storage"; export type MetricEvent = | "CACHE_HIT" | "CACHE_MISS" + | "CACHE_REFRESH" | "GENERATION_SUCCESS" | "GENERATION_FAILED" | "GENERATION_RETRY"; - export interface MetricPayload { subjectCode?: string; durationMs?: number; diff --git a/lib/ai/topic-cache.ts b/lib/ai/topic-cache.ts new file mode 100644 index 0000000..c69c2a9 --- /dev/null +++ b/lib/ai/topic-cache.ts @@ -0,0 +1,94 @@ +// lib/ai/topic-cache.ts + +import { getRedis } from "@/lib/redis"; +import type { TopicCache } from "@/types/topic-cache"; + +const CACHE_PREFIX = "topic:"; +const CACHE_VERSION = 1; + +/** + * Build Redis cache key. + */ +function buildCacheKey(topicId: string): string { + return `${CACHE_PREFIX}${topicId}`; +} + +/** + * Read cached topic answer. + * + * Returns null when: + * - Redis is unavailable + * - Cache doesn't exist + * - Cache version is outdated + */ +export async function getTopicCache( + topicId: string +): Promise { + const redis = getRedis(); + + if (!redis) { + return null; + } + + try { + const cache = await redis.get(buildCacheKey(topicId)); + + if (!cache) { + return null; + } + + if (cache.version !== CACHE_VERSION) { + return null; + } + + return cache; + } catch (error) { + console.error("Failed to read topic cache:", error); + + return null; + } +} + +/** + * Save or overwrite a cached topic answer. + */ +export async function saveTopicCache( + cache: Omit +): Promise { + const redis = getRedis(); + + if (!redis) { + return; + } + + try { + await redis.set(buildCacheKey(cache.topicId), { + ...cache, + generatedAt: new Date().toISOString(), + version: CACHE_VERSION, + }); + } catch (error) { + console.error("Failed to save topic cache:", error); + } +} + +/** + * Delete a cached topic. + * + * Used by forceRefresh and future admin tools. + */ +export async function deleteTopicCache( + topicId: string +): Promise { + const redis = getRedis(); + + if (!redis) { + return; + } + + try { + await redis.del(buildCacheKey(topicId)); + } catch (error) { + console.error("Failed to delete topic cache:", error); + } +} diff --git a/lib/ai/topic-service.ts b/lib/ai/topic-service.ts new file mode 100644 index 0000000..b238afa --- /dev/null +++ b/lib/ai/topic-service.ts @@ -0,0 +1,168 @@ +import { GoogleGenAI } from "@google/genai"; + +import { buildWorkspacePrompt } from "@/lib/ai/workspace-prompt-builder"; +import { WorkspaceAction } from "@/types/ai"; + +import { getTopicById } from "@/lib/content"; +import { getSubjectInfo } from "@/lib/ai/subject-map"; +import { getWorkspaceKey } from "@/lib/ai/key-manager"; +import { + getTopicCache, + saveTopicCache, + deleteTopicCache, +} from "@/lib/ai/topic-cache"; +import { trackMetric } from "@/lib/ai/metrics"; + +export interface TopicRequest { + branch: string; + semester: string; + topicId: string; + subjectCode: string; + action: WorkspaceAction; + forceRefresh?: boolean; +} + +export interface TopicResponse { + answer: string; + cached: boolean; +} + +function sleep(ms: number) { + return new Promise((resolve) => setTimeout(resolve, ms)); +} + +async function generateWithRetry( + ai: GoogleGenAI, + prompt: string, + subjectCode: string +): Promise { + const maxAttempts = 3; + + let lastError: unknown; + + for (let attempt = 1; attempt <= maxAttempts; attempt++) { + try { + const started = Date.now(); + + const response = await ai.models.generateContent({ + model: "gemini-2.5-flash-lite", + contents: prompt, + }); + + const answer = response.text?.trim() || "No answer generated."; + + trackMetric("GENERATION_SUCCESS", { + subjectCode, + durationMs: Date.now() - started, + }); + + return answer; + } catch (error) { + lastError = error; + + trackMetric("GENERATION_RETRY", { + subjectCode, + message: `Workspace attempt ${attempt} failed`, + }); + + if (attempt < maxAttempts) { + await sleep(1500 * attempt); + } + } + } + + trackMetric("GENERATION_FAILED", { + subjectCode, + message: String(lastError), + }); + + throw lastError; +} + +export async function generateTopicAnswer( + input: TopicRequest +): Promise { + const { + branch, + semester, + topicId, + subjectCode, + action, + forceRefresh = false, + } = input; + + if (!forceRefresh) { + const cached = await getTopicCache(topicId); + + if (cached) { + trackMetric("CACHE_HIT", { + subjectCode, + }); + + return { + answer: cached.answer, + cached: true, + }; + } + + trackMetric("CACHE_MISS", { + subjectCode, + }); + } + + if (forceRefresh) { + trackMetric("CACHE_REFRESH", { + subjectCode, + }); + + await deleteTopicCache(topicId); + } + + const topicData = await getTopicById( + branch, + semester, + subjectCode.toLowerCase(), + topicId + ); + + if (!topicData) { + throw new Error( + `Topic not found: branch=${branch}, semester=${semester}, subject=${subjectCode}, topicId=${topicId}` + ); + } + + const topic = topicData.topic.title; + const moduleTitle = topicData.module.title; + + if (!topic.trim()) { + throw new Error("Topic is required."); + } + + const subject = getSubjectInfo(subjectCode); + + const prompt = buildWorkspacePrompt({ + action, + topic, + module: moduleTitle, + subjectCode, + subjectName: subject.name, + subjectType: subject.type, + }); + + const ai = new GoogleGenAI({ + apiKey: getWorkspaceKey(), + }); + + const answer = await generateWithRetry(ai, prompt, subjectCode); + + await saveTopicCache({ + topicId, + answer, + model: "gemini-2.5-flash-lite", + }); + + return { + answer, + cached: false, + }; +} diff --git a/types/ai.ts b/types/ai.ts index adb7a4f..2018f23 100644 --- a/types/ai.ts +++ b/types/ai.ts @@ -62,9 +62,8 @@ export type WorkspaceAction = | "FORMULA"; export interface WorkspaceRequest { + topicId: string; subjectCode: string; - module: string; - topic: string; action: WorkspaceAction; forceRefresh?: boolean; } diff --git a/types/topic-cache.ts b/types/topic-cache.ts new file mode 100644 index 0000000..1d45cdb --- /dev/null +++ b/types/topic-cache.ts @@ -0,0 +1,39 @@ +// types/topic-cache.ts + +/** + * Permanent cached answer for a syllabus topic. + * + * This cache represents the official Hyper AI response + * for a specific topic and is stored in Redis. + */ +export interface TopicCache { + /** + * Stable syllabus topic identifier. + * Example: + * bt201-u4-v-number + */ + topicId: string; + + /** + * Generated markdown answer. + */ + answer: string; + + /** + * AI model used to generate the answer. + */ + model: string; + + /** + * ISO timestamp when this answer was generated. + */ + generatedAt: string; + + /** + * Cache schema/content version. + * + * Increment whenever prompt format changes + * so old cache entries can be regenerated. + */ + version: number; +} From 524847c6a1a4816e1afc08504d096abf27a599b5 Mon Sep 17 00:00:00 2001 From: Shiv Date: Mon, 6 Jul 2026 00:34:31 +0530 Subject: [PATCH 6/8] style: apply Prettier formatting --- lib/ai/topic-cache.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/ai/topic-cache.ts b/lib/ai/topic-cache.ts index c69c2a9..02c7754 100644 --- a/lib/ai/topic-cache.ts +++ b/lib/ai/topic-cache.ts @@ -77,9 +77,7 @@ export async function saveTopicCache( * * Used by forceRefresh and future admin tools. */ -export async function deleteTopicCache( - topicId: string -): Promise { +export async function deleteTopicCache(topicId: string): Promise { const redis = getRedis(); if (!redis) { From c3bb3ef64adf929c46f9e1042385b872fa261b6d Mon Sep 17 00:00:00 2001 From: Shiv Date: Mon, 6 Jul 2026 07:16:53 +0530 Subject: [PATCH 7/8] feat(ai): implement follow-up chat workflow and external AI continuation --- app/api/ai/workspace/route.ts | 218 +++------- app/layout.tsx | 14 +- .../[branch]/[semester]/[subject]/ai/page.tsx | 178 ++++----- components/ai/continue-external-ai.tsx | 129 ++++++ components/ai/external-ai-logos.tsx | 75 ++++ components/ai/workspace-chat-loader.tsx | 14 + components/ai/workspace-chat-skeleton.tsx | 30 ++ components/ai/workspace-chat.tsx | 374 +++++++++++------- components/ai/workspace-message.tsx | 36 +- components/mode-toggle.tsx | 2 +- components/navbar.tsx | 2 +- components/theme-provider.tsx | 94 ++++- lib/ai/chat-prompt-builder.ts | 62 +++ lib/ai/external-ai-prompt-builder.ts | 56 +++ lib/ai/external-ai.ts | 75 ++++ lib/ai/followup-service.ts | 116 ++++++ types/ai.ts | 37 ++ 17 files changed, 1088 insertions(+), 424 deletions(-) create mode 100644 components/ai/continue-external-ai.tsx create mode 100644 components/ai/external-ai-logos.tsx create mode 100644 components/ai/workspace-chat-loader.tsx create mode 100644 components/ai/workspace-chat-skeleton.tsx create mode 100644 lib/ai/chat-prompt-builder.ts create mode 100644 lib/ai/external-ai-prompt-builder.ts create mode 100644 lib/ai/external-ai.ts create mode 100644 lib/ai/followup-service.ts diff --git a/app/api/ai/workspace/route.ts b/app/api/ai/workspace/route.ts index fe62b7f..9c4f553 100644 --- a/app/api/ai/workspace/route.ts +++ b/app/api/ai/workspace/route.ts @@ -1,9 +1,8 @@ import { NextRequest, NextResponse } from "next/server"; -import { GoogleGenAI } from "@google/genai"; import { generateTopicAnswer } from "@/lib/ai/topic-service"; +import { generateFollowupAnswer } from "@/lib/ai/followup-service"; import { WorkspaceAction } from "@/types/ai"; -import { getPrimaryKey } from "@/lib/ai/key-manager"; import { trackMetric } from "@/lib/ai/metrics"; interface WorkspaceBody { @@ -14,6 +13,9 @@ interface WorkspaceBody { action?: WorkspaceAction; forceRefresh?: boolean; question?: string; + topic?: string; + module?: string; + cachedExplanation?: string; messages?: Array<{ role: "user" | "assistant"; content: string }>; } @@ -28,138 +30,6 @@ const ALLOWED_ACTIONS: WorkspaceAction[] = [ "FORMULA", ]; -function detectAction(question: string): WorkspaceAction { - const q = question.toLowerCase(); - - if (q.includes("5 mark") || q.includes("5mark")) return "ANSWER_5"; - if (q.includes("7 mark") || q.includes("7mark")) return "ANSWER_7"; - if (q.includes("10 mark") || q.includes("10mark")) return "ANSWER_5"; - if ( - q.includes("revision") || - q.includes("revise") || - q.includes("revision sheet") || - q.includes("quick notes") - ) - return "REVISION"; - if (q.includes("mcq") || q.includes("multiple choice") || q.includes("quiz")) - return "MCQ"; - if ( - q.includes("pyq") || - q.includes("previous year") || - q.includes("past question") - ) - return "PYQ"; - if (q.includes("formula") || q.includes("equation")) return "FORMULA"; - if ( - q.includes("notes") || - q.includes("comprehensive") || - q.includes("detailed notes") - ) - return "NOTES"; - if ( - q.includes("explain") || - q.includes("what is") || - q.includes("define") || - q.includes("describe") - ) - return "EXPLAIN"; - - return "EXPLAIN"; -} - -async function generateRelatedTopics( - topic: string, - subjectCode: string -): Promise { - try { - const ai = new GoogleGenAI({ apiKey: getPrimaryKey() }); - - const prompt = `You are an academic advisor for engineering students. -Based on the topic "${topic}" for subject "${subjectCode}", suggest 5 related sub-topics a student should study next. -Return ONLY a JSON array of short topic names. No explanations, no markdown, no extra text. -Example: ["Topic 1", "Topic 2", "Topic 3", "Topic 4", "Topic 5"]`; - - const response = await ai.models.generateContent({ - model: "gemini-2.5-flash-lite", - contents: prompt, - }); - - const text = response.text?.trim() || "[]"; - - try { - const parsed = JSON.parse(text); - if (Array.isArray(parsed) && parsed.length > 0) return parsed.slice(0, 5); - } catch { - const match = text.match(/\[[\s\S]*?\]/); - if (match) { - try { - const extracted = JSON.parse(match[0]); - if (Array.isArray(extracted)) return extracted.slice(0, 5); - } catch {} - } - } - - return []; - } catch (error) { - console.error("Failed to generate related topics:", error); - return []; - } -} - -function buildChatPrompt( - question: string, - action: WorkspaceAction, - topic?: string, - moduleTitle?: string, - subjectCode?: string, - context?: string -): string { - const wordLimits: Record = { - EXPLAIN: "HARD LIMIT: 140 words. Count words. Rewrite if over 150.", - NOTES: "HARD LIMIT: 200 words. Count words. Rewrite if over 200.", - ANSWER_5: "HARD LIMIT: 200 words. Structured 5-mark answer.", - ANSWER_7: "HARD LIMIT: 220 words. Structured 7-mark answer.", - REVISION: "HARD LIMIT: 80 words. Key points only.", - MCQ: "Generate exactly 5 MCQs with 4 options each and answers.", - PYQ: "List only 5-7 previous year questions. No explanations.", - FORMULA: "HARD LIMIT: 60 words. Formula + brief variable explanation only.", - }; - - const formatMap: Record = { - EXPLAIN: `# [Topic]\n## Concept\n[explanation]\n## Example\n[one example]\n## Exam Tip\n[one tip]`, - NOTES: `# [Topic] - Notes\n## Overview\n## Key Concepts\n## Important Points\n## Applications`, - ANSWER_5: `# [Topic] - 5 Mark Answer\n## Introduction\n## Main Content\n## Conclusion`, - ANSWER_7: `# [Topic] - 7 Mark Answer\n## Introduction\n## Detailed Explanation\n## Applications\n## Conclusion`, - REVISION: `# [Topic] - Quick Revision\n## Key Points\n## Formula (if any)\n## Exam Focus`, - MCQ: `## Question N\n**Question?**\n- A) \n- B) \n- C) \n- D) \n**Answer:** X)\n**Explanation:** [brief]`, - PYQ: `# [Topic] - PYQs\n1. [Year] - [Question]\n2. ...`, - FORMULA: `# [Topic] - Formula\n$$formula$$\n**Variables:** ...\n**Use:** ...`, - }; - - return `You are Hyper AI, an expert engineering professor for RGPV B.Tech students. - -Subject: ${subjectCode || "Engineering"} -${topic ? `Topic: ${topic}` : ""} -${moduleTitle ? `Module: ${moduleTitle}` : ""} -Action: ${action} - -${context ? `Previous conversation:\n${context}\n` : ""} -User question: ${question} - -${wordLimits[action]} - -Use this markdown structure: -${formatMap[action]} - -Rules: -- Markdown only. Use # headings, - bullets, $$ for math blocks, $ for inline math. -- Never write introductions like "Welcome" or "Great question". -- Never say "I am an AI" or mention Gemini. -- No background history or classifications unless directly asked. -- Answer ONLY what was asked. Stop immediately after. -- COUNT your words. If over limit, delete sentences until under limit.`; -} - export async function POST(request: NextRequest) { try { const body = (await request.json()) as WorkspaceBody; @@ -172,53 +42,58 @@ export async function POST(request: NextRequest) { const question = body.question?.trim(); const messages = body.messages ?? []; - // Chat/question mode + // Follow-up question mode → followup-service (live, no cache) if (question) { - const ai = new GoogleGenAI({ apiKey: getPrimaryKey() }); - const startTime = Date.now(); - - const detectedAction = detectAction(question); - - const context = messages - .map((m) => `${m.role === "user" ? "User" : "Assistant"}: ${m.content}`) - .join("\n"); + const cachedExplanation = body.cachedExplanation?.trim(); + const topic = body.topic?.trim(); + const moduleTitle = body.module?.trim(); + + if (!subjectCode) { + return NextResponse.json( + { success: false, error: "Subject code is required." }, + { status: 400 } + ); + } + if (!cachedExplanation) { + return NextResponse.json( + { + success: false, + error: "Cached explanation is required for follow-up questions.", + }, + { status: 400 } + ); + } + if (!topic) { + return NextResponse.json( + { success: false, error: "Topic is required." }, + { status: 400 } + ); + } + if (!moduleTitle) { + return NextResponse.json( + { success: false, error: "Module is required." }, + { status: 400 } + ); + } - const prompt = buildChatPrompt( - question, - detectedAction, - undefined, - undefined, + const result = await generateFollowupAnswer({ subjectCode, - context - ); - - const response = await ai.models.generateContent({ - model: "gemini-2.5-flash-lite", - contents: prompt, - }); - - const answer = response.text?.trim() || "No answer generated."; - - trackMetric("GENERATION_SUCCESS", { - subjectCode: subjectCode || "unknown", - durationMs: Date.now() - startTime, - }); - - const relatedTopics = await generateRelatedTopics( + module: moduleTitle, + topic, + cachedExplanation, question, - subjectCode || "unknown" - ); + messages, + }); return NextResponse.json({ success: true, - answer, - relatedTopics, + answer: result.answer, cached: false, - action: detectedAction, + mode: "followup", }); } - // Workspace action mode + // Topic action mode → topic-service (cached) const action = body.action; if (!branch) { @@ -266,7 +141,7 @@ export async function POST(request: NextRequest) { answer: result.answer, cached: result.cached, action, - relatedTopics: [], + mode: "topic", }); } catch (error) { console.error("Workspace API Error:", error); @@ -292,6 +167,7 @@ export async function GET() { service: "Hyper AI Workspace", status: "healthy", supportedActions: ALLOWED_ACTIONS, + modes: ["topic", "followup"], }); } diff --git a/app/layout.tsx b/app/layout.tsx index 4ecf05a..f7a8222 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,5 +1,6 @@ import "./globals.css"; import type { Metadata } from "next"; +import { Toaster } from "sonner"; import Navbar from "@/components/navbar"; import Footer from "@/components/footer"; import { ThemeProvider } from "@/components/theme-provider"; @@ -108,7 +109,17 @@ export default function RootLayout({ }) { return ( - + +