Mirror sincronizat cu repo canonic /workspace/efactura-generator. CLAUDE.md: documentat workflow sync + exclude config.json din rsync deploy. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
92 lines
4.1 KiB
Markdown
92 lines
4.1 KiB
Markdown
# CLAUDE.md
|
|
|
|
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
|
|
## Project Overview
|
|
|
|
Romfast company website (2025 version) for a Romanian ERP software company. Promotes ROA (Romfast Applications) — an ERP system covering accounting, inventory, HR, automotive service, and HORECA industries.
|
|
|
|
## Deploy
|
|
|
|
```bash
|
|
rsync -avz \
|
|
--exclude='.git' --exclude='.superdesign' --exclude='.claude' \
|
|
--exclude='verify-cleanup.sh' \
|
|
--exclude='efactura-generator/config.json' \
|
|
-e "ssh -p 7822" \
|
|
/home/moltbot/workspace/romfast-website/ \
|
|
romfastr@nl1-ss18.a2hosting.com:~/public_html/
|
|
```
|
|
|
|
- **Host:** nl1-ss18.a2hosting.com | **Port:** 7822 | **User:** romfastr
|
|
- **Document root:** `~/public_html/` — SSH key auth (no password)
|
|
- **Important:** rsync-ul NU folosește `--delete`, deci nu șterge nimic pe prod. `efactura-generator/config.json` e exclus explicit ca să nu poată fi suprascris niciodată din repo (conține `api_key` și e gestionat doar pe server).
|
|
|
|
## Sub-proiectul `efactura-generator/`
|
|
|
|
Directorul `efactura-generator/` din acest repo este o **oglindă** a proiectului canonic `/workspace/efactura-generator/` (repo separat: `git@gitea.romfast.ro:romfast/efactura-generator.git`). Sursa de adevăr e acolo.
|
|
|
|
**NU edita direct fișierele din `efactura-generator/` aici** — modificările se pierd la următorul sync. În schimb:
|
|
|
|
1. Editează în `/workspace/efactura-generator/` (repo canonic).
|
|
2. Rulează `/workspace/efactura-generator/sync-to-website.sh` care propagă schimbările în `efactura-generator/` din acest repo cu excluderile potrivite (fără `config.json`, fără Dockerfile, fără docs interne etc.).
|
|
3. Commit aici (`romfast-website`) și deploy cu rsync-ul de mai sus.
|
|
|
|
`config.json` de pe server (`~/public_html/efactura-generator/config.json`) conține `api_key` și nu e nici în repo, nici în sync — se gestionează manual pe a2hosting.
|
|
|
|
## Development
|
|
|
|
No build process. Serve locally with:
|
|
|
|
```bash
|
|
python3 -m http.server 8000
|
|
# Access at http://localhost:8000
|
|
```
|
|
|
|
The `efactura-generator/` sub-app has its own Node.js server (rulează din repo-ul canonic, nu de aici):
|
|
|
|
```bash
|
|
cd /workspace/efactura-generator && node js/server.js
|
|
# Access at http://localhost:3000
|
|
```
|
|
|
|
## Architecture
|
|
|
|
### Static Website
|
|
|
|
- **Tailwind CSS** (CDN): `<script src="https://cdn.tailwindcss.com"></script>`
|
|
- **Flowbite** (CDN): component library on top of Tailwind
|
|
- **Lucide Icons** (CDN): icon set
|
|
- **Google Fonts**: Inter (primary), Merriweather (serif), JetBrains Mono
|
|
- **`professional-theme.css`**: main custom stylesheet — CSS custom properties, soft professional blue palette, dark mode variables
|
|
- **`professional-theme.js`**: handles dark mode toggle, mobile menu, Lucide icon init, scroll/card animations
|
|
|
|
### CSS Custom Properties (professional-theme.css)
|
|
|
|
```css
|
|
:root {
|
|
--soft-professional-blue: #5288c4; /* primary */
|
|
--gentle-trust-blue: #4a7ba7; /* secondary */
|
|
--muted-accent-red: #b85555; /* accent */
|
|
--executive-navy: #2c3e50; /* text */
|
|
--navbar-bg: linear-gradient(135deg, #2c3e50, #4a7ba7);
|
|
}
|
|
```
|
|
|
|
Dark mode activated via `body.dark-mode` class — toggled by `professional-theme.js`.
|
|
|
|
### Navigation Pattern
|
|
|
|
The navbar HTML is **manually duplicated** across every page (no templating). When updating nav links, update all files. Path to CSS/JS assets is relative — top-level pages use `professional-theme.css`, subdirectory pages use `../professional-theme.css`.
|
|
|
|
### Content Structure
|
|
|
|
- `/` — homepage (`index.html`)
|
|
- `/menu/` — company pages (about, contact, support, services, jobs, references)
|
|
- `/roa/` — ROA ERP product pages (one per module)
|
|
- `/efactura-generator/` — standalone Romanian e-invoice editor (loads XML, edits, prints, exports XML)
|
|
|
|
### efactura-generator
|
|
|
|
Separate single-page app at `efactura-generator/index.html`. Has its own CSS (`styles/main.css`), JS (`js/script.js`, `js/formatter.js`, `js/print.js`), print templates (`templates/print.html`, `templates/print-compact.html`), and optional Node.js dev server (`js/server.js`). Also deployed as GitHub Pages at `romfast.github.io/efactura-generator/`.
|