How kardinaljacob-cmd/ranobe_translation works
1. This repository is a Next.js App Router project. The architecture is centered on file-based routing under app/, with a small amount of local content stored in the repo under content/.
2. The main application boundary is the web frontend. There is no separate backend service, database, or API layer visible in the tree; page data appears to come from the filesystem content rather than an external service.
3. Routing is hierarchical and content-shaped:
- app/page.tsx is the site entry or landing page.
- app/[book]/page.tsx represents a book-level index.
- app/[book]/[volume]/[chapter]/page.tsx represents the deepest chapter reader view.
This strongly suggests the URL structure mirrors the book → volume → chapter content model.
4. The content/ranobe-1/tom-1/glava-1.md file shows the content source is markdown organized by book/volume/chapter folders. That folder structure is likely the canonical source for rendered pages, and the app routes probably resolve params into files in content/.
5. app/ClientChapterView.tsx is the only clearly named client component in the tree. That implies a server/client split where the chapter page may fetch or assemble content on the server, then hand interactive reading behavior to a client-side viewer component.
6. app/layout.tsx and app/globals.css define the shared shell and global presentation layer. layout.tsx is the top-level composition boundary for all routes, while globals.css provides the application-wide styling foundation.
7. public/ is the static asset boundary for images, icons, and other browser-served files. Anything placed there bypasses the route/content model and is available directly to the frontend.
8. next.config.ts, tsconfig.json, eslint.config.mjs, and postcss.config.mjs show a standard Next.js toolchain with TypeScript, ESLint, and PostCSS. These are supporting infrastructure pieces rather than runtime subsystems, but they define how the app is built and validated.
9. The likely data flow is:
filesystem markdown content → route resolution via dynamic segments → server-rendered page assembly → optional client chapter viewer → browser display.
The important architectural boundary is between immutable content files and the rendered reader UI.
10. Because the content lives inside the repo, deployment is likely stateless and CDN-friendly. The application can be deployed as a standard Next.js site, with content packaged into the build rather than fetched from an external CMS.
11. For an architecture diagram, the key nodes are:
- Browser
- Next.js App Router frontend
- Dynamic route handlers for book/volume/chapter
- Local markdown content repository
- Client-side chapter viewer
- Static assets in public/
12. The most important design characteristic is that this is a content-driven reader app, not a conventional CRUD system. Navigation and rendering are organized around nested literary hierarchy, with the filesystem acting as the primary source of truth.
Main entry points: app App Router · [chapter]/page.tsx Chapter reader · content Markdown repo · [book]/page.tsx Book index
Components 17
Runtime
Next.js app routes and UI rendering
- App Router · Top-level route composition and page rendering
app - Landing page · Site entry route
app/page.tsx - Book index · Book-level route driven by a dynamic segment
app/[book]/page.tsx - Chapter reader · Deepest chapter route that renders chapter content
app/[book]/[volume]/[chapter]/page.tsx - Shell · Shared root layout for all routes
app/layout.tsx - Global styles · Application-wide CSS foundation
app/globals.css - Chapter view · Client-side chapter interaction and display behavior
app/ClientChapterView.tsx
Content
Filesystem-authored markdown source for readers
- Markdown repo · Local filesystem content organized by literary hierarchy
content - Ranobe 1 · Book-level content folder
content/ranobe-1 - Tom 1 · Volume-level content folder
content/ranobe-1/tom-1 - Chapter 1 · Representative chapter source file
content/ranobe-1/tom-1/glava-1.md
Tooling
Build, lint, and compiler configuration
- Next config · Framework configuration
next.config.ts - TypeScript config · TypeScript project configuration
tsconfig.json - Lint config · ESLint rules and validation setup
eslint.config.mjs - PostCSS config · CSS processing pipeline configuration
postcss.config.mjs
Other components
- Browser · User-facing reader and navigation surface
- Public assets · Browser-served files outside the route/content model
public
Connections 17
- Browser → App Router: requests UI · The browser enters the Next.js frontend
- App Router → Shell: wraps · Root layout composes the application shell
- Shell → Global styles: applies · Shared styling is loaded at the root
- App Router → Landing page: routes to · Landing page is the site entry
- App Router → Book index: routes to · Dynamic book index route
- App Router → Chapter reader: routes to · Deep reader route for a chapter
- Chapter reader → Chapter view: hydrates · Server-rendered chapter view can hand off interaction to the client component
- Book index → Markdown repo: reads metadata · Book pages are shaped by filesystem content
- Chapter reader → Markdown repo: loads markdown · Chapter route resolves params into local content
- Markdown repo → Ranobe 1: contains · Repository content is organized by book
- Ranobe 1 → Tom 1: contains · Book folder contains volumes
- Tom 1 → Chapter 1: contains · Volume folder contains chapter markdown
- App Router → Public assets: serves · Static files are exposed directly to the browser
- App Router → Next config: built with · Framework behavior is configured at build time
- App Router → TypeScript config: typed by · TypeScript governs the app codebase
- App Router → Lint config: validated by · Linting supports code quality
- App Router → PostCSS config: styled by · PostCSS supports the styling pipeline