⚠️ IMPORTANT: This is a scaffolding project template for websites. It should be forked or copied by systems using this as a template. Do not clone and push changes to this repo unless you intend to change the template.
This repository serves as a comprehensive template for building modern, performant websites using Astro.js with TypeScript, Tailwind CSS, and atomic component design principles. It includes a complete development workflow with constitution-driven standards and automated tooling.
- Click the "Use this template" button on GitHub
- Create a new repository from this template
- Clone your new repository
- Follow the setup instructions below
- Fork this repository to your organization
- Clone the forked repository
- Follow the setup instructions below
- Download or clone this repository
- Copy the files to your new project directory
- Remove the
.gitdirectory and initialize a new repository - Follow the setup instructions below
- Framework: Astro.js - Modern static site generator
- Language: TypeScript with strict type checking
- Styling: Tailwind CSS with atomic design principles
- Testing: Snapshot testing for rendered pages
- Linting: ESLint with Airbnb standards
- Architecture: Atomic component design (atoms → molecules → organisms → templates → pages)
astro-agent-template/
├── .specify/ # Development workflow templates
│ ├── memory/
│ │ └── constitution.md # Project constitution and standards
│ ├── templates/ # Template files for planning
│ └── scripts/ # Automation scripts
├── .cursor/ # Cursor IDE commands
├── src/
│ ├── components/ # Atomic component hierarchy
│ │ ├── atoms/ # Basic building blocks
│ │ ├── molecules/ # Simple component combinations
│ │ ├── organisms/ # Complex UI sections
│ │ └── templates/ # Page layouts
│ ├── pages/ # Astro pages
│ ├── styles/ # Global styles
│ └── utils/ # Utility functions
├── tests/ # Snapshot tests
└── README.md
This template includes a constitution-driven development workflow with the following commands:
/speckit.specify- Create feature specifications/speckit.plan- Generate implementation plans/speckit.tasks- Create actionable task lists/speckit.constitution- Update project standards
- Clear hierarchy: atoms → molecules → organisms → templates → pages
- Self-contained, reusable components
- Single responsibility principle
- Maximum 200 lines per component
- Strict type checking enabled
- No
anytypes without justification - ESLint with Airbnb standards
- Comprehensive type documentation
- Test-driven development approach
- Snapshot tests for all pages and components
- Tests written before implementation
- Intentional test updates only
- Utility-first styling approach
- Mobile-first responsive design
- Consistent design tokens
- No custom CSS except where necessary
- Server-side rendering by default
- Static generation preferred
- Framework islands for interactivity
- Performance budget compliance
- Node.js 18+
- npm or yarn
- Git
-
Clone your new repository:
git clone <your-repo-url> cd <your-project-name>
-
Install dependencies:
npm install # or yarn install -
Start development server:
npm run dev # or yarn dev -
Open your browser: Navigate to
http://localhost:4321
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run lint- Run ESLintnpm run test- Run snapshot testsnpm run test:update- Update snapshots
This template uses snapshot testing as the primary testing strategy:
# Run all tests
npm run test
# Update snapshots (use with caution)
npm run test:update
# Run tests in watch mode
npm run test:watch- First Contentful Paint: < 1.5s
- Largest Contentful Paint: < 2.5s
- Cumulative Layout Shift: < 0.1
- First Input Delay: < 100ms
- Bundle Size: < 100KB gzipped per page
The template follows atomic design principles with Tailwind CSS:
- Atoms: Buttons, inputs, labels, icons
- Molecules: Search forms, navigation items, cards
- Organisms: Headers, sidebars, content areas
- Templates: Page layouts without content
- Pages: Specific instances with real content
- Astro.js Documentation
- Tailwind CSS Documentation
- TypeScript Documentation
- Atomic Design Methodology
If you want to contribute to the template:
- Fork this repository
- Create a feature branch
- Make your changes
- Submit a pull request
This template is provided under the MIT License. See the LICENSE file for details.
For questions about using this template:
- Check the Issues for common questions
- Create a new issue if your question isn't answered
- For template improvements, follow the contributing guidelines above
To get the latest template updates:
- Check the releases for new versions
- Compare your fork with the template
- Merge or cherry-pick desired changes
- Update your project accordingly
Remember: This is a template repository. Use it as a starting point for your projects, not as a project to contribute to directly.