Skip to content

A modern book writing platform - full-stack monorepo with Next.js frontend and Express API backend

Notifications You must be signed in to change notification settings

ehmasuk/bookora

Repository files navigation

Bookora Monorepo

Bookora Turborepo Node.js pnpm

A modern book writing platform built with a monorepo architecture. Bookora enables authors to write, organize, and manage their books with an intuitive interface, rich text editing, and powerful organizational features.

Live DemoDocumentationContributing

📋 Table of Contents

🎯 Overview

Bookora is a full-stack web application that provides a comprehensive platform for authors to create, organize, and manage their books. It features automatic saving, drag-and-drop chapter organization, rich text editing, and support for both manual and AI-assisted book creation.

Key Features

  • Modern UI/UX - Clean, intuitive interface built with Next.js and Radix UI
  • 📝 Rich Text Editor - Powerful writing experience with Tiptap
  • 🔐 Authentication - Secure user registration and login
  • 📚 Book Management - Create, edit, delete, and organize books
  • 📖 Chapter Organization - Drag-and-drop interface for managing chapters and sections
  • 🌍 Internationalization - Multi-language support (English, Spanish, German)
  • 🎨 Dark Mode - Comfortable reading and writing in any lighting
  • 📱 Responsive Design - Seamless experience across all devices
  • 🤖 AI-Assisted Creation - Generate book structures with AI assistance
  • ☁️ Auto-save - Automatic saving while you write

🏗️ Architecture

This monorepo uses Turborepo to manage a multi-package workspace with the following structure:

bookora-mono-repo/
├── apps/
│   ├── api/          # Express.js REST API backend
│   └── client/       # Next.js frontend application
├── packages/
│   ├── ui/           # Shared UI component library
│   ├── eslint-config/      # Shared ESLint configuration
│   └── typescript-config/  # Shared TypeScript configuration
└── ...

🚀 Getting Started

Prerequisites

  • Node.js >= 20.x
  • pnpm >= 10.4.1 (or use the built-in package manager)
  • MongoDB (for the API backend)

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/bookora-mono-repo.git
    cd bookora-mono-repo
  2. Install dependencies:

    pnpm install
  3. Set up environment variables:

    • API: Copy apps/api/example.env to apps/api/.env and fill in the required values
    • Client: Copy apps/client/example.env to apps/client/.env.local and configure

    See individual app READMEs for detailed environment variable documentation.

  4. Start the development servers:

    pnpm dev

    This will start both the API server (default: http://localhost:8080) and the client application (default: http://localhost:3000).

📁 Project Structure

Apps

  • apps/api - Express.js REST API backend

    • MongoDB integration
    • JWT authentication
    • Swagger documentation
    • Book, Chapter, Section, and User management
  • apps/client - Next.js frontend application

    • Server-side rendering
    • NextAuth.js integration
    • Rich text editor with Tiptap
    • Multi-language support

Packages

  • packages/ui - Shared UI component library

    • Radix UI primitives
    • Tailwind CSS styling
    • Reusable React components
  • packages/eslint-config - Shared ESLint configuration

    • Base configuration
    • Next.js specific rules
    • React internal rules
  • packages/typescript-config - Shared TypeScript configuration

    • Base configuration
    • Next.js configuration
    • React library configuration

📜 Available Scripts

Run these commands from the root of the monorepo:

Command Description
pnpm dev Start all apps in development mode
pnpm build Build all apps and packages
pnpm lint Lint all apps and packages
pnpm format Format code with Prettier
pnpm check-types Type-check all TypeScript code

To run commands for a specific app or package, use Turborepo's filtering:

pnpm --filter api dev      # Run dev only for API
pnpm --filter client dev   # Run dev only for client
pnpm --filter ui build     # Build only UI package

🛠️ Technology Stack

Frontend

Backend

DevOps & Tooling

  • Monorepo: Turborepo
  • Package Manager: pnpm
  • Code Quality: ESLint, Prettier, TypeScript
  • Deployment: Vercel

📚 Documentation

For API endpoint documentation, visit the Swagger UI when the API is running:

  • Local: http://localhost:8080/api-docs
  • Production: https://bookora.vercel.app/api/api-docs

💻 Development

Adding a New Package

  1. Create a new directory under packages/
  2. Initialize package.json with the workspace protocol
  3. Update pnpm-workspace.yaml if needed (usually automatic)
  4. Add the package to turbo.json tasks if it has build steps

Adding a New App

  1. Create a new directory under apps/
  2. Initialize the app with appropriate framework
  3. Configure it to use shared packages (@workspace/ui, @workspace/eslint-config, etc.)
  4. Add relevant tasks to turbo.json

Code Style

  • Formatting: We use Prettier with default configuration
  • Linting: ESLint with shared configurations
  • Type Checking: TypeScript strict mode enabled
  • Commits: Follow conventional commit messages

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Make your changes
  4. Run tests and linting (pnpm lint, pnpm check-types)
  5. Commit your changes (git commit -m 'Add some AmazingFeature')
  6. Push to the branch (git push origin feature/AmazingFeature)
  7. Open a Pull Request

Please ensure your code follows the existing style and includes appropriate tests.

📄 License

Distributed under the MIT License. See LICENSE for more information.


Built with ❤️ using Turborepo

Report BugRequest FeatureDocumentation

About

A modern book writing platform - full-stack monorepo with Next.js frontend and Express API backend

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published