More Info
Project Architecture
Project Architecture and folder structure
Project Architecture
The project is a dynamic Next.js App Router app.
Pages and routes live under app/, with colocated API routes, config, and UI custom components.
Server-only logic (e.g., API handlers) runs in app/api/* and app/data.
Folder Structure
page.tsx
loading.tsx
custom-block-name1.tsx
custom-block-name2.tsx
custom-main-view.tsx
dependencies-provider.tsx
icons.tsx
blocks.ts
extras.ts
index.ts
navigation.ts
pages.ts
radar.ts
schema.ts
settings.ts
api.ts
favicon.ico
icon.ico
layout.tsx
theme.css
logo.svg
icons.svg
...
eslint.config.js
loading.tsx
next-env.d.ts
next.config.mjs
package.json
README.md
sitemap.ts
tsconfig.json
Key paths explained
-
app/: App Router root.
- app/layout.tsx: Root layout applied to all routes.
- app/[[...seo]]/: Catch-all segment for pages;
page.tsxrenders content. - app/api/chat/route.ts: Edge/server API route; handles AI assistant requests.
- app/components/: Custom building blocks for this project. (Optional)
custom-block-name1.tsx: Custom block 1. Example: Map block.icons.tsx: Custom icons used by the project.
- app/config/: Configuration-first content and navigation model for the app.
navigation.ts: Navigation (menu) structure.pages.ts: Page registry.blocks.ts: Block registry.schema.ts: Data schema - reciepe for the application to understand the data.settings.ts: General settings for the project.extras.ts: Extra data for the project. (Optional)index.ts: Index file for the config.
-
public/: Static assets served as-is (logos, icons, images).
-
package.json: Project scripts and dependencies.
-
tsconfig.json: TypeScript configuration for the project.
-
next.config.mjs: Next.js configuration (routing, images, static export).
-
eslint.config.js: Lint rules applied to the project.
-
next-env.d.ts: Next.js TypeScript ambient types.
-
loading.tsx: Top-level loading boundary for project-level routes.
-
sitemap.ts: Sitemap builder for the project.