A modern monorepo with Next.js, shadcn/ui, and a clean application template.
synapp/
├── apps/
│ ├── template/ # Clean, unopinionated Next.js template
│ ├── portal/ # Your main application
│ └── web/ # Web application
├── packages/
│ ├── ui/ # Shared UI components (shadcn/ui)
│ ├── eslint-config/ # Shared ESLint configuration
│ └── typescript-config/ # Shared TypeScript configuration
└── create-app.js # Script to create new apps from template
Use the template to quickly create new applications:
# Create a new app from the template
node create-app.js my-new-app
# Navigate to your new app
cd apps/my-new-app
# Set up environment variables
cp env.example .env.local
# Install dependencies (if needed)
pnpm install
# Start development server
pnpm devThe template includes:
- Next.js 14 with App Router
- TypeScript for type safety
- Tailwind CSS for styling
- Zustand for state management
- React Query (TanStack Query) for data fetching
- Supabase for authentication and database
- Shadcn/ui components
- React Hook Form with Zod validation
- ESLint and Prettier for code quality
To add components to your app, run the following command at the root of your app:
pnpm dlx shadcn@latest add button -c apps/your-app-nameThis will place the ui components in the packages/ui/src/components directory.
To use the components in your app, import them from the ui package:
import { Button } from "@workspace/ui/components/button";# Install dependencies
pnpm install
# Start all apps in development mode
pnpm dev
# Build all apps
pnpm build
# Lint all apps
pnpm lintThe template is designed to be unopinionated. You can:
- Set up Supabase types using the instructions in
types/supabase.ts - Uncomment auth logic in the components when ready
- Replace example endpoints in the API client with real ones
- Customize the UI and add your specific business logic
See the template's README (apps/template/README.md) for detailed documentation.