2025-10-20 08:54:21 +01:00
# CV Site - Go + HTMX
2025-11-09 11:42:52 +00:00
[](https://go.dev/)
[](https://htmx.org/)
[](LICENSE)
2025-10-20 08:54:21 +01:00
**Modern, minimal curriculum vitae website ** for Juan Andrés Moreno Rubio built with **Go ** and **HTMX ** .
2025-11-09 14:13:22 +00:00
A professional, bilingual CV site with server-side PDF generation, HTMX interactivity, and a clean paper design aesthetic. Built as a personal portfolio project showcasing production-grade Go and HTMX development.
2025-11-09 11:42:52 +00:00
2025-11-09 13:54:31 +00:00
## 📌 Project Status
2025-11-09 14:13:22 +00:00
**This is a personal portfolio project ** demonstrating production-grade Go and HTMX development.
2025-11-09 13:54:31 +00:00
2025-11-09 14:22:37 +00:00
**Open Source: ** The code is MIT licensed and available for educational purposes. You're welcome to use it as a template or reference for your own projects. This repository is maintained as my personal CV site and may be modified without notice.
2025-11-09 13:54:31 +00:00
2025-11-09 20:51:45 +00:00
**Contributions: ** This is a personal CV project and is feature-complete. I'm not seeking contributions, but you're welcome to use it as a template! If you find a critical security vulnerability, please follow the [SECURITY.md ](doc/SECURITY.md ) process.
2025-11-09 13:54:31 +00:00
2025-11-09 11:42:52 +00:00
## 📑 Table of Contents
- [Features ](#-features )
- [Demo ](#-demo )
- [Quick Start ](#-quick-start )
- [Updating Your CV ](#-updating-your-cv )
- [Export to PDF ](#-export-to-pdf )
- [Key Technologies ](#-key-technologies )
- [Documentation ](#-documentation )
- [Deployment ](#-deployment )
- [Customization ](#-customization )
2025-11-09 19:33:20 +00:00
- [Privacy & Analytics ](#-privacy--analytics )
2025-11-09 11:42:52 +00:00
- [Contributing ](#-contributing )
- [License ](#-license )
- [Support ](#-support )
2025-10-20 08:54:21 +01:00
## 🚀 Features
- ✅ **Bilingual Support ** - Spanish and English with instant switching (no page reload)
2025-11-05 12:15:43 +00:00
- ✅ **Server-Side PDF Export ** - Professional PDF generation using chromedp (headless Chrome)
- ✅ **Browser Print ** - Alternative print-friendly layout for manual PDF creation
2025-10-20 08:54:21 +01:00
- ✅ **HTMX Dynamic Updates ** - Smooth UX without heavy JavaScript
- ✅ **Paper Design ** - Professional CV on elegant white paper with gray background
2025-11-17 17:03:17 +00:00
- ✅ **Zoom Control ** - Adjustable zoom (25%-300%) with persistence across sessions
2025-10-20 08:54:21 +01:00
- ✅ **Responsive ** - Mobile, tablet, and desktop friendly
- ✅ **JSON-Based Content ** - Easy to update without touching code
- ✅ **AI Development Section ** - Showcases modern AI-assisted development skills
2025-11-05 12:15:43 +00:00
- ✅ **Fast & Lightweight ** - Go backend with chromedp for PDF generation
2025-11-12 16:04:43 +00:00
- ✅ **Privacy-Friendly Analytics ** - Self-hosted analytics (no third-party data sharing)
2025-11-09 14:13:22 +00:00
- ✅ **Security Hardened ** - CSP headers, XSS protection, origin validation, rate limiting
2025-11-09 13:54:31 +00:00
- ✅ **Production Ready ** - Systemd service, CI/CD workflows, deployment guides
2025-11-09 11:42:52 +00:00
- ✅ **Developer Friendly ** - Hot reload, clear code structure, comprehensive Makefile
## 📸 Demo
2025-11-10 19:34:55 +00:00
🔗 **Live Demo: ** [https://juan.andres.morenorub.io/ ](https://juan.andres.morenorub.io/ )
2025-11-09 11:42:52 +00:00
**Live Features: **
- Single-page application with no page reloads
- Instant language switching (English ↔ Spanish)
- Professional PDF export with perfect font rendering
- Responsive design from mobile to desktop
- Clean paper aesthetic on gray background
- Print-friendly layouts
2025-11-09 14:13:22 +00:00
**Note: ** This is my personal CV site. The code is open source for learning and reference purposes.
2025-10-20 08:54:21 +01:00
2025-11-09 14:13:22 +00:00
## 📋 Running Locally
If you want to explore the code or run it locally:
2025-10-20 08:54:21 +01:00
### Prerequisites
- **Go 1.21+** installed
2025-11-09 11:42:52 +00:00
- **Chrome/Chromium** (for PDF generation)
2025-11-09 14:13:22 +00:00
- **Make** (optional, for easier development)
2025-10-20 08:54:21 +01:00
2025-11-09 14:13:22 +00:00
### Local Development
2025-10-20 08:54:21 +01:00
\`\`\`bash
2025-11-09 14:13:22 +00:00
# Download the code
git clone https://github.com/txemac/cv.git
2025-11-09 11:42:52 +00:00
cd cv
# Option 1: Using Make (recommended)
make dev
# Option 2: Using Go directly
go run main.go
# Option 3: Build and run binary
2025-10-20 08:54:21 +01:00
go build -o cv-server && ./cv-server
\`\`\`
2025-11-09 11:42:52 +00:00
### Access the Site
2025-10-20 08:54:21 +01:00
2025-11-09 11:42:52 +00:00
Open **http://localhost:1999 ** in your browser
- 🇬🇧 **English version: ** http://localhost:1999/?lang=en
- 🇪🇸 **Spanish version: ** http://localhost:1999/?lang=es
**Language switching ** is instant via HTMX - no page reload required!
2025-10-20 08:54:21 +01:00
## 📄 Updating Your CV
Edit JSON files in `data/` :
- **English**: `data/cv-en.json`
- **Spanish**: `data/cv-es.json`
No code changes needed - just refresh browser!
## 🖨️ Export to PDF
2025-11-05 12:15:43 +00:00
### Server-Side PDF Generation (Recommended)
1. Click * * "Download as PDF"** button in the action bar
2. PDF is generated server-side using headless Chrome
3. File downloads automatically: `CV-Juan-Andres-Moreno-Rubio-{lang}.pdf`
**Advantages: **
- Consistent rendering across all platforms
- Perfect font rendering
- No browser compatibility issues
- Professional quality output
### Browser Print (Alternative)
1. Click * * "Print Friendly"** button
2. Use browser print dialog (Cmd/Ctrl + P)
3. Select "Save as PDF"
**Endpoints: **
- English PDF: `http://localhost:1999/export/pdf?lang=en`
- Spanish PDF: `http://localhost:1999/export/pdf?lang=es`
2025-10-20 08:54:21 +01:00
## 🎯 Key Technologies
2025-11-09 11:42:52 +00:00
- **Backend:** Go 1.21+ (stdlib `net/http` , graceful shutdown)
- **PDF Generation:** chromedp (headless Chrome automation)
- **Frontend:** HTMX 1.9.10 (hypermedia-driven interactions)
- **Styling:** Custom CSS with Quicksand font from Google Fonts
- **Data:** JSON files for easy content management
2025-11-09 13:54:31 +00:00
- **Deployment:** Systemd service, manual binary, GitHub Actions CI/CD
2025-11-09 11:42:52 +00:00
## 📚 Documentation
2025-11-12 16:04:43 +00:00
This project includes comprehensive documentation organized by purpose:
### 📖 Getting Started
- **[README.md ](README.md )** - Project overview, quick start, and features (you are here)
- **[DEPLOYMENT.md ](doc/DEPLOYMENT.md )** - Production deployment guides for VPS and cloud platforms
- **[CUSTOMIZATION.md ](doc/CUSTOMIZATION.md )** - How to customize this CV template for your own use
### 🔧 Technical Reference
- **[ARCHITECTURE.md ](doc/ARCHITECTURE.md )** - System design, patterns, and technical decisions
- **[API.md ](doc/API.md )** - Complete HTTP API reference and HTMX integration
### 📋 Policies & Standards
- **[SECURITY.md ](doc/SECURITY.md )** - Security policy, vulnerability reporting, and best practices
- **[PRIVACY.md ](doc/PRIVACY.md )** - Privacy policy template and analytics guidance
- **[CODE_OF_CONDUCT.md ](CODE_OF_CONDUCT.md )** - Community standards (Contributor Covenant)
- **[CONTRIBUTING.md ](CONTRIBUTING.md )** - Contribution policy (personal project notice)
### 📄 License
2025-11-09 11:42:52 +00:00
- **[LICENSE ](LICENSE )** - MIT License
## 🚀 Deployment
2025-11-09 20:51:45 +00:00
This project is production-ready with multiple deployment options. See * * [DEPLOYMENT.md ](doc/DEPLOYMENT.md )** for complete guides.
2025-11-09 11:42:52 +00:00
### Systemd Service
\`\`\`bash
# Install as systemd service
make install-service
# Update running service
make update-service
\`\`\`
### Manual Deployment
\`\`\`bash
# Build optimized binary
make build
# Run in production mode
GO_ENV=production ./cv-server
\`\`\`
2025-11-09 13:54:31 +00:00
### Cloud Platforms
Deployment guides available for:
- **Fly.io** - Complete fly.toml configuration
- **Google Cloud Run** - Container deployment
- **AWS ECS** - Task definitions
- **Railway / Render** - Auto-deploy configs
2025-11-09 20:51:45 +00:00
**See [DEPLOYMENT.md](doc/DEPLOYMENT.md) for detailed instructions. **
2025-11-09 13:54:31 +00:00
2025-11-09 11:42:52 +00:00
**Environment Configuration: ** Copy `.env.example` to `.env` and customize:
- `PORT` - Server port (default: 1999)
- `GO_ENV` - Environment (development/production)
- `TEMPLATE_HOT_RELOAD` - Enable template hot-reload in development
2025-11-09 20:51:45 +00:00
**Security: ** See [SECURITY.md ](doc/SECURITY.md ) for production deployment best practices.
2025-11-09 11:42:52 +00:00
## 🎨 Customization
2025-11-09 20:51:45 +00:00
**Want to use this template for your own CV? ** See * * [CUSTOMIZATION.md ](doc/CUSTOMIZATION.md )** for the complete guide!
2025-11-09 11:42:52 +00:00
2025-11-09 13:54:31 +00:00
### Quick Start Customization
2025-11-09 11:42:52 +00:00
2025-11-09 13:54:31 +00:00
1. **Update Content: ** Edit `data/cv-en.json` and `data/cv-es.json` with your information
2. **Customize Styling: ** Modify `static/css/main.css` (colors, fonts, layout)
3. **Adjust Templates: ** Edit files in `templates/` directory
4. **Add Sections: ** Update `internal/models/cv.go` and JSON files
2025-11-09 11:42:52 +00:00
2025-11-09 20:51:45 +00:00
The [CUSTOMIZATION.md ](doc/CUSTOMIZATION.md ) guide includes:
2025-11-09 13:54:31 +00:00
- Complete JSON schema documentation
- Visual customization (colors, fonts, layout)
- Template modification examples
- Adding new languages
- Advanced customization patterns
2025-11-09 11:42:52 +00:00
2025-11-09 19:33:20 +00:00
## 🔒 Privacy & Analytics
2025-11-12 16:04:43 +00:00
This site demonstrates self-hosted analytics implementation for privacy-conscious tracking.
2025-11-09 19:33:20 +00:00
2025-11-12 16:04:43 +00:00
**Key features: **
- Self-hosted analytics (no third-party data sharing)
- Privacy-friendly (respects Do Not Track)
- Fully configurable
2025-11-09 19:33:20 +00:00
2025-11-12 16:04:43 +00:00
See * * [PRIVACY.md ](doc/PRIVACY.md )** for complete privacy policy template.
2025-11-09 19:33:20 +00:00
---
2025-11-09 13:54:31 +00:00
## 🤝 Using This Template
2025-11-09 11:42:52 +00:00
2025-11-09 13:54:31 +00:00
**This project is open-source and available for you to use! **
2025-11-09 11:42:52 +00:00
2025-11-12 16:04:43 +00:00
**If you use this as a template, you should: **
1. Review the analytics implementation in `templates/index.html`
2. Either configure your own analytics server or remove the tracking code
3. Update CSP headers in `internal/middleware/security.go` accordingly
4. Customize `PRIVACY.md` with your own privacy policy
See * * [CUSTOMIZATION.md ](doc/CUSTOMIZATION.md#analytics-configuration )** for detailed analytics configuration
2025-11-09 19:33:20 +00:00
**Other recommended changes: **
- Update all personal information in `data/cv-en.json` and `data/cv-es.json`
- Replace profile photo in `static/images/profile/`
- Update `ALLOWED_ORIGINS` in `.env` for API protection
- Customize colors and branding in `static/css/main.css`
2025-11-09 11:42:52 +00:00
2025-11-09 20:51:45 +00:00
See * * [CUSTOMIZATION.md ](doc/CUSTOMIZATION.md )** for the complete customization guide.
2025-11-09 11:42:52 +00:00
## 📄 License
This project is licensed under the **MIT License ** - see the [LICENSE ](LICENSE ) file for details.
**TL;DR: ** You can use this template for your own CV site, modify it, and distribute it. Just keep the original copyright notice.
2025-11-09 13:54:31 +00:00
## 💬 Questions or Issues?
2025-11-09 11:42:52 +00:00
2025-11-09 13:54:31 +00:00
- **Questions:** Feel free to fork and modify - this is a template!
2025-11-09 20:51:45 +00:00
- **Security Issues:** See [SECURITY.md ](doc/SECURITY.md ) for reporting security vulnerabilities
- **Documentation:** Check [CUSTOMIZATION.md ](doc/CUSTOMIZATION.md ) and [DEPLOYMENT.md ](doc/DEPLOYMENT.md )
2025-11-09 11:42:52 +00:00
## 🙏 Acknowledgments
- **HTMX** - For making hypermedia-driven applications enjoyable
- **chromedp** - For reliable headless Chrome automation
- **Go Community** - For excellent standard library and tooling
- **AI Assistance** - For accelerating development and documentation
2025-10-20 08:54:21 +01:00
---
**Built with ❤️ using Go, HTMX, and AI assistance **