Quickstart
Create mantou app in a seco
# Create your next amazing project
bunx create-mantou-app my-app
# Jump into the action
cd my-app
bun install
bun run dev
Project Structure
my-app/
├── src/
│ ├── app/ # Your pages live here
│ │ ├── api/
│ │ │ ├── routes.ts # API Route File
│ │ │ └── middleware.ts # Middleware File
│ │ ├── page.tsx # Root page
│ │ └── layout.tsx # Root layout
│ └── components/
└── mantou.config.ts # Configuration File
Explanation of Project Structure
The project structure generated by the create-mantou-app
command is organized to separate different functionalities clearly:
src/
: The primary directory containing application source code.app/
: Contains page-related code and logic.api/
: custom folder for tell user there have /api pageroutes.ts
: Defines the API routes for the application.middleware.ts
: Contains middleware functions to handle requests.
page.tsx
: Represents the root page of the app.layout.tsx
: Defines the root layout of the app.
components/
: A directory to store reusable React components.
mantou.config.ts
: The configuration file for customizing the build and development settings of the project.
This structure is designed to maintain a clean and efficient organization of code, making it easier to manage and scale the project.
Last updated