- Duplicate the
.env.examplefile to a new.envfile, and update the environment variables
cp .env.example .env- Install dependencies
pnpm install- Development
# Run the development server
pnpm devTo test directly on your phone, you can run the following command and scan the QR code:
pnpm dev --hostTo test the production build locally, run the following commands:
pnpm run build:node
pnpm run previewInside the project, you'll see the following folders and files:
/
βββ components.json # Component registry/configuration
βββ package.json
βββ public/ # Static assets (served at site root)
βββ scripts/ # Utility scripts for development
β βββ generate-routes.ts
βββ src/ # Main source code
β βββ content.config.ts # Astro content configuration (https://docs.astro.build/en/guides/content-collections/)
β βββ routes.gen.ts # Auto-generated routes for improved type safety
β βββ @types/ # TypeScript custom type definitions
β βββ assets/ # Source assets (images, etc.)
β βββ components/ # Astro/React UI components (basics are from shadcn/ui)
β βββ content/ # Content files (e.g., markdown, data)
β βββ generated-assets/ # Helper to automatically generate assets (og-image, marketing posts)
β βββ hooks/ # Custom hooks
β βββ i18n/ # Internationalization files
β βββ layouts/ # Layout components/templates
β βββ lib/ # Utility libraries/helpers
β βββ pages/ # Astro/MDX pages (routes)
β βββ schemas/ # Content schemas
β βββ styles/ # Global and component styles
Astro looks for .astro or .md files in the src/pages/ directory. Each page is exposed as a route based on its file name.
There's nothing special about src/components/, but that's where we like to put any Astro/React components.
Any static assets, like images, can be placed in the public/ directory.

