Getting Started
Learn how to create your first Phyre application in minutes.
Create Your First App
Initialize a new project and install Phyre:
bash
npx create-phyre@latest my-app package structure: y/n typescript: y/n cd my-app
Project Structure
Classical file structure:
plaintext
my-app/ ├── app/ │ ├── index.jsx # Client entry point │ └── styles.css # Global styles ├── src/ │ ├── client/ │ │ └── routes/ # Your pages go here │ │ └── index.jsx │ └── server/ │ └── api/ # API routes │ └── api.js ├── index.html # HTML template ├── phyre.config.js # Configuration └── package.json
Packages file structure:
plaintext
my-app/ ├── app/ │ ├── index.jsx # Client entry point │ └── styles.css # Global styles ├── packages/ │ ├── repo1/ │ │ └── src/ │ └── repo2 │ └── src/ ├── index.html ├── phyre.config.js └── package.json
Start Development
Run the development server:
bash
npm run dev
Open http://localhost:3000 in your browser. You should see your app running!
Build for Production
Build your app for production:
bash
npm run build
Start the production server:
bash
cd dist node server.js
Next Steps
Now that you have a running app, learn about:
- File-based routing - Create pages and dynamic routes
- Layouts - Share UI across pages
- Data Loading - Fetch data server-side
- API Routes - Build your backend
