Skip to content

Latest commit

Β 

History

History
74 lines (55 loc) Β· 2.44 KB

File metadata and controls

74 lines (55 loc) Β· 2.44 KB

↗️ Fork it! Community - Website

Installation

  1. Duplicate the .env.example file to a new .env file, and update the environment variables
cp .env.example .env
  1. Install dependencies
pnpm install
  1. Development
# Run the development server
pnpm dev

To test directly on your phone, you can run the following command and scan the QR code:

pnpm dev --host

πŸ› οΈ Local Build & Preview

To test the production build locally, run the following commands:

pnpm run build:node
pnpm run preview

πŸš€ Project Structure

Inside 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.