Skip to content

Commit 69448b8

Browse files
committed
Add WARP.md configuration file
- Comprehensive development commands and scripts - Architecture overview with i18n and data-driven structure - Automation features documentation (QR codes, PDF generation, CI/CD) - Development workflow guidelines for content updates - File structure and path aliases documentation
1 parent 05e96fe commit 69448b8

File tree

1 file changed

+161
-0
lines changed

1 file changed

+161
-0
lines changed

WARP.md

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
# WARP.md
2+
3+
This file provides guidance to WARP (warp.dev) when working with code in this repository.
4+
5+
## Project Overview
6+
This is a multilingual portfolio website built with Astro, showcasing professional experience, projects, skills, and education. The project is based on a template by Midudev and features Spanish/English internationalization with automated PDF CV generation and QR code creation for projects.
7+
8+
## Development Commands
9+
10+
### Core Development
11+
```bash
12+
# Start development server
13+
npm run dev
14+
15+
# Build for production (includes type checking)
16+
npm run build
17+
18+
# Preview production build
19+
npm run preview
20+
21+
# Type checking only
22+
npx astro check
23+
```
24+
25+
### Utility Scripts
26+
```bash
27+
# Generate QR codes for all project GitHub links
28+
npm run GQR
29+
30+
# Generate PDF versions of CV pages (Spanish and English)
31+
npm run GPDF
32+
```
33+
34+
### Project Structure Commands
35+
```bash
36+
# View all source files
37+
find src -name "*.astro" -o -name "*.js" -o -name "*.ts" | head -20
38+
39+
# Check configuration files
40+
ls *.config.* *.json
41+
```
42+
43+
## Architecture Overview
44+
45+
### Internationalization System
46+
- **Default Locale**: Spanish (`es`) with English (`en`) support
47+
- **Routing**: Prefix-based routing with Spanish as prefixed default
48+
- **Content Structure**: Centralized in `src/cv_info/cv.js` with language-specific exports (`es`, `en`)
49+
- **Pages**: Separate locale-specific files in `src/pages/[locale]/`
50+
51+
### Configuration Management
52+
- **Environment-aware config**: `config.js` handles dev/prod URL differences
53+
- **Production URLs**: `https://portafolio.daaptech.org/`
54+
- **Development URLs**: `http://localhost:4321/`
55+
56+
### Content Architecture
57+
The portfolio follows a data-driven architecture:
58+
59+
1. **Central Data Store** (`src/cv_info/cv.js`):
60+
- Contains all personal information, experience, projects, skills
61+
- Exports `es` and `en` objects for both languages
62+
- Handles dynamic URL generation for QR codes and PDFs
63+
64+
2. **Language-Specific Configurations** (`src/cv_info/es.js`, `src/cv_info/en.js`):
65+
- Import data from central store
66+
- Configure navigation, sections, and UI elements
67+
- Export structured objects for page consumption
68+
69+
3. **Component-Based Sections**:
70+
- `Hero.astro`: About me section with social links
71+
- `Experience.astro`: Professional work history
72+
- `Projects.astro`: Project showcase with GitHub links
73+
- `Publications.astro`: Academic publications
74+
- `Education.astro`: Educational background
75+
- `AllSkills.astro`: Technical and personal skills
76+
- `Certificados.astro`: Certifications and courses
77+
78+
### Path Aliases
79+
- `@/*`: Maps to `src/*`
80+
- `@cv/*`: Maps to `src/cv_info/*`
81+
82+
### Automation Features
83+
84+
#### QR Code Generation
85+
- **Script**: `src/scripts/url_to_qr.js`
86+
- **Purpose**: Generates QR codes for project GitHub links and certificate links
87+
- **Output**: `public/img/qr/` directory
88+
- **Triggered by**: `npm run GQR`
89+
90+
#### PDF CV Generation
91+
- **Script**: `src/scripts/pdf_cv.js`
92+
- **Purpose**: Uses Puppeteer to generate PDF versions of CV pages
93+
- **Output**: `public/docs/CV_EN.pdf` and `public/docs/CV_ESP.pdf`
94+
- **Features**: Custom headers/footers, print-optimized styling
95+
- **Triggered by**: `npm run GPDF`
96+
97+
#### CI/CD Pipeline
98+
- **File**: `.github/workflows/deploy.yml`
99+
- **Triggers**:
100+
- Push to `cloud_version` branch
101+
- Changes to CV-related files (`src/cv_info/cv.js`, CV Astro pages)
102+
- **Process**:
103+
1. Detects changes in CV files
104+
2. Builds site and starts preview server
105+
3. Generates fresh PDFs
106+
4. Commits updated PDFs back to repository
107+
5. Deploys to Cloudflare
108+
109+
### Styling System
110+
- **Framework**: Tailwind CSS with dark mode support
111+
- **Font**: Onest Variable font family
112+
- **Theme**: Responsive design with glass morphism effects
113+
- **Dark Mode**: Automatic system preference detection
114+
115+
## Important File Locations
116+
117+
### Core Content
118+
- `src/cv_info/cv.js` - Central data store for all content
119+
- `config.js` - Environment-specific configuration
120+
121+
### Automation Scripts
122+
- `src/scripts/url_to_qr.js` - QR code generation
123+
- `src/scripts/pdf_cv.js` - PDF CV generation
124+
125+
### Generated Assets
126+
- `public/img/qr/` - Generated QR codes
127+
- `public/docs/` - Generated PDF CVs
128+
- `public/img/projects/` - Project images
129+
130+
### Key Configuration Files
131+
- `astro.config.mjs` - Astro configuration with i18n setup
132+
- `tailwind.config.mjs` - Tailwind CSS configuration
133+
- `tsconfig.json` - TypeScript configuration with path aliases
134+
135+
## Development Notes
136+
137+
### Content Updates
138+
When updating CV content:
139+
1. Modify `src/cv_info/cv.js` for the source data
140+
2. Run `npm run GQR` to update QR codes if URLs changed
141+
3. Run `npm run GPDF` to regenerate PDF CVs
142+
4. The CI/CD pipeline will automatically handle this in production
143+
144+
### Adding New Projects
145+
Projects are defined in the `proyectos` array within `cv.js`. Each project should include:
146+
- `title`, `description`, `github` (for QR generation), `image`, `qr` (path)
147+
148+
### Language Support
149+
To add content in a new language:
150+
1. Add locale to `astro.config.mjs`
151+
2. Create new data export in `cv.js`
152+
3. Create corresponding configuration file in `cv_info/`
153+
4. Add new page routes in `src/pages/[locale]/`
154+
155+
### Local Development Tips
156+
- Use `npm run preview` to test production builds locally
157+
- PDF generation requires the server to be running
158+
- QR codes are generated to `public/img/qr/` and referenced in the data files
159+
160+
## Production Deployment
161+
The site deploys to `https://portafolio.daaptech.org/` via Cloudflare, with automatic PDF regeneration when CV content changes.

0 commit comments

Comments
 (0)