> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/Israel-Perez/Nuxt-Secure/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get Nuxt Secure running locally in under 10 minutes.

<Note>
  Cloudflare Turnstile requires real site and secret keys tied to a registered domain. Use the official test keys documented in [Cloudflare Turnstile configuration](/configuration/turnstile) for local development.
</Note>

<Steps>
  <Step title="Clone the repository">
    ```bash theme={null}
    git clone https://github.com/Israel-Perez/Nuxt-Secure.git
    cd Nuxt-Secure
    ```
  </Step>

  <Step title="Install dependencies">
    <CodeGroup>
      ```bash npm theme={null}
      npm install
      ```

      ```bash pnpm theme={null}
      pnpm install
      ```

      ```bash yarn theme={null}
      yarn install
      ```

      ```bash bun theme={null}
      bun install
      ```
    </CodeGroup>
  </Step>

  <Step title="Configure environment variables">
    Create a `.env` file in the project root with the following values:

    ```bash .env theme={null}
    DATABASE_URL=postgresql://user:password@host/dbname
    JWT_SECRET=your-super-secret-key-at-least-32-characters
    CLOUDINARY_CLOUD_NAME=your-cloud-name
    CLOUDINARY_API_KEY=your-api-key
    CLOUDINARY_API_SECRET=your-api-secret
    NUXT_PUBLIC_TURNSTILE_SITE_KEY=1x00000000000000000000AA
    TURNSTILE_SECRET_KEY=1x0000000000000000000000000000000AA
    ```

    <Tip>
      The Turnstile keys shown above are Cloudflare's official test keys that always pass validation — safe for local development. Replace them with real keys before deploying to production.
    </Tip>

    See [Environment setup](/environment-setup) for the full variable reference and where to obtain each credential.
  </Step>

  <Step title="Push the database schema">
    Run Drizzle Kit to create all tables in your PostgreSQL database:

    ```bash theme={null}
    npx drizzle-kit push
    ```

    This command reads `drizzle.config.ts` and applies the schema defined in `server/database/schema.ts` to your database.
  </Step>

  <Step title="Seed the initial admin user">
    Create the default Super Administrator profile and user:

    ```bash theme={null}
    npx tsx server/database/seed.ts
    ```

    This creates:

    * **Profile**: Super Administrador (administrator flag: true)
    * **Username**: `admin`
    * **Password**: `admin123`
    * **Email**: [admin@corporativo.com](mailto:admin@corporativo.com)

    <Warning>
      Change the default password immediately after your first login in a non-development environment.
    </Warning>
  </Step>

  <Step title="Start the development server">
    <CodeGroup>
      ```bash npm theme={null}
      npm run dev
      ```

      ```bash pnpm theme={null}
      pnpm dev
      ```

      ```bash yarn theme={null}
      yarn dev
      ```

      ```bash bun theme={null}
      bun run dev
      ```
    </CodeGroup>

    The application starts at [http://localhost:3000](http://localhost:3000).
  </Step>

  <Step title="Log in">
    Opening `http://localhost:3000` automatically redirects you to `/login` via the global auth middleware.

    Enter the seeded credentials:

    * **Username**: `admin`
    * **Password**: `admin123`
    * **CAPTCHA**: complete the Turnstile widget

    After a successful login, you are redirected to `/principal-1` — the main dashboard. Your permissions are loaded automatically from the database.
  </Step>
</Steps>

## Next steps

<CardGroup cols={2}>
  <Card title="Environment setup" icon="gear" href="/environment-setup">
    Review all required environment variables and where to get them.
  </Card>

  <Card title="User management" icon="users" href="/features/user-management">
    Create additional users and assign profiles.
  </Card>

  <Card title="Permissions matrix" icon="table" href="/features/permissions-matrix">
    Configure what each profile can do in each module.
  </Card>

  <Card title="API reference" icon="code" href="/api-reference/auth/login">
    Explore the full server API documentation.
  </Card>
</CardGroup>
