Webnovel Publishing System

Features

Novel & Chapter Management

Authors can create novels with metadata such as title, description, genres, tags, and cover images. Novels are organized into chapters with read tracking and analytics. Authors manage their works through an author dashboard and can create, edit, and reorder chapters. The platform supports rich text for chapter content and provides a dedicated chapter reader with a comfortable reading experience.

User Authentication & Profiles

The application uses JWT-based authentication. Users can register, log in, and recover accounts via forgot-password and reset-password flows. Profile pages allow users to view and manage their account. Role-based access controls distinguish between regular users, authors, and administrators.

Personal Library & Reading Progress

Authenticated users can save novels to a personal library and track reading progress. The backend persists library entries and progress, so users can resume reading across sessions. Notifications inform library subscribers when new chapters are published for novels they follow, with real-time delivery over WebSockets where available.

Search & Discovery

Advanced search is powered by Elasticsearch. Novels are indexed and kept in sync with MongoDB via a sync service and scheduled verification. Users can search and filter by criteria such as genre and popularity. Recommendation endpoints offer “because you read” suggestions (similar novels), “popular in genre,” and “from authors you follow” to help readers discover new content.

Comments & Engagement

Readers can comment on novels or chapters. The API supports creating, listing, and managing comments. Admin endpoints allow moderators to review and manage comments across the platform.

Notifications

A notification system supports in-app alerts (e.g. new chapter published). Notifications are stored in MongoDB, and the backend can push them to connected clients via Socket.IO. Users can mark notifications as read and manage their notification list.

Administration

An admin area provides dashboards and management for users, novels, and comments. Access is restricted to users with an admin role. The frontend uses an admin layout and dedicated pages for users, novels, and comment moderation.

Content Import

The backend supports EPUB import through dedicated validation, upload middleware, and utilities. This allows bulk or single import of existing works in EPUB format.

API & Documentation

The backend exposes a RESTful API with consistent status and error handling. Interactive API documentation is available via Swagger UI at /api/docs, with route definitions described in YAML. Health and test endpoints support monitoring and integration checks.

Legal & Support Pages

The application includes static or semi-static pages for FAQ, terms of service, privacy policy, guidelines, and contact, giving readers and authors clear information and a way to get in touch.

Technical Stack

Frontend

The client is a single-page application built with React 19 and Vite. Routing is handled by React Router; state is managed with context providers for authentication and language. The UI is styled with Tailwind CSS (v4) and uses components such as Lucide React and React Icons. Rich text editing and display are implemented with Quill (via react-quill-new and related packages). HTTP requests to the backend use Axios. The frontend runs as an ES module and supports development, build, and preview scripts.

Backend

The server runs on Node.js and Express. Application setup is split across config modules: Express is configured with security (Helmet), CORS, body parsing limits, compression, rate limiting, request timeouts, and MongoDB sanitization. Environment variables are validated at startup. The API is mounted under /api and includes global error handling and a catch-all not-found handler. Swagger is set up from a central docs module. Authentication uses JWT (jsonwebtoken) and password hashing (bcryptjs). File uploads are handled with Multer; validation is done with express-validator. Logging uses Winston. Real-time features use Socket.IO. Email can be sent via Nodemailer. EPUB processing uses jszip and jsdom. The backend is organized into API controllers, services, models, middleware, and shared utilities.

Database

MongoDB is the primary data store, accessed through Mongoose. Connection configuration includes timeouts, connection pooling, and automatic reconnection with retry limits. Models exist for users, novels, chapters, comments, library entries, and notifications. Indexes and schema design support queries for novels, chapters, library, and notifications.

Search

Elasticsearch is used for full-text and filtered search over novels. The backend uses the official Elasticsearch client. A sync service keeps the search index aligned with MongoDB; a script is provided for manual sync, and the application runs periodic verification. When Elasticsearch is disabled or unavailable, the app continues without search features.

Security & Reliability

The backend applies Helmet for HTTP headers, rate limiting on the API, request timeouts, and input sanitization. Validation middleware is used on auth, novel, chapter, library, and comment routes. Ownership middleware ensures users can only modify their own resources where applicable. Constants centralize error messages, HTTP status codes, and configuration (e.g. file sizes, timeouts, rate limits).