Project Structure
Understanding the project structure will help you navigate and customize SaaSKit effectively.
Directory Overview
astro-saas-landing-kit/
βββ public/ # Static assets
βββ src/
β βββ components/ # Reusable components
β βββ content/ # Content collections
β βββ layouts/ # Page layouts
β βββ pages/ # Route pages
β βββ styles/ # Global styles
β βββ utils/ # Utility functions
β βββ config.ts # Site configuration
βββ astro.config.mjs # Astro configuration
βββ tailwind.config.mjs # Tailwind configuration
βββ package.json # Dependencies
Key Directories
/public
Static files served as-is:
- Images (
/images/) - Favicon (
/favicon.svg) - robots.txt
- Any other static assets
/src/components
Reusable components organized by type:
components/
βββ backgrounds/ # Background components
βββ heros/ # Hero section variants
βββ sections/ # Content sections
βββ Header.astro # Site header
βββ Footer.astro # Site footer
βββ ...
Component Types:
.astro- Astro components (server-rendered).tsx- React components (client-side interactivity)
/src/content
Content collections using Astroβs content system:
content/
βββ blog/ # Blog posts
β βββ *.md
βββ docs/ # Documentation
βββ getting-started/
βββ components/
βββ guides/
βββ api/
/src/layouts
Page layout templates:
BaseLayout.astro- Main layout with header/footer
/src/pages
File-based routing. Each file becomes a route:
index.astroβ/about.astroβ/aboutblog.astroβ/blogblog/[...slug].astroβ/blog/*(dynamic)
/src/styles
Global styles:
global.css- Global styles and Tailwind directives
/src/utils
Utility functions:
images.ts- Image helper functions
File Naming Conventions
Pages
- Use kebab-case:
about-us.astro - Dynamic routes:
[...slug].astroor[id].astro
Components
- PascalCase:
HeroSection.tsxorHeroSection.astro - Descriptive names
Content
- kebab-case:
getting-started.md - Organized in folders by category
Configuration Files
astro.config.mjs
Astro framework configuration:
- Integrations (React, Tailwind, etc.)
- Site URL
- Build options
tailwind.config.mjs
Tailwind CSS configuration:
- Theme customization
- Color palette
- Typography
- Plugins
tsconfig.json
TypeScript configuration:
- Compiler options
- Path aliases
- Type definitions
Import Paths
Absolute Imports
import Component from '../components/Component';
Content Collections
import { getCollection } from 'astro:content';
const posts = await getCollection('blog');
Config
import { siteConfig } from '../config';
Best Practices
- Organize by Feature - Group related components
- Reusable Components - Keep components generic
- Consistent Naming - Follow naming conventions
- Type Safety - Use TypeScript interfaces
- Documentation - Comment complex logic
Next Steps
- Configuration Guide - Configure your project
- Components Overview - Explore components
- Customization - Start customizing
Structure understood! Youβre ready to navigate the codebase. πΊοΈ