Skip to main content

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.

Cloudflare Turnstile requires real site and secret keys tied to a registered domain. Use the official test keys documented in Cloudflare Turnstile configuration for local development.
1

Clone the repository

git clone https://github.com/Israel-Perez/Nuxt-Secure.git
cd Nuxt-Secure
2

Install dependencies

npm install
3

Configure environment variables

Create a .env file in the project root with the following values:
.env
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
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.
See Environment setup for the full variable reference and where to obtain each credential.
4

Push the database schema

Run Drizzle Kit to create all tables in your PostgreSQL database:
npx drizzle-kit push
This command reads drizzle.config.ts and applies the schema defined in server/database/schema.ts to your database.
5

Seed the initial admin user

Create the default Super Administrator profile and user:
npx tsx server/database/seed.ts
This creates:
  • Profile: Super Administrador (administrator flag: true)
  • Username: admin
  • Password: admin123
  • Email: admin@corporativo.com
Change the default password immediately after your first login in a non-development environment.
6

Start the development server

npm run dev
The application starts at http://localhost:3000.
7

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.

Next steps

Environment setup

Review all required environment variables and where to get them.

User management

Create additional users and assign profiles.

Permissions matrix

Configure what each profile can do in each module.

API reference

Explore the full server API documentation.