SShortSingh.
Back to feed

A Practical Folder Structure Guide for Large Next.js App Router Projects

0
·5 views

A developer has shared a folder architecture guide for large Next.js projects using the App Router, based on lessons learned from reorganising a client dashboard. The structure separates routes into the app/ directory, domain-specific business logic into a features/ folder, and reusable UI primitives into components/ui. A key principle called the '10-second findability rule' requires that any piece of code — such as a password reset email handler — can be located within ten seconds, or the structure is considered flawed. Common early mistakes highlighted include dumping 80-plus components into a single folder, growing utility files to over a thousand lines, and scattering Server Actions across random page files instead of colocating them in a dedicated actions.ts. The guide also recommends route groups for separating marketing and dashboard shells, TypeScript strict mode, and an ESLint-enforced import direction policy for teams larger than three developers.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

AI Speeds Up Blockchain Development but Raises Risk of Costly Smart Contract Errors

Artificial intelligence tools like ChatGPT and Claude are transforming blockchain development by enabling engineers to generate smart contracts, tests, and documentation in minutes rather than hours. For Web3 startups, this accelerates prototyping and product launches, offering a meaningful competitive edge. However, the speed advantage comes with a significant downside: AI-generated code can appear correct while hiding subtle vulnerabilities that evade basic checks. In blockchain, such errors carry extreme financial consequences, as past exploits like the DAO Hack and attacks on Wormhole and Ronin Bridge have demonstrated. Experts caution that AI should be treated like a junior developer — useful, but requiring careful oversight rather than blind trust.

0
ProgrammingHacker News ·

DocuBrowser Turns Unstructured Document Collections Into Searchable Knowledge Bases

A developer has released DocuBrowser, an open-source tool hosted on GitHub designed to convert large collections of documents into organized, searchable knowledge bases. The project addresses a common challenge faced by individuals and teams who struggle to retrieve useful information from unstructured document piles. DocuBrowser aims to make stored documents more accessible and practically usable through improved search and browsing capabilities. The release was shared on Hacker News, where it attracted early community attention.

0
ProgrammingDEV Community ·

OmniTrust Open-Sources ILM to Unify Cryptographic Asset Lifecycle Management

Cybersecurity firm OmniTrust has open-sourced its Identity Lifecycle Management (ILM) platform, citing the growing complexity of modern trust infrastructure. The company says organizations are increasingly struggling to manage not just certificates but the full spectrum of cryptographic assets—including keys, secrets, digital signatures, and container identities—through fragmented, disconnected tools. ILM was designed to bring these capabilities under a single unified trust lifecycle model, improving visibility, governance, and automation across enterprise environments. OmniTrust chose the open-source route believing that no single organization can anticipate every integration or deployment requirement as trust infrastructure continues to evolve. The move is intended to foster community-driven innovation and build a broader, more connected trust ecosystem, particularly as organizations prepare for post-quantum cryptography and shorter certificate lifetimes.