const pgDb = new PostgresDatabase("app-db");const credentials = process.env[pgDb.connectionStringEnvVar];const redis = new Redis("counters")const redisCredentials = process.env[envVarName];const documents = new Bucket("documents");const result = paginateListObjectsV2( { client: s3Client }, { Bucket: documents.name });
const pgDb = new PostgresDatabase("app-db");const credentials = process.env[pgDb.connectionStringEnvVar];const redis = new Redis("counters")const redisCredentials = process.env[envVarName];const documents = new Bucket("documents");const result = paginateListObjectsV2( { client: s3Client }, { Bucket: documents.name });
interface ProcessImage { text: string;}const processImage = new Task<ProcessImage>("img-processor", async ({ data }) => { // your business logic here. });await processImages.performLater({ text: "hello });
interface ProcessImage { text: string;}const processImage = new Task<ProcessImage>("img-processor", async ({ data }) => { // your business logic here. });await processImages.performLater({ text: "hello });
const broadcast = new Broadcast({ channels: { "/rooms/[id]": { data: new ChannelData<{text: string}>(), }, },});type Channels = typeof broadcast._channelDataType;await new BroadcastPublisher<Channels>().publishTo( "/rooms", { id: "some-id" }, [{ text: "hello" }],);const { useSubscription } = broadcastClient<Channels>();const subscription = useSubscription("/messages", { id: "some-id" });
const broadcast = new Broadcast({ channels: { "/rooms/[id]": { data: new ChannelData<{text: string}>(), }, },});type Channels = typeof broadcast._channelDataType;await new BroadcastPublisher<Channels>().publishTo( "/rooms", { id: "some-id" }, [{ text: "hello" }],);const { useSubscription } = broadcastClient<Channels>();const subscription = useSubscription("/messages", { id: "some-id" });
const dailyReport = new Cron("daily-report", { schedule: "* * * * *", run: async () => { // your business logic. },});
const dailyReport = new Cron("daily-report", { schedule: "* * * * *", run: async () => { // your business logic. },});
monolayer runs entirely inside your own AWS account.
When you set up projects with monolayer, we provision everything —from environments to infrastructure— within your cloud, not ours.
This means:
Currently, monolayer supports Next.js. Support for more frameworks is planned.
Based on your application code, monolayer provisions among other cloud resources:
monolayer provisions infrastructure in your AWS account using secure and sensible defaults.
For each project, application infrastructure runs (or is attached) to private subnets in a VPC.
monolayer provisions infrastructure in your AWS account using secure and sensible defaults.
Application infrastructure runs (or is attached) to private subnets in a VPC. Each project has two VPCs: VPC for the production branch and a VPC for preview environments.
With the monolayer SDK package, you can define lifecycle workloads tied to specific phases of the deployment.
Each lifecycle workload runs an `npm` script from your `package.json`.
The monolayer web console is designed to give you full visibility over your environments and deployments, providing a unified interface to manage your full-stack application.
Key features include:
Applications are deployed using a serverless-first architecture designed to minimize idle costs and scale with usage.
Here's how that translates to pricing:
For each project, there's a baseline cost of ~$5/month for the NAT Gateway.
Redis workloads, backed by serverless ElastiCache, have a minimum ~$7/month for the storage.
The monolayer platform runs as a Next.js application fully hosted on AWS using serverless services. Key components include:
Because monolayer is serverless, your running costs mainly depend on your usage, particularly the number of deployments you make. More deployments trigger more builds and deployment workflows, which drive the majority of compute costs.
We expect the costs to run a typical deployment to be in the low single digit cents.
You can add custom environment variables — API keys, feature flags, config values, etc. in the project page on monolayer web console:
Changes are applied automatically on the next deploy.