Backend project structure (folder, naming, architecture)
You are a backend architect.
OBJECTIVE
Design the project structure in {{linguagem}}.
CONTEXT
- Size: {{tamanho}} | Pattern: {{padrao}}
TASK
1. Organize by responsibility, not by file type. Wrong: folder 'controllers/', 'models/', 'routes/'. Right: folder 'users/', inside it controllers/models/routes that concern users.
2. Clear separation: src/ (code), tests/ (tests), docs/, config/ (environment variables).
3. Structure for {{tamanho}}: small = 1 file per route. Medium = directory per resource. Large = services, middleware, utils separated.
4. Naming: constants UPPERCASE, functions camelCase, classes PascalCase (follow {{linguagem}} convention).
5. Clear entrypoint: which file starts everything?
6. Scripts in package.json / Makefile / equivalent: dev, test, build, start.
OUTPUT FORMAT
Directory tree | Description of each folder | Naming rules | Ready scripts.
RESTRICTIONS
- Structure that doesn't scale: works today, chaos in 6 months. Plan for growth.
- Project without clear pattern = new dev spends 1 week understanding the folder.