App Boilerplate
App Boilerplate
App Boilerplate
The App Boilerplate is a template package designed to accelerate the creation of new FlowState applications. It provides a complete, working application structure with pre-configured routing, layout components, plugin registration, and standalone development support.
Overview
This template serves as the starting point for all new FlowState micro-applications. Rather than starting from scratch, developers copy this package and customize it to create new apps with consistent patterns and architecture.
Key Features
- Complete App Structure: Pre-configured routing with React Router v6
- FlowState Framework Integration: Uses
FlowstateAppContainerandFlowstateAppLayout - Plugin Architecture: Ready-to-use plugin registration for the host container
- Dual-Mode Support: Works both standalone (for development) and embedded (in host app)
- Shared Components: Header and Sidebar using framework components
- Tailwind CSS: Pre-configured styling with utility classes
- Development Server: Vite-powered dev server with HMR
- Build System: tsup for efficient bundling with ESM and CJS outputs
Target Users
| User Type | Primary Use Cases |
|---|---|
| FlowState Developers | Create new micro-applications from this template |
| App Maintainers | Reference structure for updating existing apps |
| Contributors | Understand app architecture patterns |
Quick Links
- Template Structure - Detailed structure and customization guide
Getting Started
Creating a New App
- Use the FlowState CLI to scaffold a new app:
flowstate create-app your-app --verbose
This creates packages/apps/flowstate-app-your-app/ with all the boilerplate structure and configuration.
- Rename boilerplate references:
grep -r "Boilerplate\|boilerplate" packages/apps/flowstate-app-your-app/
Update all files with "Boilerplate" to use your app name.
Customize the application:
- Update
src/App.tsxwith your routes - Modify
src/components/Sidebar.tsxwith your navigation - Replace
src/pages/HomePage.tsxwith your landing page - Choose an appropriate icon from Lucide
- Update
Install and run:
yarn install
cd packages/apps/flowstate-app-your-app
yarn dev
See Getting Started for the complete integration guide including Next.js and Electron container setup.
Development Mode
Run the app standalone for development:
yarn dev
This starts a Vite dev server at http://localhost:3210 with hot module replacement.
Building for Production
yarn build
Outputs to dist/ with ESM, CJS, and TypeScript declarations.
App Identity
| Property | Value |
|---|---|
| Package | @epicdm/flowstate-app-boilerplate |
| Base Path | /apps/boilerplate |
| Dev Port | 3210 |
| Icon | box |
| Color | #64748B |
Related Packages
- @epicdm/flowstate-app-framework - App container and shared components
- @epicdm/db-collections - Database schemas
- @epicdm/flowstate-rxdb-react - Reactive database hooks