diff --git a/next.config.mjs b/next.config.mjs
index 4678774..6519f7a 100644
--- a/next.config.mjs
+++ b/next.config.mjs
@@ -1,4 +1,6 @@
/** @type {import('next').NextConfig} */
-const nextConfig = {};
+const nextConfig = {
+ transpilePackages: ['next-mdx-remote'],
+}
-export default nextConfig;
+export default nextConfig
diff --git a/package.json b/package.json
index bb7e7ec..8848ef9 100644
--- a/package.json
+++ b/package.json
@@ -16,12 +16,17 @@
"@google/generative-ai": "^0.21.0",
"@langchain/core": "^0.3.26",
"axios": "^1.7.9",
+ "class-variance-authority": "^0.7.1",
+ "clsx": "^2.1.1",
"dotenv": "^16.4.7",
"langchain": "^0.3.7",
+ "lucide-react": "^0.469.0",
"next": "15.1.0",
+ "next-mdx-remote": "^5.0.0",
"pg": "^8.13.1",
"react": "^19.0.0",
- "react-dom": "^19.0.0"
+ "react-dom": "^19.0.0",
+ "tailwind-merge": "^2.6.0"
},
"devDependencies": {
"@babel/cli": "^7.26.4",
diff --git a/src/agent/structured-output/schema-factory.ts b/src/agent/structured-output/schema-factory.ts
index 84040f3..c86d93c 100644
--- a/src/agent/structured-output/schema-factory.ts
+++ b/src/agent/structured-output/schema-factory.ts
@@ -49,36 +49,10 @@ File Schema Example Output:
summary: z
.string()
.describe(
- 'Summary of the file, its main purpose, and its role in the project. Include Markdown links to important code blocks within this file using the format `[{Description of Code Block}]({Full github url of the file including the start line with optional ending line}#L{startLine}-L{endLine})` where applicable.'
- ),
- relevantCodeBlocks: z
- .array(
- z.object({
- name: z
- .string()
- .describe(
- 'Name or identifier of the code block (e.g., function name, class name, key variable).'
- ),
- description: z
- .string()
- .describe(
- 'Description of the code block and its significance within the file.'
- ),
- startLine: z
- .number()
- .describe(
- 'Starting line number of the code block.'
- ),
- endLine: z
- .number()
- .describe(
- 'Ending line number of the code block.'
- ),
- })
- )
- .optional()
- .describe(
- 'List of important code blocks (functions, classes, key sections) within the file, with line numbers.'
+ 'Summary of the file talking about its main purpose, and its role in the project.\n'
+ + 'Include Markdown links to important code blocks within this file using the format\n`'
+ + '[{Description of Code Block}]({Full github url of the file including the start line with optional ending line}#L{startLine}-L{endLine})` where applicable.\n'
+ + 'Also you should not return more than 2-3 paragraphs of summary.'
),
})
diff --git a/src/app/[ownerSlug]/[repoSlug]/loading.tsx b/src/app/[ownerSlug]/[repoSlug]/loading.tsx
new file mode 100644
index 0000000..06820fe
--- /dev/null
+++ b/src/app/[ownerSlug]/[repoSlug]/loading.tsx
@@ -0,0 +1,16 @@
+import { Skeleton } from '@/components/ui/skeleton'
+
+export default function Loading() {
+ return (
+
+
+
+
+
+
+
+
+
+
+ )
+}
diff --git a/src/app/[ownerSlug]/[repoSlug]/page.tsx b/src/app/[ownerSlug]/[repoSlug]/page.tsx
new file mode 100644
index 0000000..509604c
--- /dev/null
+++ b/src/app/[ownerSlug]/[repoSlug]/page.tsx
@@ -0,0 +1,60 @@
+import { JSX, Suspense } from 'react'
+import { RepoCard } from '@/components/RepoCard'
+import Loading from '@/app/[ownerSlug]/[repoSlug]/loading'
+import { FetchRepoService, FullRepository } from '@/db/get-db'
+import { MarkdownContent } from '@/components/MarkdownContent'
+import { notFound } from 'next/navigation'
+
+interface PageProps {
+ params: {
+ ownerSlug: string
+ repoSlug: string
+ }
+}
+
+interface RepoPageProps {
+ ownerSlug: string
+ repoSlug: string
+}
+
+const placeholder = `
+# parser.cpp\n\n
+
+- Reference \`parser/parser.cpp\`\n
+
+This file defines the \`Parser\` class, responsible for transforming a stream of tokens into an Abstract Syntax Tree (AST). The parser utilizes a queue of \`TokenPtr\` objects (\`tok_queue_\`) and provides methods for consuming tokens (\`Eat\`), peeking at the next token (\`Peek\`), and expecting specific token types (\`ExpectedTokenType\`). The core functionality resides in \`ProduceAST\` which drives the parsing process by repeatedly calling \`ParseStatement\` until an end-of-line token is encountered. Different parsing methods are present to handle various expressions such as \`ParsePrimaryExpression\`, \`ParseAdditionExpression\`, \`ParseMultiplicationExpression\`, and \`ParseComparisonExpression\`. It supports variable declarations and assignments, and also handles whitespace using \`ParseWhitespaceExpression\`. The parser uses recursive descent parsing strategy with helper functions for each type of expression. It throws \`UnexpectedTokenParsedException\` when unexpected tokens are encountered. The \`Parser\` class depends on the \`TokenPtr\` and the \`ast.hpp\` module for the AST node definitions. Key methods include: [\`Eat\`](https://github.com/daeisbae/AParser/blob/9bbea84efa9f8eeed5576f53e4a65ca87a7f023c/parser/parser.cpp#L11-L15) for consuming tokens, [\`Peek\`](https://github.com/daeisbae/AParser/blob/9bbea84efa9f8eeed5576f53e4a65ca87a7f023c/parser/parser.cpp#L17-L17) for peeking at tokens, [\`ExpectedTokenType\`](https://github.com/daeisbae/AParser/blob/9bbea84efa9f8eeed5576f53e4a65ca87a7f023c/parser/parser.cpp#L19-L39) for validating token types, [\`ProduceAST\`](https://github.com/daeisbae/AParser/blob/9bbea84efa9f8eeed5576f53e4a65ca87a7f023c/parser/parser.cpp#L41-L53) for generating the AST, [\`ParseStatement\`](https://github.com/daeisbae/AParser/blob/9bbea84efa9f8eeed5576f53e4a65ca87a7f023c/parser/parser.cpp#L55-L62) for parsing statements, and [\`ParseExpression\`](https://github.com/daeisbae/AParser/blob/9bbea84efa9f8eeed5576f53e4a65ca87a7f023c/parser/parser.cpp#L64-L66) for parsing expressions. The file also handles different types of expressions using separate parsing methods like [\`ParsePrimaryExpression\`](https://github.com/daeisbae/AParser/blob/9bbea84efa9f8eeed5576f53e4a65ca87a7f023c/parser/parser.cpp#L68-L145), [\`ParseAdditionExpression\`](https://github.com/daeisbae/AParser/blob/9bbea84efa9f8eeed5576f53e4a65ca87a7f023c/parser/parser.cpp#L147-L165), [\`ParseMultiplicationExpression\`](https://github.com/daeisbae/AParser/blob/9bbea84efa9f8eeed5576f53e4a65ca87a7f023c/parser/parser.cpp#L167-L185), [\`ParseWhitespaceExpression\`](https://github.com/daeisbae/AParser/blob/9bbea84efa9f8eeed5576f53e4a65ca87a7f023c/parser/parser.cpp#L187-L192), [\`ParseIdentifierDeclarationExpression\`](https://github.com/daeisbae/AParser/blob/9bbea84efa9f8eeed5576f53e4a65ca87a7f023c/parser/parser.cpp#L194-L217), [\`ParseIdentifierAssignmentExpression\`](https://github.com/daeisbae/AParser/blob/9bbea84efa9f8eeed5576f53e4a65ca87a7f023c/parser/parser.cpp#L219-L243), and [\`ParseComparisonExpression\`](https://github.com/daeisbae/AParser/blob/9bbea84efa9f8eeed5576f53e4a65ca87a7f023c/parser/parser.cpp#L245-L263).
+`
+
+async function RepoPage({
+ ownerSlug,
+ repoSlug,
+}: RepoPageProps): Promise {
+ const fetchRepoService = new FetchRepoService()
+ const repoDetails: FullRepository | null =
+ await fetchRepoService.getFullRepositoryTree(ownerSlug, repoSlug)
+
+ if (!repoDetails) {
+ notFound()
+ }
+
+ return (
+