All Guides
Coder

📁 Project Organization

Structure your Vigthoria Coder projects for maximum productivity and collaboration.

15 min read Best Practice

Recommended Folder Structure

A well-organized project helps ViAgen6 understand your codebase and provide better suggestions.

my-project/
├── .vigthoria/              # Vigthoria configuration
│   ├── settings.json        # Project-specific AI settings
│   └── prompts/             # Custom prompt templates
├── src/                     # Source code
│   ├── components/          # Reusable components
│   ├── services/            # Business logic
│   ├── utils/               # Utility functions
│   └── index.js             # Entry point
├── tests/                   # Test files
│   ├── unit/
│   └── integration/
├── docs/                    # Documentation
│   ├── api/                 # API documentation
│   └── guides/              # User guides
├── config/                  # Configuration files
├── scripts/                 # Build/deploy scripts
├── .gitignore
├── README.md
└── package.json

Vigthoria Configuration

Create a .vigthoria/settings.json file to customize ViAgen6 behavior for your project:

{
  "project": {
    "name": "My Awesome App",
    "language": "typescript",
    "framework": "react"
  },
  "viagen6": {
    "preferredModel": "vigthoria-code-v2",
    "contextDepth": "deep",
    "autoComplete": true,
    "codeStyle": {
      "indentation": 2,
      "quotes": "single",
      "semicolons": true
    }
  },
  "ignore": [
    "node_modules",
    "dist",
    "*.log"
  ]
}

Key Configuration Options

Documentation Best Practices

README.md Essentials

A good README helps ViAgen6 understand your project:

Inline Documentation

Use JSDoc, docstrings, or comments to help AI understand your code:

/**
 * Calculates the total price including tax and discounts.
 * @param {number} basePrice - Original item price
 * @param {number} taxRate - Tax percentage (e.g., 0.08 for 8%)
 * @param {number} [discount=0] - Optional discount percentage
 * @returns {number} Final calculated price
 */
function calculateTotal(basePrice, taxRate, discount = 0) {
  const discounted = basePrice * (1 - discount);
  return discounted * (1 + taxRate);
}
Pro Tip

Well-documented code receives better AI suggestions. ViAgen6 uses your documentation to understand intent and generate more accurate completions.

Component Organization

Feature-Based Structure

Group related files by feature rather than by type:

# ✓ Feature-based (Recommended)
src/
├── features/
│   ├── auth/
│   │   ├── Login.jsx
│   │   ├── Register.jsx
│   │   ├── authService.js
│   │   └── authSlice.js
│   ├── dashboard/
│   │   ├── Dashboard.jsx
│   │   ├── DashboardStats.jsx
│   │   └── dashboardService.js
│   └── settings/
│       ├── Settings.jsx
│       └── settingsService.js

# ✗ Type-based (Harder to maintain)
src/
├── components/
│   ├── Login.jsx
│   ├── Register.jsx
│   ├── Dashboard.jsx
│   └── Settings.jsx
├── services/
│   ├── authService.js
│   └── dashboardService.js

Index Files for Clean Imports

Use index files to simplify imports:

// src/features/auth/index.js
export { default as Login } from './Login';
export { default as Register } from './Register';
export { login, logout } from './authService';

// Usage elsewhere:
import { Login, Register, login } from '@/features/auth';

Git Integration

Essential .gitignore

# Dependencies
node_modules/
vendor/
.venv/

# Build outputs
dist/
build/
*.min.js

# Environment
.env
.env.local
*.pem

# IDE
.idea/
.vscode/
*.swp

# Vigthoria (keep settings, ignore cache)
.vigthoria/cache/
!.vigthoria/settings.json

# Logs
*.log
npm-debug.log*

Branch Naming

Quick Checklist