Technology Stack
Chitagá Tech is built with:- Astro (v5.17.1) - Static site framework
- React (v19.2.4) - For interactive components
- TypeScript - Using strict mode configuration
- Tailwind CSS (v4.2.1) - For styling
- Framer Motion (v12.34.4) - For animations
Project Structure
The project follows this directory structure:File Naming Conventions
Components
-
Astro components: Use lowercase with hyphens or camelCase
hero.astroabout.astroservices.astro
-
React components: Use camelCase with
.jsxextensionbuttonToggle.jsxtoggleTheme.jsxScrollAnimation.jsx
-
Layouts: Use PascalCase
Layout.astro
Styles
- Use lowercase with hyphens:
global.css
TypeScript Configuration
The project uses Astro’s strict TypeScript configuration:- Type all props interfaces
- Avoid using
any - Enable strict null checks
Component Structure
Astro Components
Follow this structure for Astro components:React Components
Use functional components with hooks:Styling Guidelines
CSS Custom Properties
Use the defined CSS variables fromglobal.css:
Dark Mode
Always provide dark mode variants:Responsive Design
Use mobile-first approach with these breakpoints:Tailwind CSS
Use Tailwind utilities with@apply or directly in markup:
Global Styles
For React-rendered elements that need Astro styles, use:global():
Props and Interfaces
Type All Props
Always define TypeScript interfaces for component props:Provide Defaults
Set sensible defaults for optional props:Animation Guidelines
Use ScrollAnimation Component
For scroll-triggered animations, use theScrollAnimation wrapper:
Custom Variants
Define custom animation variants when needed:Client Directives
Use appropriate Astro client directives:client:load- For interactive components needed immediatelyclient:visible- For components that become interactive when visibleclient:idle- For lower priority interactive components
Accessibility
Semantic HTML
Use semantic HTML elements:ARIA Labels
Add ARIA labels for interactive elements:Image Alt Text
Always provide descriptive alt text:Performance Best Practices
Image Loading
- Use
loading="eager"for above-the-fold images - Use
loading="lazy"for below-the-fold images
CSS Optimization
- Use CSS custom properties for repeated values
- Minimize use of
!important - Scope styles to components when possible
JavaScript
- Keep client-side JavaScript minimal
- Use Astro’s partial hydration
- Defer non-critical scripts
Git Commit Messages
Follow this format:Add- New features or filesUpdate- Enhancements to existing featuresFix- Bug fixesRefactor- Code restructuringDocs- Documentation changesStyle- Formatting, styling changes
Code Review Checklist
Before submitting a PR, ensure:- Code follows TypeScript strict mode
- Components have proper type definitions
- Responsive design works on all breakpoints
- Dark mode styles are included
- Accessibility attributes are present
- Code is properly formatted
- No console errors in development
- Build completes successfully (
npm run build) - Commit messages follow conventions
Additional Resources
- Astro Documentation
- React Documentation
- TypeScript Handbook
- Tailwind CSS Documentation
- Framer Motion Documentation