Novel
Get NovelGuidesAPI Reference
Latest - 2025.1.0
Latest - 2025.1.0
  • Welcome to Novel
  • Start
  • Philosophy
  • Tech Stack
  • Releases
  • Versions
  • Changelog
  • License
  • Privacy
  • Warranty
  • Security Policy
  • Errors
    • Cannot start Novel
    • Unauthorized
    • Invalid Session
    • Validation Failed
  • Novel Server
    • Getting Started
    • Project Structure
    • With Novel Web
    • Configuration
    • Novel CLI
      • novel dev
      • novel start
      • novel new
    • Novel API
      • API Reference
    • Database
      • Caching
    • Migrations
    • Models
    • Routing
      • Route Directives
      • Middleware
      • Request Helpers
      • Schema
    • Sessions
    • Authentication
      • Passwords
      • Magic Links
      • Two-Factor Authentication
      • Forget Password
      • Email Verification
      • OAuth2 Support
    • Authorization
    • Users
    • Organizations
    • Subscriptions
    • Pricing
    • Validation
    • Mail
    • Notifications
    • API Keys
    • Events
    • Errors
    • Feature Flags
    • Uploading Files
    • Testing
    • Scheduled Cron Jobs
    • Background Jobs
    • Sockets
    • Logging
    • Telemetry
    • Deployment
  • Novel Web
    • Getting Started
    • Configuration
    • Project Structure
    • Routing
    • Layout and Styles
    • Authentication
    • Authorization
    • Requests
    • Request Files
    • Validation
    • Components
      • Button
      • Alerts
      • Copybox
      • Inline Notify
      • Input
      • Select
      • Toast
      • Toggle
      • Upload
      • Stripe Card
    • Hooks
      • useSession
      • useMobile
      • getSession
      • useFeature
      • useAuthorized
      • useNotification
      • useSocket
    • Localstorage
    • Errors
    • Internationalization (i18n)
    • Constants
    • Feature Flags
    • Testing
    • Telemetry
    • Deployment
    • Devtools (Alpha)
Powered by GitBook
On this page

Was this helpful?

  1. Novel Server

Project Structure

Last updated 5 months ago

Was this helpful?

Novel adopts a monorepo approach made available by NPM. Workspaces for pnpm and yarn are different to NPM as everything is hoisted to the root node_modules. This allows to reference code easily in imports.

You can inspect Novel Web's project structure here

Novel API follows a similar structure

App

This is where your application lives. All business features and logic reside here. You have full control over these folders

  • API - where your route handlers live. See Routing

  • Auth - where your auth handlers live. See Authentication

  • Errors - collection of errors for your app. See Errors

  • Events - collection of events that is emitted from your app. See Events

  • Features - a generic folder where you can collate features/services for your app.

  • Migrations - definition of your database. See Migrations

  • Models - a collection of automatically generated models based on your database. See Models

  • Schema - a generic folder where you can store jsonschema, zod, or typebox definitions.

  • Tasks - where your background tasks and cron jobs live. See Background Jobs

  • Templates - where email templates are compiled from. See Mail

You can make use of fastify conventions to add additional middlewares, plugins by exposing an index.jsin this directory.

Config

This is where configuration of your instance lives. These are non-environment variable dependent configuration.

See Configuration

Deploy

These are utility and Infrastructure-as-code scripts useful for deployment.

See Deployment

Packages

This is where Novel core code lives. It is not advisable to modify any packages that come from this folder. Warranty covers the directories that contain the Warranty.md file.

Telemetry is sent to Novel based on errors that stem from these packages. It helps us develop Novel and determine which features need work.

See Warranty

Storage

If you are not using Cloudflare or S3 for your file uploads, the default storage is the storage folder. Do not delete the .gitignore in this folder.

See Uploading Files

Test

Test helpers and suites live in this folder. You have full control on whether you want to collocate tests or group them in this folder.

See Testing

Web

This is a placeholder directory that you can install Novel web into, and Novel API will pick up and run for you. If you wish to keep these 2 codebases separate, it is allowed.

See With Novel Web

Changelog

  • 2024-12-20 - Initial Documentation

https://github.com/madewithnovel/next.js