Vibestacks LogoVibestacks
Getting Started

IDE Setup

Optimize your editor for the best development experience.

We strongly recommend using VS Code or Cursor for building with Vibestacks. Both editors provide excellent TypeScript support and have extensions that make working with our stack significantly easier.

Cursor recommended

If you're new to both editors, we recommend Cursor. It's built on VS Code (so all extensions work) but adds powerful AI features that speed up development considerably.


When you open Vibestacks in VS Code or Cursor, you should be prompted to install our recommended extensions. If not, install these manually:

Essential

ExtensionPurpose
ESLintCatches errors and enforces code quality
PrettierAutomatic code formatting
Tailwind CSS IntelliSenseAutocomplete for Tailwind classes
ExtensionPurpose
Pretty TypeScript ErrorsMakes TypeScript errors human-readable
Error LensShows errors inline, right where they occur
GitLensGit blame, history, and more
Auto Rename TagAutomatically rename paired HTML/JSX tags

Optional but Nice

ExtensionPurpose
Console NinjaSee console.log output inline in your editor
Todo TreeTrack TODOs and FIXMEs across your codebase
Import CostSee the size of imported packages

Workspace Settings

For the best experience, add these settings to your VS Code/Cursor configuration. Create or update .vscode/settings.json:

.vscode/settings.json
{
  // Format and fix on save
  "editor.formatOnSave": true,
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": "explicit",
    "source.organizeImports": "explicit"
  },

  // TypeScript
  "typescript.preferences.importModuleSpecifier": "non-relative",
  "typescript.suggest.autoImports": true,

  // Tailwind CSS v4
  "tailwindCSS.includeLanguages": {
    "typescript": "javascript",
    "typescriptreact": "javascript"
  },
  "tailwindCSS.experimental.classRegex": [
    ["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
    ["cn\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
  ],
  "files.associations": {
    "*.css": "tailwindcss"
  },
  "editor.quickSuggestions": {
    "strings": "on"
  },

  // File nesting (cleaner file tree)
  "explorer.fileNesting.enabled": true,
  "explorer.fileNesting.patterns": {
    "package.json": "package-lock.json, pnpm-lock.yaml, yarn.lock, .npmrc",
    "tsconfig.json": "tsconfig.*.json",
    ".env": ".env.*",
    "postcss.config.*": "postcss.config.*"
  },

  // Hide noise
  "files.exclude": {
    "**/.git": true,
    "**/node_modules": true,
    "**/.next": true
  }
}

What's classRegex?

The classRegex setting enables Tailwind autocomplete inside cn() and cva() functions - not just in className="". These utilities are how Vibestacks handles conditional and variant-based styling. Learn more in Why We Use cn() and cva() for Component Styling.

Tailwind CSS v4

Vibestacks uses Tailwind CSS v4, which configures themes directly in CSS using @theme instead of a tailwind.config.ts file. The IntelliSense extension works the same way - just make sure to associate .css files with tailwindcss for proper syntax highlighting.

Commit this file

Add .vscode/settings.json to version control so your team shares the same configuration.


Path Aliases

Vibestacks uses the @/ path alias to simplify imports. Instead of relative paths like ../../../components/Button, you can write:

import { Button } from "@/components/ui/button";
import { db } from "@/db";
import { env } from "@/env";

This is configured in tsconfig.json:

tsconfig.json (excerpt)
{
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "@/*": ["./*"]
    }
  }
}

Your editor will automatically resolve these paths and provide autocomplete.


Cursor AI Setup

Cursor supercharges your development with AI. Here's how to get the most out of it with Vibestacks.

Add Documentation Sources

Cursor can reference official documentation when answering questions. Add the libraries we use:

Open Cursor Settings

Press Cmd+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux) and search for "Cursor Settings" or click the gear icon.

Go to FeaturesDocs.

Add Documentation URLs

Click Add Doc and add each of these:

LibraryURL
Next.jshttps://nextjs.org/docs
Drizzle ORMhttps://orm.drizzle.team/docs
shadcn/uihttps://ui.shadcn.com/docs
Better Authhttps://better-auth.com/docs
Tailwind CSShttps://tailwindcss.com/docs
Fumadocshttps://fumadocs.vercel.app/docs

Now when you ask Cursor about these libraries, it will reference the official docs for accurate answers.

Effective Prompting Tips

Get better results from Cursor with these patterns:

Good prompts
✅ "Create a server action that creates a new post using Drizzle"
✅ "Add a protected API route that requires authentication with Better Auth"
✅ "Build a form component using shadcn/ui with react-hook-form validation"
Less effective prompts
❌ "Make a form" (too vague)
❌ "Fix this" (no context)

Coming soon: Cursor Rules

We're working on custom Cursor rules that will ship with Vibestacks. These will give the AI context about our specific patterns and conventions, making it even more helpful.


Keyboard Shortcuts

These shortcuts will save you time every day:

Essential Shortcuts

