cleanup + docs: remove marketing leftovers, full PROMPTS.md, CLAUDE.md
Deleted (live in gov-agreg repo): - src/lib/auth-queries.ts, supabase.ts, platform-queries.ts (marketing only) - src/pages/api/auth/, platform/, traducator.ts Added: - PROMPTS.md: §0 vreau.digital context + full historic (sections §0a-§0e from gov-agreg pre-split — 1367 lines preserved as "Istoric sesiuni") - CLAUDE.md: vreau.digital scope, 17 data sources table, deploy, sister project link Memory dir bootstrapped at ~/Code/claude-memory/projects/vreau-digital/memory/ with 23 .md files (all relevant context from gov-agreg). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,35 +1,90 @@
|
||||
# vreau.digital — Platformă de transparență achiziții publice
|
||||
|
||||
## Context
|
||||
## Ce e proiectul
|
||||
|
||||
Spin-off din `gov-agreg` (vreaudigital.ro). Acest repo conține platforma standalone de transparență achiziții publice România.
|
||||
Platforma standalone de transparență pentru achizițiile publice din România. Agregator cross-source via CUI pe 17 surse publice (SEAP, ANAF, ANRE, ANCOM, ASF, AAAS, AEP, CNSC, Curtea Conturi, RegAS, bugetar, ONRC, AFIR, fonduri-ue, CNAS, APIA, GNM).
|
||||
|
||||
- **Domain**: https://vreau.digital
|
||||
- **Hub marketing**: https://vreaudigital.ro (rămâne gov-agreg)
|
||||
- **Backend partajat**: PostgreSQL satra, Photon, Martin (același cluster ca gov-agreg)
|
||||
**Spin-off din `gov-agreg` (vreaudigital.ro)** — vreaudigital.ro rămâne hub-ul de marketing/discoverability. Vreau.digital e produsul real, live, cu DB conectat.
|
||||
|
||||
## Stack
|
||||
|
||||
- Astro 5 + React 19 + Tailwind 3 + Node @astrojs/node standalone
|
||||
- PostgreSQL @ satra:5432 (schemas: seap, firms, anaf, anre, ancom, asf, aaas, aep, cnsc, curteacont, bugetar, regas, fonduri, cnas, apia, gnm, public_kpi)
|
||||
- Astro 5 + React 19 + Tailwind 3.4 (NU v4) + Node @astrojs/node standalone
|
||||
- PostgreSQL 17 @ satra:5432 (17+ schemas + public_kpi snapshots)
|
||||
- MapLibre 5 + Martin tile server @ 10.10.10.166:3010
|
||||
- Docker container @ satra:5096 → Traefik @ proxy 10.10.10.199 → vreau.digital (Cloudflare proxied)
|
||||
- Photon geocoder daemon @ satra:2322
|
||||
- Docker container @ satra:5096 → Traefik @ proxy 10.10.10.199 → Cloudflare → vreau.digital
|
||||
|
||||
## Routes (toate la rădăcină, nu /achizitii/)
|
||||
## Routes (toate la rădăcină, NU sub /achizitii/)
|
||||
|
||||
- `/` — landing page
|
||||
- `/cauta` — search SEAP
|
||||
- `/retete/[slug]` — investigative recipes (49+)
|
||||
- `/investigation/[slug]` — narrative leads (15+)
|
||||
- `/firma/[cui]`, `/autoritate/[cui]` — profile pages
|
||||
- `/red-flags` — cross-source signals
|
||||
- `/top-contracte`, `/top-firme`, `/fonduri-ue` — leaderboards
|
||||
- `/api/*` — endpoints (og, cpv, profil, etc.)
|
||||
| Route | Scop |
|
||||
|---|---|
|
||||
| `/` | landing — KPI naționale + secțiuni principale |
|
||||
| `/cauta` | search SEAP cu MapLibre map, filtre cross-source, CPV autocomplete |
|
||||
| `/retete` + `/retete/[slug]` | rețete investigative (49+) |
|
||||
| `/investigation` + `/investigation/[slug]` | pagini narative cu cifre live (15+) |
|
||||
| `/firma/[cui]`, `/autoritate/[cui]` | profile cu timeline 10 ani financiar + badges cross-source |
|
||||
| `/red-flags` | landing cross-source signals (snapshot table — 207ms) |
|
||||
| `/top-contracte`, `/top-firme`, `/fonduri-ue` | leaderboards |
|
||||
| `/azi` | activitate zilnică SEAP |
|
||||
| `/risc/*` | risk analysis (single-bidder, economii-suspect, termen-scurt, overprice) |
|
||||
| `/explorer` | data browser |
|
||||
| `/harta` | Civic OS map — bani publici per județ |
|
||||
| `/api/og/firma/[cui].png` etc. | OG image generation |
|
||||
| `/api/cpv/search` | CPV nomenclature autocomplete |
|
||||
| `/api/profil/[side]/[cui]` | JSON profile API |
|
||||
| `/api/ocds/*` | Open Contracting Data Standard endpoints |
|
||||
| `/api/harta/*` | Civic OS map data |
|
||||
| `/api/version` | deploy verification |
|
||||
|
||||
## Data sources & freshness
|
||||
|
||||
| Schema | Rows | Cadence | Live? |
|
||||
|---|---:|---|---|
|
||||
| seap.announcements | 781K+ | daily WSP scrapers (T+0) | ✓ |
|
||||
| firms.entities (ONRC) | 4.005M | monthly fresh import | ✓ |
|
||||
| firms.financials | 7.77M (10 ani, 2015-2024) | annual data.gov.ro | ✓ |
|
||||
| anaf.datornici | 47K T1 2026 LIVE | **quarterly via 2captcha** | ✓ |
|
||||
| anaf.lista_alba | 648K T1 2026 LIVE | **quarterly via 2captcha** | ✓ |
|
||||
| anre.licente | 29K | weekly | ✓ |
|
||||
| ancom.operatori | 518 | weekly | ✓ |
|
||||
| asf.entitati | 849 | weekly | ✓ |
|
||||
| aaas.firme | 11 (limit sursă) | weekly | ✓ |
|
||||
| aep.donatii_pj/pf/rvc | 380K | monthly | ✓ |
|
||||
| cnsc.decizii | 29K | weekly | ✓ |
|
||||
| curteacont.rapoarte | 1133 | weekly | ✓ |
|
||||
| regas.ajutoare | 78K | monthly | ✓ |
|
||||
| bugetar.entitate | 18K | quarterly | ✓ |
|
||||
| cnas.furnizori | 36K (50+ PDFs parse) | monthly | ✓ |
|
||||
| apia.fermieri | 191 (snapshot test) | quarterly | ✓ |
|
||||
| fonduri.beneficiar_anunt | 41K | weekly | ✓ |
|
||||
| fonduri.afir_plati | 5.33M | monthly | ✓ |
|
||||
|
||||
## Deploy
|
||||
|
||||
- CI/CD: Gitea webhook → `satra:9867/hooks/vreau-digital-deploy` → `/opt/vreau-digital/deploy.sh`
|
||||
- Build args: BUILD_SHA, BUILD_REF, BUILD_TIME → expose via /api/version
|
||||
- Secrete: Infisical Machine Identity `/vreaudigital` (DATABASE_URL, TWOCAPTCHA_KEY)
|
||||
- Verifică `/api/version` post-push
|
||||
|
||||
## Reguli operaționale
|
||||
|
||||
- Backend secrets în Infisical, path `/vreaudigital` (shared cu gov-agreg deocamdată — DATABASE_URL e identic)
|
||||
- TWOCAPTCHA_KEY pentru ANAF datornici/lista_alba scrapers
|
||||
- `npx astro check` + `npm run build` ÎNAINTE de commit
|
||||
- Push triggers webhook → satra:9867 → /opt/vreau-digital/deploy.sh
|
||||
- Verify deploy via `/api/version`
|
||||
- `npx astro check` + `npm run build` PASS înainte de commit
|
||||
- DACĂ scp pe satra → reset ÎNAINTE de push (deploy.sh git pull --ff-only fails)
|
||||
- Pre-create `/var/log/vreau-digital-*.log` cu chown bulibasa pentru scrapere noi
|
||||
- NU echo niciun secret. `$VAR` unexpanded. `--env-file` (NU `-e`)
|
||||
- DB queries: `/tmp/govq.sh` reads SQL stdin → architools_db pe satra
|
||||
- Memory: scrie DIRECT în `~/Code/claude-memory/projects/vreau-digital/memory/` + git commit + push (sync cron clobbers `~/.claude/.../memory/` every 60s)
|
||||
- systemd OnCalendar: `Sun *-*-*` (cu SPACE după ziua), NU `Sun*-*-*`
|
||||
- Comit-uri mici, focusate. NU amend.
|
||||
|
||||
## Sister project: gov-agreg (vreaudigital.ro)
|
||||
|
||||
Hub-ul de marketing/discoverability — listează produsele, idei, propuneri. Conține REDIRECTS de la /achizitii/* la vreau.digital.
|
||||
|
||||
- **Repo:** `gitadmin/gov-agreg`
|
||||
- **Domain:** `https://vreaudigital.ro`
|
||||
- **Local path:** `/home/orchestrator/Code/gov-agreg/`
|
||||
|
||||
NU atinge marketing pages (idei, despre, contribuie, produse) — alea sunt în gov-agreg.
|
||||
|
||||
Vezi `PROMPTS.md` pentru context tehnic complet + istoric sesiuni.
|
||||
|
||||
Reference in New Issue
Block a user