├── .husky └── pre-commit ├── .prettierignore ├── app ├── favicon.ico ├── share │ └── [id] │ │ ├── layout.tsx │ │ ├── page.tsx │ │ └── loading.tsx ├── robots.ts ├── sitemap.ts ├── auth │ ├── login │ │ └── page.tsx │ ├── sign-up │ │ └── page.tsx │ ├── forgot-password │ │ └── page.tsx │ ├── update-password │ │ └── page.tsx │ ├── confirm │ │ └── route.ts │ ├── sign-up-success │ │ └── page.tsx │ ├── callback │ │ └── route.ts │ └── error │ │ └── page.tsx ├── actions │ ├── delete-graph-action.ts │ ├── save-graph.ts │ ├── request-openlib-books.ts │ └── generate-graph.ts ├── layout.tsx ├── create │ ├── loading.tsx │ └── page.tsx ├── loading.tsx ├── dashboard │ ├── loading.tsx │ └── page.tsx ├── profile │ ├── [username] │ │ ├── loading.tsx │ │ └── page.tsx │ └── page.tsx ├── globals.css └── page.tsx ├── consts ├── github-repo-url.ts ├── open-library-search-url.ts ├── system-instruction.ts └── landing-page-content.ts ├── postcss.config.mjs ├── .prettierrc ├── types ├── delete-graph-dialog-props.ts ├── book.ts ├── generate-graph-response.ts ├── open-library-doc.ts ├── open-library-response.ts ├── save-graph-params.ts ├── edit-graph-dialog-props.ts └── mermaid-graph-props.ts ├── public └── jane-austen-inspired-illustrations_logo.png ├── utils ├── highlighter.ts ├── cn.ts ├── get-graph-file-name.ts ├── copy-mermaid-syntax.ts ├── copy-url.ts ├── download-svg.ts └── download-png.ts ├── next.config.ts ├── lib └── supabase │ ├── client.ts │ ├── server.ts │ └── middleware.ts ├── .gitignore ├── middleware.ts ├── components ├── LogoutButton.tsx ├── ui │ ├── sonner.tsx │ ├── label.tsx │ ├── textarea.tsx │ ├── avatar.tsx │ ├── input.tsx │ ├── switch.tsx │ ├── card.tsx │ ├── button.tsx │ ├── dropdown-menu.tsx │ └── dialog.tsx ├── UpdatePasswordForm.tsx ├── DeleteGraphDialog.tsx ├── EditGraphDialog.tsx ├── ForgotPasswordForm.tsx ├── LoginForm.tsx ├── SignUpForm.tsx ├── TopBar.tsx └── GraphCard.tsx ├── components.json ├── tsconfig.json ├── eslint.config.mjs ├── LICENSE ├── package.json └── README.md /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | npx lint-staged 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | build 2 | coverage 3 | -------------------------------------------------------------------------------- /app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/herol3oy/austen/HEAD/app/favicon.ico -------------------------------------------------------------------------------- /consts/github-repo-url.ts: -------------------------------------------------------------------------------- 1 | export const GITHUB_REPO_URL = 'https://api.github.com/repos/herol3oy/austen' 2 | -------------------------------------------------------------------------------- /consts/open-library-search-url.ts: -------------------------------------------------------------------------------- 1 | export const OPEN_LIBRARY_SEARCH_URL = 'https://openlibrary.org/search.json' 2 | -------------------------------------------------------------------------------- /postcss.config.mjs: -------------------------------------------------------------------------------- 1 | const config = { 2 | plugins: ['@tailwindcss/postcss'], 3 | } 4 | 5 | export default config 6 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "singleQuote": true, 4 | "plugins": ["prettier-plugin-tailwindcss"] 5 | } 6 | -------------------------------------------------------------------------------- /types/delete-graph-dialog-props.ts: -------------------------------------------------------------------------------- 1 | export interface DeleteGraphDialogProps { 2 | graphId: string 3 | graphTitle: string 4 | } 5 | -------------------------------------------------------------------------------- /types/book.ts: -------------------------------------------------------------------------------- 1 | export interface Book { 2 | key: string 3 | title: string 4 | author_name: string 5 | coverImageUrl?: string 6 | } 7 | -------------------------------------------------------------------------------- /public/jane-austen-inspired-illustrations_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/herol3oy/austen/HEAD/public/jane-austen-inspired-illustrations_logo.png -------------------------------------------------------------------------------- /types/generate-graph-response.ts: -------------------------------------------------------------------------------- 1 | export interface GenerateGraphResponse { 2 | mermaidSyntax: string 3 | emojis: string 4 | error?: string 5 | } 6 | -------------------------------------------------------------------------------- /types/open-library-doc.ts: -------------------------------------------------------------------------------- 1 | export interface OpenLibraryDoc { 2 | key: string 3 | title: string 4 | author_name: string[] 5 | cover_i?: number 6 | } 7 | -------------------------------------------------------------------------------- /types/open-library-response.ts: -------------------------------------------------------------------------------- 1 | import { OpenLibraryDoc } from './open-library-doc' 2 | 3 | export interface OpenLibraryResponse { 4 | docs: OpenLibraryDoc[] 5 | } 6 | -------------------------------------------------------------------------------- /types/save-graph-params.ts: -------------------------------------------------------------------------------- 1 | export interface SaveGraphParams { 2 | bookName: string 3 | authorName: string 4 | svgGraph: string 5 | mermaidSyntax: string 6 | emojis: string 7 | } 8 | -------------------------------------------------------------------------------- /utils/highlighter.ts: -------------------------------------------------------------------------------- 1 | import { createHighlighter } from 'shiki' 2 | 3 | export const highlighter = await createHighlighter({ 4 | themes: ['light-plus'], 5 | langs: ['mermaid'], 6 | }) 7 | -------------------------------------------------------------------------------- /app/share/[id]/layout.tsx: -------------------------------------------------------------------------------- 1 | export default function ShareLayout({ 2 | children, 3 | }: { 4 | children: React.ReactNode 5 | }) { 6 | return
23 | You've successfully signed up. Please check your email to 24 | confirm your account before signing in. 25 |
26 |23 | Code error: {params.error} 24 |
25 | ) : ( 26 |27 | An unspecified error occurred. 28 |
29 | )} 30 |57 | If you registered using your email and password, you will receive 58 | a password reset email. 59 |
60 |72 | by {graph.author_name || 'Unknown Author'} - Created{' '} 73 | {formatDistanceToNow(new Date(graph.created_at))} ago 74 |
75 |100 | Get started by creating your first character relationship graph. 101 |
102 |42 | View your profile information and manage all your graphs. 43 |
44 |55 | {username} 56 |
57 |{user.email}
61 |67 | {user.created_at 68 | ? formatDistanceToNow(new Date(user.created_at), { 69 | addSuffix: true, 70 | }) 71 | : 'Unknown'} 72 |
73 |79 | Your public profile can be accessed via this URL: 80 |
81 | 87 |102 | {userGraphs?.length || 0} 103 |
104 |110 | {publicGraphCount} 111 |
112 |118 | {privateGraphCount} 119 |
120 |59 | Public profile and graphs. 60 |
61 | {isOwnProfile && ( 62 | 66 | Manage your graphs (Dashboard) 67 | 68 | )} 69 |81 | {profile.username} 82 |
83 |89 | {profile.updated_at 90 | ? formatDistanceToNow(new Date(profile.updated_at), { 91 | addSuffix: true, 92 | }) 93 | : 'N/A'} 94 |
95 |110 | {allUserGraphs?.length || 0} 111 |
112 |118 | {publicGraphs?.length || 0} 119 |
120 |146 | Created {formatDistanceToNow(new Date(graph.created_at))}{' '} 147 | ago 148 |
149 |175 | {profile.username} hasn't made any of their graphs public 176 | yet. 177 |
178 |27 | Discover the connections between your favorite book characters through 28 | beautiful, AI-generated relationship diagrams. From Jane Austen to 29 | modern classics, explore literature like never before. 30 |
31 | 32 |74 | Everything you need to explore, analyze, and share literary 75 | character relationships 76 |
77 |92 | {feature.description} 93 |
94 |107 | Transform any book into a visual character relationship map in 108 | just three simple steps 109 |
110 |123 | {step.description} 124 |
125 |138 | Join a passionate group of book lovers uncovering fresh perspectives 139 | on their favorite stories 140 |
141 |188 | Start to type a title of a book to start your journey 189 |
190 | )} 191 | 192 | {isPending && ( 193 |194 | Generating graph for {selectedBook?.title}... 195 |
196 | )} 197 | 198 | {isPending && hasSubmitted && ( 199 |203 | Generating graph for {selectedBook?.title}... 204 |
205 |by {author}
234 |