Overview
CV Staff Web follows a standard Astro project structure with clear separation between public assets, source code, and configuration files. The project is organized to maximize maintainability and developer experience.Root Directory Structure
Public Directory
Thepublic/ directory contains static assets that are served directly without processing.
Files in the
public/ directory are served at the root URL path. For example, public/favicon.svg is accessible at /favicon.svg.Source Directory
Thesrc/ directory contains all processed source code organized by function:
Assets Directory
Contains SVG files and other assets that are processed during the build:Data Directory
Stores JSON data files used throughout the application:Layouts Directory
Contains base layout templates that wrap page content:Layout.astro file provides:
- HTML document structure
- Meta tags and SEO configuration
- Global CSS imports
- Font loading
- Script initialization
- Accessibility features (skip links)
Pages Directory
Contains route files that define the site’s pages:Astro uses file-based routing. Each
.astro file in pages/ becomes a route. The index.astro file maps to the root / route.Styles Directory
Global CSS files for baseline styles:Configuration Files
astro.config.mjs
Configures Astro build settings and integrations:package.json
Defines project dependencies and scripts:tsconfig.json
TypeScript configuration for type checking:Key Dependencies
Astro
Static site generator and web framework - v5.7.13
GSAP
Animation library for scroll-triggered effects - v3.14.2
Swiper
Touch slider for photo carousel - v11.2.6
Onest Font
Variable font for typography - v5.2.8
File Organization Best Practices
When to use public/ vs src/assets/
When to use public/ vs src/assets/
- public/: Use for large static files, favicons, robots.txt, or files that need specific URLs
- src/assets/: Use for images and assets that should be optimized during build
Component vs Section organization
Component vs Section organization
- components/: Small, reusable UI elements (buttons, cards, badges)
- sections/: Large, page-specific sections (hero, footer, contact)
Script organization
Script organization
- Each major feature gets its own file in
src/scripts/ - Generic utilities go in
app.js - Feature-specific scripts (animations, cursor, color transitions) are separate modules
Next Steps
Components Architecture
Learn about the reusable component system
Sections Architecture
Explore how page sections are structured
Scripts Architecture
Understand client-side JavaScript organization
Quick Start Guide
Set up your development environment