Project structure
Learn about the structure of a typical Redwood project.
This Next.js template uses the App Router introduced in Next.js 15.2, along with a modular file structure to help you scale and organize your application in a maintainable way. The modular structure is designed to keep related components, pages, and logic together, making it easier to manage as your application grows.
Here’s a high-level overview of the project structure:
Root
Directory
The root
directory contains essential configuration files and the foundational structure of the project:
app
Directory (App Router)
The /app
directory is the heart of the Next.js App Router system. The App Router structure is based on folders and files which automatically map to different routes in your app.
tRPC
Directory
The /trpc
directory contains the tRPC client and server files. tRPC is a TypeScript-first RPC framework that allows you to define your API routes and procedures in a type-safe way.
module
Directory
The /modules
directory contains modules that group related components, hooks, logic, and tRPC procedures together. This structure helps you organize your codebase and scale your application in a maintainable way.
Conclusion
The modular structure ensures that related pieces of your application (pages, components, hooks, API routes) are grouped together, making it easier to navigate and scale as your app grows. You can freely add more folders or files to this structure based on your needs.
Would you like me to convert this overview into MDX format for your documentation?
How is this guide?