# Create a new project

A new project is created in the wizard of the web interface or as JSON through the ap CLI and the MCP tools of the agent plugin.

> Source: https://www.application-platform.com/en/docs/create-project/

From the components and stack of your product, the platform generates the GitLab group with all repositories.

## In the wizard of the web interface

After registering at `app.application-platform.com/register`, you create an organization via **Create organization**. The project wizard asks for components (several apps if needed), the tech stack per component and, optionally, domains, store accounts and hosting; [Create your first project]({{< relref "getting-started" >}}) shows every click.

Supported are Flutter, React Native (Expo), Next.js, native iOS and Android for apps, Hugo and Astro for homepages, and NestJS, FastAPI and Laravel for backends; Django, Vue or Spring are missing today.

## Via the CLI with JSON

`demo-json` writes a template, and `--minimal` a shorter one:

```bash
ap platform projects demo-json --minimal -o project.json
```

A Next.js app with a NestJS backend and a database looks like this:

```json
{
  "slug": "shop",
  "name": "Shop",
  "description": "Online shop with web app and API",
  "hostingMode": "none",
  "deploymentMode": "standard",
  "repositories": [
    {
      "type": "app",
      "techStack": "nextjs",
      "name": "Web App",
      "configurationId": "web",
      "webProdDomain": "app.example.com",
      "webEnabled": true
    },
    {
      "type": "backend",
      "techStack": "nestjs",
      "name": "API",
      "backendUrl": "api.example.com",
      "hasDatabase": true,
      "smtpEnabled": false
    }
  ]
}
```

`type` and `techStack` match the wizard's stacks, and packages (`dart-package`, `npm`, `go`, `docker-image` and others) are possible as well. Then create the project, wait with `--watch` for the repositories and clone them:

```bash
ap platform projects create --from-json project.json --watch
ap platform projects clone shop
```

`clone` places all repositories under `~/Documents/application-platform/<organization-slug>/shop/`, installs the Git hooks and links `local-configuration`; `ap platform projects status <project-id>` shows the state of a running setup.

## Via the agent

With the [agent plugin]({{< relref "cli-and-agent-plugin" >}}) the prompt "Create a new Application Platform project with a Next.js app and a NestJS backend and clone it." is enough. The `create-project` skill calls `platform_whoami`, fetches the template with `platform_projects_demo_json` (`minimal: true`), adjusts `name`, `repositories[].type` and `techStack`, calls `platform_projects_create`, waits with `platform_watch` (subject `project`) and clones with `platform_projects_clone`. If you belong to several organizations, the agent asks; it leaves memberships empty so that you become the maintainer, and if create or watch fails, it creates nothing outside the platform.

## What ends up in GitLab

Each component gets a repository with a code scaffold, a generated `.gitlab-ci.yml` and `env/` files, alongside `local-configuration` (editor and agent configuration), `gitops-configuration` (deployment for dev and prod) and `gitlab-profile` (group README); Sentry is added as soon as a Sentry account is connected under **Connections**. Then open the project folder in your editor and start each application with `ap run-local`, see [Local development]({{< relref "local-development" >}}).

