organizing-project-files

Provides file organization conventions for React and Next.js projects. Use when creating new files, components, hooks, utilities, or services. Triggers on questions like "where should this go?", "where do I put this?", or when deciding between colocating vs grouping files.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "organizing-project-files" with this command: npx skills add augmnt/webdev-skills/augmnt-webdev-skills-organizing-project-files

Organizing Project Files

Colocate by feature when possible. Group by type only for truly shared code.

Standard Layout

src/
├── app/                    # Next.js App Router (or pages/)
├── components/
│   ├── ui/                 # Reusable primitives (Button, Modal)
│   └── [feature]/          # Feature-specific (auth/, dashboard/)
├── hooks/                  # Custom React hooks
├── lib/                    # Core utilities, clients, constants
├── services/               # API calls, external integrations
├── stores/                 # State management
└── types/                  # TypeScript definitions

Placement Quick Reference

"I need..."Location
A buttoncomponents/ui/Button.tsx
A login formcomponents/auth/LoginForm.tsx
User data fetchingservices/user.ts or hooks/queries/useUser.ts
Date formatterlib/utils.ts
Auth statestores/auth.ts
Supabase typestypes/supabase.ts (generated)
Custom typetypes/index.ts or colocate

Naming

  • Components: PascalCase.tsx
  • Hooks: useCamelCase.ts
  • Utilities: camelCase.ts
  • Types: camelCase.ts

Colocation Pattern

For complex features, keep related files together:

components/auth/
├── LoginForm.tsx
├── LoginForm.test.tsx
├── useLoginForm.ts
└── login-schema.ts

Advanced Patterns

For App Router specifics, barrel files, and monorepo structures, see PATTERNS.md.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

reviewing-code

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

writing-tests

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

writing-commits

No summary provided by upstream source.

Repository SourceNeeds Review