This is a Next.js project bootstrapped with create-next-app, designed as a personal book writing assistant.
- Framework: Next.js (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- UI Components: ShadCN UI
- Linting: ESLint
- Generative AI: Genkit
- Local Development Bundler: Turbopack
First, install the dependencies:
npm installThen, run the development server:
npm run devOpen http://localhost:9003 (or the port specified in your package.json if different) with your browser to see the result.
You can start editing the page by modifying src/app/page.tsx. The page auto-updates as you edit the file.
- Book Structure: Left sidebar with a hierarchical tree view (chapters, subchapters). Supports creating, editing, reordering (drag & drop), and toggling visibility.
- Content Editor: Central content editor based on Suneditor-react replaced/enhanced with
react-draft-wysiwygor similar for custom image handling) with support for H1-H6 headings, text editing, and image uploads. - Table of Contents: Right sidebar displaying the TOC for the currently selected chapter, reflecting heading hierarchy (H1-H6). Supports toggling visibility and dynamic reordering.
- Export Options: Functionality to export the book in various formats (Word, HTML).
- AI Integration: Utilizes Genkit for AI-powered features.
- Primary color: Deep purple (
#673AB7) - Background color: Light gray (
#F5F5F5), subtly tinted with purple. - Accent color: Teal (
#009688) - Body text font: 'Literata' (serif)
- Headline font: 'Belleza' (sans-serif)
- Icons: Simple, outlined icons (using Lucide React).
The theme is configured in src/app/globals.css using HSL CSS variables for ShadCN UI components.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
This project includes third-party open-source packages. See third_party_licenses.md for details.
This project uses sharp, which bundles libvips licensed under LGPL-3.0-or-later. See third_party_licenses.md for details.