Introduction

Welcome to #divisions. This guide will walk you through the essentials of initializing a project, configuring your workspace, and deploying your first application. Whether you're a solo developer or part of a large engineering team, our streamlined workflow ensures rapid iteration and reliable deployments.

ℹ️
Estimated Time Completing this guide should take approximately 5–10 minutes. No prior experience with #divisions is required.

Prerequisites

Before diving in, ensure your development environment meets the following requirements:

  • Node.js v18+ or Python 3.10+
  • A modern package manager (npm, yarn, pnpm, or pip)
  • Git installed and configured
  • An active #divisions account (free tier available)
1

Create Your Account & API Key

Sign up at dashboard.divisions.dev and navigate to the Settings → API Keys section. Generate a new key with read:deploy and write:projects scopes.

💡
Security Best Practice Store your API key in environment variables. Never commit credentials to version control.
2

Install the #divisions CLI

Our command-line interface handles scaffolding, local development, and deployment. Install it globally using your preferred package manager:

Bash / Zsh
npm install -g @divisions/cli
# or
yarn global add @divisions/cli
# or
pip install divisions-cli

Verify the installation by running:

CLI
divisions --version
# Expected output: divisions-cli/v2.4.1 (stable)
3

Initialize Your First Project

Run the interactive scaffolding command to generate a boilerplate project with best practices pre-configured:

CLI
mkdir my-app && cd my-app
divisions init --template nextjs --auth supabase

The CLI will prompt you for project metadata, region selection, and initial repository setup. Answer the prompts, and the tool will generate your file structure, install dependencies, and configure environment variables automatically.

4

Run Locally

Start the local development server with hot-reloading enabled. The CLI automatically proxies API requests to your mocked endpoints.

CLI
divisions dev
# ➜  Server running at http://localhost:3000
# ➜  Dashboard: http://localhost:3000/__divisions

Open your browser to the provided URL. Make changes to your code and watch them reflect instantly. The local environment mirrors production exactly, ensuring zero-surprise deployments.

5

Deploy to Production

When you're ready to go live, push your code and trigger a deployment. #divisions handles builds, SSL, edge caching, and global CDN distribution automatically.

CLI
divisions deploy --env production
# ✅ Build successful (14.2s)
# ✅ Deployed to https://my-app.divisions.app
# 📊 Monitoring: dashboard.divisions.app/projects/my-app

Your application is now live with a globally distributed edge network, automatic HTTPS, and zero-config load balancing.

Troubleshooting

Running into issues? Here are the most common solutions:

  • Authentication failed: Verify your API key is set in ~/.divisions/config.json or exported as DIVISIONS_API_KEY.
  • Port already in use: Run divisions dev --port 3001 to specify a custom port.
  • Build timeouts: Check your divisions.config.js for heavy synchronous operations. Consider using --experimental-parallel-builds.
🔍
Need more help? Visit our Community Forum or open a GitHub issue. Our engineering team responds within 24 hours.

Next Steps

You've successfully deployed your first project. Here's what to explore next: