A minimal template for frontend projects using:
- Vite
- React 19
- TypeScript
- Tailwind CSS
- shadcn/ui
- Ladle (for component development)
- eslint
- prettier
- ⚡️ Fast development with Vite's Hot Module Replacement
- 🧩 Component-driven development with Ladle
- 🎨 Beautiful UI components with shadcn/ui and Tailwind CSS
- 📝 Type safety with TypeScript
- Node.js (v16+)
- npm or yarn
- Clone this repository or use it as a template:
# Using Git
git clone https://github.com/aag1024/agfe.git
cd agfe
# Or create a new project from this template
# (This depends on your preferred method for project initialization)- Install dependencies:
npm install
# or
yarnStart the development server:
npm run dev
# or
yarn devStart the Ladle component explorer:
npm run ladle
# or
yarn ladleBuild the application:
npm run build
# or
yarn buildBuild the Ladle component documentation:
npm run ladle:build
# or
yarn ladle:build/
├── public/ # Static assets
├── src/
│ ├── assets/ # Project assets (images, fonts, etc.)
│ ├── components/ # React components
│ │ ├── ui/ # shadcn/ui components
│ │ └── *.stories.tsx # Component stories for Ladle
│ ├── lib/ # Utility functions
│ ├── App.tsx # Main application component
│ ├── App.css # App-specific styles
│ ├── main.tsx # Application entry point
│ ├── index.css # Global CSS including Tailwind
│ └── vite-env.d.ts # Vite environment type declarations
├── .ladle/ # Ladle configuration
├── components.json # shadcn/ui configuration
├── tailwind.config.js # Tailwind CSS configuration
├── postcss.config.js # PostCSS configuration
├── tsconfig.json # TypeScript configuration
├── tsconfig.app.json # App-specific TypeScript configuration
├── tsconfig.node.json # Node-specific TypeScript configuration
├── vite.config.ts # Vite configuration
├── eslint.config.js # ESLint configuration
├── .prettierrc # Prettier configuration
├── .prettierignore # Prettier ignore rules
└── index.html # HTML entry point
This template includes a few shadcn/ui components already. To add more components:
npx shadcn add [component-name]For example:
npx shadcn add alert
npx shadcn add dropdown-menu- Create your component in
src/components/ - Create a story file with the same name ending in
.stories.tsx - View your component in Ladle with
npm run ladle
Edit tailwind.config.js to customize your design tokens.
The default shadcn/ui theme is included. You can modify colors in:
src/index.css(CSS variables)tailwind.config.js(Tailwind configuration)
This project is licensed under the MIT License - see the LICENSE file for details.