How to Structure a Next.js Application (For Humans and LLMs)
swiftace.org·3d·
Discuss: Hacker News
🌐Web Development
Preview
Report Post

I’m currently working on a ground-up rewrite of Jovian using TypeScript, React, Next.js, Tailwind, Drizzle ORM, Shadcn UI, and Effect. Since most of the code is being written by LLMs, it’s essential to structure the project for easy navigation, search, and refactoring.

Here’s the folder structure I’m using:

1. app - File-System Based Routes

The app folder contains the file-system based routing structure used by Next.js. Each folder has a page.tsx file with a React [server com…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help