Squadbase
Squadbase Docs

Next.js

Learn how to leverage Squadbase features with Next.js.

Next.js is a robust React-based framework that ships with built-in server-side rendering and static site generation, making it ideal for building high-performance internal AI apps that seamlessly integrate LLM APIs to boost business efficiency.

With Squadbase, delivering a Next.js app gives you all of the following out of the box:

  • Deployment to a secure cloud environment
  • Built-in user authentication
  • User analytics
  • Log monitoring
  • In-app feedback collection from users

Sample

Check out an AI app built with Next.js. With Squadbase you can deploy apps like this to a secure cloud and operate them safely inside your organization.

Resources

Handy references for developing with Next.js:

Introduction | Next.js

nextjs.org

Official Next.js Documentation

The official docs for Next.js.

AI SDK by Vercel

sdk.vercel.ai

AI SDK by Vercel

The AI SDK is the TypeScript toolkit for building AI applications and agents with React, Next.js, Vue, Svelte, Node.js, and more.

4 User Authentication Approaches for Delivering Next.js AI Apps Inside Your Organization | Squadbase Blog

www.squadbase.dev

4 User Authentication Approaches for Delivering Next.js AI Apps Inside Your Organization | Squadbase Blog

With the arrival of the Vercel AI SDK, Next.js has become a leading framework for building AI applications. To share a Next.js AI app privately within your company, you need a robust authentication layer. This article compares the main tools and services you can use to add organization‑grade authentication to a Next.js project—focusing on options that minimize implementation effort rather than building an auth server from scratch.

JavaScript Frameworks for Internal-App Development in 2025: Next.js, Vercel AI SDK, Evidence, and Observable | Squadbase Blog

www.squadbase.dev

JavaScript Frameworks for Internal-App Development in 2025: Next.js, Vercel AI SDK, Evidence, and Observable | Squadbase Blog

In recent years, more and more companies have been building internal web apps—applications that encode unique workflows in code and are used only by employees. For workloads that leverage generative AI or a modern data stack, off-the-shelf SaaS tools can’t easily satisfy every edge case, so building your own with a JavaScript framework is often the best option. This article compares three leading frameworks: Next.js (plus the Vercel AI SDK), Evidence, and Observable.

Create a new Next.js app

Run the following command:

npx create-next-app@latest

You’ll be prompted to choose settings. Here is the Squadbase team’s recommended configuration:

 Use TypeScript? Yes
 Use ESLint? Yes
 Use Tailwind CSS? Yes
 Put code in a `src/` directory? No
 Use App Router? Yes
 Use Turbopack for `next dev`? … Yes
 Customize the import alias (`@/*` by default)? … No

Next, customize next.config.ts:

// next.config.ts
import type { NextConfig } from "next";
 
const nextConfig: NextConfig = {
  output: "standalone",
};
 
export default nextConfig;

That’s it—ready to go! 🎉 For more details, see the official Next.js docs.

Deploy with GitHub integration

Create squadbase.yml

Add squadbase.yml to the root of your codebase. For an App Router project, your structure might look like this:

page.tsx
layout.tsx
next.config.ts
package.json
squadbase.yml

A minimal squadbase.yml:

# squadbase.yml
version: "1"
 
build:
  framework: nextjs
  runtime: node20

For customization options, see the reference.

Enable output: standalone

Next.js apps must be in standalone mode to deploy on Squadbase. Update next.config.mjs / ts:

// next.config.ts
import type { NextConfig } from "next";
 
const nextConfig: NextConfig = {
  output: "standalone",
};
 
export default nextConfig;

Import your GitHub repo into Squadbase

From the Squadbase dashboard home, import your GitHub repository. Deployment starts automatically once the import completes.

Push and deploy

Commit changes, push to GitHub, and a new deployment kicks off automatically.

Make the most of Squadbase features

Squadbase offers more than deployment—it streamlines development and operations for internal apps.

User authentication & member management

When a Squadbase team member opens your app, authentication happens automatically. If the app isn’t public, only authenticated users can access it. Each user can also have a project role.

Access user info (including project roles) from your Next.js code:

import { createNextjsServerClient } from "@squadbase/nextjs";
 
// In a server component or API route
const client = createNextjsServerClient({
  projectId: "your-project-id",
});
 
const user = await client.getUser();
console.log(user);
// {
//   username: string,
//   email: string,
//   firstName: string,
//   lastName: string,
//   iconUrl: string | null,
//   roles: string[]
// }

User analytics

Squadbase collects access logs and surfaces usage analytics automatically—no extra code required.

User Analytics

Log monitoring

View runtime and access logs for each deployment (and each version) directly in the dashboard.

Log Monitoring

Feedback

Every deployed app includes a comment box so team members can submit feedback.

Feedback

On this page