Project Structure

Understanding the went framework project structure and conventions.

Directory Structure

Standard went Project Layout
my-app/
├── prisma/
│   ├── schema.prisma          # Database schema
│   └── migrations/            # Database migrations
├── src/
│   ├── app/                   # Next.js app router
│   │   ├── api/               # API routes
│   │   ├── (auth)/           # Route groups
│   │   └── globals.css       # Global styles
│   ├── components/
│   │   ├── ui/               # shadcn/ui components
│   │   └── ...               # Custom components
│   ├── lib/
│   │   ├── auth.ts           # NextAuth config
│   │   ├── db.ts             # Database client
│   │   └── utils.ts          # Utility functions
│   └── generated/
│       └── prisma/           # Generated Prisma client
├── public/                   # Static assets
├── package.json
├── next.config.ts
├── tailwind.config.js
└── .env                      # Environment variables

Key Directories

src/app/

Contains your Next.js 15 App Router pages, layouts, and API routes. Uses file-based routing with support for route groups, parallel routes, and intercepting routes.

  • page.tsx - Route pages
  • layout.tsx - Shared layouts
  • loading.tsx - Loading UI
  • error.tsx - Error handling
prisma/

Database configuration and migrations. The went CLI provides commands to manage your database schema and migrations.

  • schema.prisma - Database models and configuration
  • migrations/ - Database migration files
src/components/

Reusable React components, including shadcn/ui components and your custom components.

  • ui/ - shadcn/ui components
  • • Custom components organized by feature
src/lib/

Utility functions, configurations, and shared logic for your application.

  • auth.ts - NextAuth.js configuration
  • db.ts - Database client setup
  • utils.ts - Common utilities

Generated Files

src/generated/

Contains auto-generated files from Prisma and other tools. These files should not be edited manually.

Note: Add the src/generated/ directory to your .gitignore file as these files are regenerated automatically.

Configuration Files

package.json

Contains project dependencies and npm scripts for development and deployment.

next.config.ts

Next.js configuration including experimental features and build optimizations.

tailwind.config.js

Tailwind CSS v4 configuration with custom theme and plugin settings.

Next Steps

Continue your journey with Went: