1
1
'use client' ;
2
2
3
- import Link from 'next/link' ;
4
3
import { useRouter } from 'next/navigation' ;
5
-
4
+ import Link from 'next/link' ;
6
5
import { Button } from '@/components/ui/button' ;
7
6
import { ArrowLeft } from 'lucide-react' ;
7
+ import {
8
+ Accordion ,
9
+ AccordionContent ,
10
+ AccordionItem ,
11
+ AccordionTrigger ,
12
+ } from "@/components/ui/accordion"
8
13
9
14
const DocsPage = ( ) => {
10
15
const router = useRouter ( ) ;
@@ -16,94 +21,102 @@ const DocsPage = () => {
16
21
onClick = { ( ) => router . back ( ) }
17
22
className = "mb-8 flex items-center text-white rounded-full bg-blue-600 hover:bg-blue-700 dark:bg-blue-500 dark:hover:bg-blue-600 transition-colors duration-300"
18
23
>
19
- < ArrowLeft className = "h-4 w-4" />
24
+ < ArrowLeft className = "h-4 w-4 mr-2 " />
20
25
Go back
21
26
</ Button >
22
27
23
28
< h1 className = "text-3xl font-bold mb-6" > RepoTree Documentation</ h1 >
24
29
25
30
< div className = "p-6 space-y-4 transition-colors duration-300" >
26
- < h2 className = "text-xl font-semibold" > Introduction</ h2 >
27
- < p >
28
- RepoTree is a powerful tool that generates a clean ASCII
29
- representation of a GitHub repository structure, perfect for
30
- documentation and sharing.
31
- </ p >
31
+ < section id = "introduction" className = "mb-8" >
32
+ < h2 className = "text-2xl font-semibold mb-4" > Introduction</ h2 >
33
+ < p >
34
+ RepoTree is a powerful tool that generates a clean ASCII
35
+ representation of a GitHub or GitLab repository structure, perfect for
36
+ documentation and sharing.
37
+ </ p >
38
+ </ section >
39
+
40
+ < section id = "features" className = "mb-8" >
41
+ < h2 className = "text-2xl font-semibold mb-4" > Features</ h2 >
42
+ < Accordion type = "single" collapsible className = "w-full" >
43
+ < AccordionItem value = "item-1" >
44
+ < AccordionTrigger > Core Features</ AccordionTrigger >
45
+ < AccordionContent >
46
+ < ul className = "list-disc pl-6 space-y-2" >
47
+ < li > < strong > Download in Different Formats:</ strong > Users can download the directory structure in formats like README.md, .txt, .json, or .html.</ li >
48
+ < li > < strong > Syntax Highlighting:</ strong > Enhances readability using prism-react-renderer for syntax highlighting.</ li >
49
+ < li > < strong > Real-time Search Bar:</ strong > Quickly filter and highlight specific files or directories within the generated structure.</ li >
50
+ < li > < strong > AI Feedback Analysis:</ strong > Provides feedback and suggestions for your repository structure based on AI analysis.</ li >
51
+ < li > < strong > Repository Analysis Graphs:</ strong > Visualizes repository data, such as file type distribution and languages breakdown, with interactive graphs.</ li >
52
+ </ ul >
53
+ </ AccordionContent >
54
+ </ AccordionItem >
55
+ < AccordionItem value = "item-2" >
56
+ < AccordionTrigger > User Experience</ AccordionTrigger >
57
+ < AccordionContent >
58
+ < ul className = "list-disc pl-6 space-y-2" >
59
+ < li > < strong > Interactive Tree View:</ strong > Allows expansion or collapse of folders for better navigation.</ li >
60
+ < li > < strong > Clipboard Copy Notification:</ strong > Provides a toast notification when the directory structure is copied to the clipboard.</ li >
61
+ < li > < strong > View Mode Toggle:</ strong > Switch between ASCII view and Interactive view for an enhanced user experience.</ li >
62
+ </ ul >
63
+ </ AccordionContent >
64
+ </ AccordionItem >
65
+ < AccordionItem value = "item-3" >
66
+ < AccordionTrigger > Technical Features</ AccordionTrigger >
67
+ < AccordionContent >
68
+ < ul className = "list-disc pl-6 space-y-2" >
69
+ < li > < strong > Persistent State with LocalStorage:</ strong > Saves the last fetched repository URL, maintaining input between sessions.</ li >
70
+ < li > < strong > Server-Side Fetching with Next.js:</ strong > Optimized server-side fetching improves performance and SEO.</ li >
71
+ < li > < strong > Error Handling and Validation:</ strong > Validates GitHub URLs and shows error messages for invalid inputs.</ li >
72
+ </ ul >
73
+ </ AccordionContent >
74
+ </ AccordionItem >
75
+ </ Accordion >
76
+ </ section >
77
+
78
+ < section id = "tech-stack" className = "mb-8" >
79
+ < h2 className = "text-2xl font-semibold mb-4" > Tech Stack</ h2 >
80
+ < ul className = "list-disc pl-6 space-y-2" >
81
+ < li > < strong > Next.js:</ strong > React framework for server-side rendering and routing</ li >
82
+ < li > < strong > React:</ strong > JavaScript library for building user interfaces</ li >
83
+ < li > < strong > TypeScript:</ strong > Typed superset of JavaScript for improved developer experience</ li >
84
+ < li > < strong > Tailwind CSS:</ strong > Utility-first CSS framework for rapid UI development</ li >
85
+ < li > < strong > Shadcn UI:</ strong > Component library for consistent and customizable UI elements</ li >
86
+ < li > < strong > Octokit:</ strong > GitHub API client for fetching repository data</ li >
87
+ < li > < strong > Recharts:</ strong > Composable charting library for data visualization</ li >
88
+ < li > < strong > Axios:</ strong > Promise-based HTTP client for making requests</ li >
89
+ < li > < strong > Framer Motion:</ strong > Animation library for React</ li >
90
+ < li > < strong > Lucide:</ strong > A set of open-source icons for React</ li >
91
+ < li > < strong > Radix UI:</ strong > Low-level UI primitives for building accessible, high-quality design systems</ li >
92
+ < li > < strong > File Saver:</ strong > Library to save files on the client-side</ li >
93
+ < li > < strong > Mini SVG Data URI:</ strong > Utility for converting SVGs to data URIs</ li >
94
+ </ ul >
95
+ </ section >
32
96
33
- < h2 className = "text-xl font-semibold" > Features</ h2 >
34
- < ul className = "list-disc pl-6 space-y-2" >
35
- < li >
36
- < strong > Download in Different Formats:</ strong > Users can download
37
- the directory structure in formats like README.md, .txt, .json, or
38
- .html.
39
- </ li >
40
- < li >
41
- < strong > Syntax Highlighting:</ strong > Enhances readability using
42
- prism-react-renderer for syntax highlighting.
43
- </ li >
44
- < li >
45
- < strong > Real-time Search Bar:</ strong > Quickly filter and
46
- highlight specific files or directories within the generated
47
- structure.
48
- </ li >
49
- < li >
50
- < strong > Persistent State with LocalStorage:</ strong > Saves the
51
- last fetched repository URL, maintaining input between sessions.
52
- </ li >
53
- < li >
54
- < strong > Interactive Tree View:</ strong > Allows expansion or
55
- collapse of folders for better navigation.
56
- </ li >
57
- < li >
58
- < strong > Clipboard Copy Notification:</ strong > Provides a toast
59
- notification when the directory structure is copied to the
60
- clipboard.
61
- </ li >
62
- < li >
63
- < strong > View Mode Toggle:</ strong > Switch between ASCII view and
64
- Interactive view for an enhanced user experience.
65
- </ li >
66
- < li >
67
- < strong > Clear Input Functionality:</ strong > Includes a button to
68
- clear the input field, improving usability.
69
- </ li >
70
- < li >
71
- < strong > Loading State Animation:</ strong > Displays a spinner
72
- during data fetching for a smoother experience.
73
- </ li >
74
- < li >
75
- < strong > Error Handling and Validation:</ strong > Validates GitHub
76
- URLs and shows error messages for invalid inputs.
77
- </ li >
78
- < li >
79
- < strong > Expandable ASCII Tree:</ strong > Toggle the expansion of
80
- the ASCII tree to view a complete or limited structure.
81
- </ li >
82
- < li >
83
- < strong > Filtered Structure Generation:</ strong > Generates a
84
- structure based on search terms for quick file/folder location.
85
- </ li >
86
- < li >
87
- < strong > Enhanced UI with Tailwind CSS:</ strong > Provides a
88
- responsive and visually appealing interface using Tailwind CSS.
89
- </ li >
90
- < li >
91
- < strong > Server-Side Fetching with Next.js:</ strong > Optimized
92
- server-side fetching improves performance and SEO.
93
- </ li >
94
- < li >
95
- < strong > Save Last Fetched URL:</ strong > Automatically saves and
96
- repopulates the last fetched URL for convenience.
97
- </ li >
98
- </ ul >
97
+ < section id = "demo" className = "mb-8" >
98
+ < h2 className = "text-2xl font-semibold mb-4" > Demo</ h2 >
99
+ < div className = "relative w-full overflow-hidden rounded-lg" style = { { paddingTop : '56.25%' } } >
100
+ < iframe
101
+ className = "absolute top-0 left-0 w-full h-full"
102
+ src = "https://www.youtube.com/embed/49qcrWgHT9M?si=2BnYxyBXXmh1EQd5"
103
+ title = "YouTube video player"
104
+ frameBorder = "0"
105
+ allow = "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
106
+ referrerPolicy = "strict-origin-when-cross-origin"
107
+ allowFullScreen
108
+ > </ iframe >
109
+ </ div >
110
+ </ section >
99
111
100
- < h2 className = "text-xl font-semibold mt-8" > Future Features</ h2 >
101
- < ul className = "list-disc pl-6 space-y-2" >
102
- < li >
103
- < strong > Fetching User Branches:</ strong > Allows users to select a
104
- specific branch instead of defaulting to the main branch.
105
- </ li >
106
- </ ul >
112
+ < section id = "future-features" className = "mb-8" >
113
+ < h2 className = "text-2xl font-semibold mb-4" > Future Features</ h2 >
114
+ < ul className = "list-disc pl-6 space-y-2" >
115
+ < li > Integration with Bitbucket repositories</ li >
116
+ < li > Advanced filtering options for large repositories</ li >
117
+ < li > Customizable ASCII art styles for tree representation</ li >
118
+ </ ul >
119
+ </ section >
107
120
108
121
< div className = "mt-8" >
109
122
< Link
0 commit comments