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
You must enable standalone mode to deploy a Next.js app.
Squadbase currently supports only Next.js applications built in standalone mode.
Update next.config.mjs
/ ts
as shown below to enable standalone mode.
See Configuring standalone mode.
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:
Create a new Next.js app
Run the following command:
You’ll be prompted to choose settings. Here is the Squadbase team’s recommended configuration:
Next, customize next.config.ts
:
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:
A minimal squadbase.yml
:
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
:
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:
To fetch Squadbase user info from Next.js code, install @squadbase/nextjs.
User analytics
Squadbase collects access logs and surfaces usage analytics automatically—no extra code required.
Log monitoring
View runtime and access logs for each deployment (and each version) directly in the dashboard.
Feedback
Every deployed app includes a comment box so team members can submit feedback.