monolayer Docs
monolayer Docs
Introduction

Getting Started

Install monolayer in your AWSAdd a GitHub App

User Guide

Platform

Supported FrameworksNext.jsReact RouterVite SPAsFastAPI
Deployment ArchitectureProcfile

Other

Feedbackmonolayer SDK Docsmonolayer.dev
Frameworks

Next.js

Next.js applications on monolayer

This section describes the integration of Next.js applications on monolayer, including supported platform capabilities.

Introduction to Next.js on monolayer

Next.js is a full-stack React framework that compiles and runs server-side and client-side code. When you deploy a Next.js application, monolayer automatically configures and provisions all required AWS resources without requiring manual infrastructure setup.

Next.js Platform Capabilities

Your Next.js application has native access to all built-in monolayer platform capabilities. These capabilities are fully managed and run securely within your AWS account.

You can use those capabilities using the monolayer SDK.

Managed PostgreSQL Database

monolayer automatically provisions a fully managed PostgreSQL database connected directly to your Next.js application.

  • Automatic provisioning. monolayer configures a PostgreSQL database instance in your cloud environment.
  • Connection injection. The system injects secure connection details into your application environment variables using the monolayer SDK.
  • Zero-ops database. You do not need to configure VPCs, security groups, or database credentials manually.

Asynchronous Background Tasks

You can process long-running background tasks asynchronously using the monolayer SDK.

  • Offloaded processing. You can offload heavy calculations or secondary workloads from your main web request thread.
  • Event-driven triggers. You can trigger background workflows in response to actions in your user interface.

Real-Time Communications

Your application can enable real-time, bi-directional web communications.

  • WebSocket connections. monolayer manages the real-time WebSocket connection infrastructure.
  • Direct SDK access. You can send and receive real-time messages directly using the monolayer SDK.

Scheduled Cron Jobs

You can define and schedule recurring jobs directly inside your Next.js codebase.

  • In-code scheduling. You can define execution intervals using standard cron syntax.
  • Managed trigger infrastructure. monolayer automatically configures AWS event rules to trigger your tasks on schedule in AWS ECS.

Object Storage with Buckets

monolayer provides fully managed, S3-backed object storage for storing files, images, and other media.

  • Simple SDK methods. Youcan define buckets wit hthe monolayer SDK and use the AWS SDK to upload and download objects.
  • Scoped IAM access. monolayer configures secure AWS Identity and Access Management (IAM) permissions so your application only has access to its own bucket.

Application Lifecycle Hooks

You can run custom logic during specific deployment phases of your Next.js application.

  • Boostrap. Run custom scripts when bootstrap an application environment.
  • Before deploy. You can run database migrations or prepare static data before the new version of your application goes live.
  • After deploy. You can warm up application caches or trigger external Slack notifications.

Supported Frameworks

Learn about the frontend and backend frameworks supported by monolayer

React Router

React Router applications on monolayer

On this page

Introduction to Next.js on monolayerNext.js Platform CapabilitiesManaged PostgreSQL DatabaseAsynchronous Background TasksReal-Time CommunicationsScheduled Cron JobsObject Storage with BucketsApplication Lifecycle Hooks