For developers

Project structures and scaffolds for developers

Start a project with a folder structure that already makes sense. Generate scaffolds for your stack, or study how well-known open-source repositories are organized.

What you can do

Scaffold a new project

Describe the project and get a folder structure with the config files your stack expects.

Study real repositories

Read the directory tree and architecture of projects like React, Next.js, Django, and the Linux kernel.

Standardize across a team

Reuse one layout so every repository a team starts looks the same on day one.

Common questions

What is a good folder structure for a React project?

Separate UI components from business logic and data access: components for presentation, hooks for stateful logic, and a services or lib folder for API calls. Once a codebase grows past a handful of features, group by feature rather than by file type so related code moves together.

How should I structure a Next.js App Router project?

Folders inside app are your routes, so directory layout and URL structure are one decision. Use route groups in parentheses to organize pages without adding URL segments, and keep non-routing code in lib and components so route folders stay readable.

Why do Python projects use a src/ directory?

Placing your package under src/ means it cannot be imported accidentally from the project root, so tests run against the installed package exactly as a user receives it. That surfaces packaging mistakes before release rather than after.

Can I generate a structure from an existing repository?

Yes. The GitHub browser reads the directory tree of a public repository so you can see how it is organized, then use that layout as the starting point for your own project.