project-structure

Organize React/Next.js/TypeScript codebases into feature-based src directories.

Updated Apr 29, 2026
One-click install
npx skills add https://github.com/dev-khoi/conHack-2026 --skill project-structure-dev-khoi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: project-structure
Source: https://github.com/dev-khoi/conHack-2026/tree/main/.opencode/skills/project-structure
Command: npx skills add https://github.com/dev-khoi/conHack-2026 --skill project-structure-dev-khoi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Guides teams to structure code by feature/domain rather than by file type, enabling scalable, maintainable React/Next.js/TypeScript projects.

Core Features & Use Cases

  • Feature-based top-level structure under src/ (app/, assets/, components/, config/, features/, hooks/, lib/, stores/, testing/, types/, utils/).
  • Clear feature boundaries with isolated folders per domain to minimize cross-feature dependencies.
  • Unidirectional code flow and consistent organization patterns to improve onboarding and collaboration.

Quick Start

Create a feature-based project structure in src/ and begin moving code into features folders.

Frequently Asked Questions about project-structure

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is feature-based code organization for React and TypeScript projects?

Feature-based code organization groups files by domain or feature rather than file type. This approach isolates features, minimizes cross-feature dependencies, and supports unidirectional data flow to keep medium-to-large React codebases maintainable.

How do I structure a scalable React and Next.js codebase?

Structure scalable React and Next.js codebases using a top-level src layout with app, features, and shared directories. Place API, UI, and utility code in dedicated folders to enforce clear feature boundaries and maintain cohesive code.

When should I use a feature-based project structure instead of grouping by file type?

Use a feature-based project structure for medium-to-large codebases requiring feature isolation, unidirectional data flow, and maintainable team collaboration. Grouping by file type works for smaller apps but creates cross-feature dependencies at scale.

What is the best way to organize TypeScript frontend architecture for team collaboration?

The best way to organize TypeScript frontend architecture for team collaboration is adopting a feature-based top-level structure. Clear feature boundaries and consistent organization patterns improve onboarding and minimize cross-feature dependencies.

Where do API calls and utilities belong in a feature-based React architecture?

In a feature-based React architecture, API calls and utilities belong in shared top-level directories like lib, hooks, and utils, while feature-specific API and UI code stays within isolated folders under the features directory.

Does a feature-based folder structure work for small frontend applications?

A feature-based folder structure is designed for medium-to-large codebases that require feature isolation and unidirectional data flow. Small frontend applications may find this level of organization unnecessarily complex.