ActionMacWindows/Linux
Command PaletteCmd+Shift+PCtrl+Shift+P
Quick Open (files)Cmd+PCtrl+P
Go to SymbolCmd+Shift+OCtrl+Shift+O
Toggle TerminalCtrl+`Ctrl+`
Toggle SidebarCmd+BCtrl+B

TypeScript Shortcuts

ActionMacWindows/Linux
Go to DefinitionCmd+Click or F12Ctrl+Click or F12
Find All ReferencesShift+F12Shift+F12
Rename SymbolF2F2
Quick FixCmd+.Ctrl+.
Restart TS ServerCmd+Shift+P → "Restart TS"Ctrl+Shift+P → "Restart TS"

Cursor AI Shortcuts

ActionMacWindows/Linux
Inline EditCmd+KCtrl+K
ChatCmd+LCtrl+L
ComposerCmd+ICtrl+I
Accept SuggestionTabTab

Restart TS Server

If you're seeing stale type errors or autocomplete isn't working, restart the TypeScript server. This is especially common after schema changes or pulling new code.


Tailwind CSS v4

Vibestacks uses Tailwind CSS v4, which has a new CSS-based configuration system. Instead of a tailwind.config.ts file, themes are defined directly in CSS.

Deep dive

Want to understand the full picture? Read Tailwind CSS v4: What Changed and Why It's Better for a complete breakdown of the new architecture.

Configuration Location

All Tailwind configuration lives in app/globals.css:

app/globals.css
@import "tailwindcss";
@import "tw-animate-css";

@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-primary: var(--primary);
  /* ... more theme tokens */
}

Key Differences from v3

FeatureTailwind v3Tailwind v4
Config filetailwind.config.ts@theme in CSS
Custom colorstheme.extend.colors--color-* CSS variables
Animationstheme.extend.keyframes@keyframes in @theme
Dark modedarkMode: 'class'@custom-variant dark
PostCSS plugintailwindcss@tailwindcss/postcss

Adding Custom Styles

To add new theme tokens, extend the @theme inline block:

Adding a custom color
@theme inline {
  /* Existing tokens... */
  
  --color-brand: oklch(0.6 0.2 250);
  --color-brand-foreground: oklch(0.98 0 0);
}

Then use it in your components:

<div className="bg-brand text-brand-foreground">
  Branded content
</div>

Vibestacks includes ESLint configured with Next.js best practices.

ESLint Configuration

The ESLint config extends Next.js recommended rules:

eslint.config.js
import { defineConfig, globalIgnores } from "eslint/config";
import nextVitals from "eslint-config-next/core-web-vitals";
import nextTs from "eslint-config-next/typescript";

const eslintConfig = defineConfig([
  ...nextVitals,
  ...nextTs,
  globalIgnores([
    ".next/**",
    "out/**",
    "build/**",
    "next-env.d.ts",
  ]),
]);

export default eslintConfig;

Running Linting

Check for issues
pnpm lint

With the recommended VS Code settings, ESLint will automatically fix issues on save.


Debugging

VS Code and Cursor have built-in debugging for Next.js. Create this configuration to enable breakpoints:

.vscode/launch.json
{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Next.js: debug server-side",
      "type": "node-terminal",
      "request": "launch",
      "command": "pnpm dev"
    },
    {
      "name": "Next.js: debug client-side",
      "type": "chrome",
      "request": "launch",
      "url": "http://localhost:3000"
    },
    {
      "name": "Next.js: debug full stack",
      "type": "node",
      "request": "launch",
      "program": "${workspaceFolder}/node_modules/.bin/next",
      "args": ["dev"],
      "console": "integratedTerminal",
      "serverReadyAction": {
        "pattern": "- Local:.+(https?://.+)",
        "uriFormat": "%s",
        "action": "debugWithChrome"
      }
    }
  ]
}

Press F5 to start debugging with breakpoints.


When adding new features, follow this structure:

layout.tsx
page.tsx
DirectoryPurpose
app/Next.js App Router pages and layouts
app/(group)/Route groups for shared layouts
app/api/API routes and webhooks
components/React components
components/ui/shadcn/ui primitives
lib/Utility functions and shared logic
db/Database schema and client

Troubleshooting

TypeScript errors not updating

Restart the TypeScript server:

  • Cmd+Shift+P → "TypeScript: Restart TS Server"

Tailwind autocomplete not working

  1. Ensure Tailwind CSS IntelliSense extension is installed
  2. Check that your app/globals.css has @import "tailwindcss" at the top
  3. Verify .vscode/settings.json has "files.associations": { "*.css": "tailwindcss" }
  4. Restart VS Code/Cursor

ESLint not running on save

  1. Check that ESLint extension is installed and enabled
  2. Verify .vscode/settings.json has "source.fixAll.eslint": "explicit"
  3. Check the ESLint output panel for errors (ViewOutputESLint)

Imports not resolving

  1. Ensure tsconfig.json has the path aliases configured
  2. Restart the TypeScript server
  3. Run pnpm install to ensure dependencies are installed

Next Steps

Your development environment is ready! Continue with: