8.9 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
What this is
ROACONT ("ROA Financiar Contabilitate") is a Visual FoxPro 9 desktop accounting
application, one product in the ROA business-software suite built by ROA Romfast SRL.
It is a thick client: VFP source (.prg, .scx, .vcx, .mnx, .frx) compiled to an
.exe, talking to an Oracle backend over ODBC/native connections. There is no web
front-end and no package-manager-based build.
This directory (D:\ROA\ROACONT) is one working copy inside a much larger D:\ROA
tree that holds dozens of sibling ROA products (ROAGEST, ROACASA, ROAAUTO, ROAMANAGER,
ROAEFACTURA, ROASAL, etc.) plus a suite-wide shared library at D:\ROA\COMUNROA.
Changes to shared code can ripple into other products — see "Shared code" below.
Version control
This is an SVN working copy, not git (svn info → ^/ROACONT/Trunk,
repository root http://svnroa:3001/svn/ROA). Use svn status, svn diff, svn commit,
svn log, etc. — git commands do not apply here.
Building / running
There is no CLI build tool. The project is compiled from inside the Visual FoxPro 9 IDE:
- Project file:
roacont.PJX/roacont.PJT(open in VFP, then Project > Build / Rebuild to produceroacont.exe). - Every
.prg/.scx/.vcx/.mnxsource file has a compiled sibling (.FXP/.SCT/.VCT/.MPR). Always edit the source file, never the compiled binary companion — the binaries are regenerated by the VFP compiler and are not meant to be hand-edited or diffed. .BAKfiles scattered throughoutPrograme/,Clase/, etc. are VFP's own editor backups, not something to restore from manually.- There are no automated tests.
COMUN/utile/Teste/test.prgandteste_roacont.prgare ad hoc manual test scripts, not a test runner.
Entry point and startup flow
Programe/roacont.prg is the application entry point (PARAMETERS tparam — a semicolon-
delimited connection string when launched by the ROA "Start" launcher). It:
- Sets the VFP environment (
SET PATH,SET CLASSLIB/SET PROCEDURE ... ADDITIVE) — this is effectively the dependency-injection root: dozens of.vcxclass libraries and.prgprocedure files are registered here in a fixed order, and later code assumes they're all loaded. New shared.prg/.vcxfiles must be registered here to be reachable app-wide. - Verifies the license/serial (
PORNIRE()— disk serial +comdir.snr+ registry key check) and that the app was launched via the suite's start mechanism (Verific_Start), unless a localdebug.txtmarker is present. - Reads
settings.ini(viagetini/setini,COMUNini helpers) for local machine config (report behavior, keepalive interval, error-reporting host, locale). - Instantiates global singleton objects that the rest of the app depends on as
PUBLIC/module globals:goConn(Oracle connect/disconnect wrapper),goExecutor(SQL exec wrapper with error handling),goExport(report/Excel export),goLocale(i18n),poLog/goLog(Log_Mesajelogging object),goApi/goMyXMLHTTP(remote error/update HTTP calls). - Sets
ON ERROR ErrorHandler(...)andON SHUTDOWNhandlers — uncaught errors are logged viagoLog, posted to a remote error endpoint (goMyXMLHTTP.postError, host fromsettings.ini[errors] host), and shown viaAMESSAGEBOX. - Creates the main
cApplicationobject (goApp) and shows the login form (COMUN\ferestre\frm_login.scx), which resolves the target company (goFirma), Oracle schema (gcS, e.g.'CONTAFIN'), and fiscal period (gnAn/gnLuna) before handing off to the main menu (Meniuri\cont2000.mpr).
Key long-lived globals to know when reading code: gcS (current Oracle schema/company),
gnAn/gnLuna (current fiscal year/month), goFirma/gnIdFirma (current company object/id),
gcAppPath/DIRGEN (app root paths), glLunaInchisa (period-closed flag that disables edit UI).
Directory layout
Programe/— top-level.prgbusiness-logic modules registered viaSET PROCEDURE ... ADDITIVEinroacont.prg(e.g.proceduri.prg,oproceduri_*.prgper functional area: incasari, casademarcat, conversie, decont, import, facturare, etc.).Clase/—.vcx/.vctVFP class libraries: base UI classes (cont2000,contab,baza), Oracle-domain classes prefixedo*(oparteneri,ovanzcump,ocasabanca,orapoarte_*,oconversii,saft_d406,anaf_efactura, ...).Ferestre/—.scx/.sctforms (data entry screens, dialogs).Meniuri/—.mnx/.mnt/.mprmenus; one.mprper top-level menu context (cont2000.mpris the main menu;casa1,banca1,capitaluri1...8, etc. are module-specific submenus/menus).Rapoarte/—.frx/.frtreport definitions (balances, journals, declarations likerap_declaratia100, D394/D406/SAF-T exports, invoices).Include/— third-party OCX controls and reference docs (SAF-T guide, D394 spec).Initializari/—.tmpltemplates for generated XML/receipt files.Locale/— DBF-based i18n tables (locale*.dbf) andlocale.dbcdatabase container; Romanian is the built-in default (see Localization below).DATE/— local machine/company option tables (Optiuni_FIRMA/LOCAL/PROGRAM.dbf).Grafice/— icons/bitmaps used by forms and toolbars.Help/— DBF-based in-app help content tables.Alte/— scratch/example data files (bank statement exports, import templates); not part of the shipped app.- Root
.sqlfiles (roacont1/2/3.sql,anaf_efactura.sql,vanzari*.sql,mfinante.sql) — hand-run Oracle DDL/DML migrations, not applied automatically. changelog_roacont.txt,bug_registru.txt— human-maintained change logs (see Changelog convention below).versiune_db.txt— a manually bumpedYYYY_MM_DD_NNmarker used to track the last applied DB migration.
Shared code (COMUN/ vs. COMUNROA)
COMUN/inside this project is ROACONT's local copy of shared assets (clase,ferestre,programe,rapoarte,meniuri,utile), mirroring the same substructure as the app root.COMUN/utile/holds cross-cutting utilities:web(WWUTILS.PRG,WWAPI.PRG,wwhttp, http/xml helpers),excel,hpdf(PDF export),nfjson/nfXml,calendar,ctl32,email,chatbot,GridExtras.D:\ROA\COMUNROA(outside this working copy) is the suite-wide shared library referenced fromroacont.prg'sSET PATH(...COMUNROA\) and used by every sibling ROA product — treat edits there as cross-project and higher-blast-radius than edits under this project's ownCOMUN/.COMUN/Drepturi utilizatori/holds the per-product SQL that defines user permission objects (subfolders per product:ROACONT,ROAGEST,ROACASA,ROAAUTO, ...) andinstructiuni drepturi.txt, which documents the permission-object conventions used on forms (ntipvalues 0–5 for view/report/register/ledger-or-partner/view/custom access levels,verifica_drepturi(...)gating,cbuton1..4button wiring,glLunaInchisaread-only lock).
Changelog convention
changelog_roacont.txt is a flat file of HTML-comment blocks, newest first, one per release:
<!--
DD/MM/YYYY
ROACONT - X.Y.Z
:tag:
Description of the change.
-->
Tags in use: :nou: (new feature), :modificare: (change/fix to existing behavior),
:eroare: (bug fix), :adaugare: (addition). Version numbers increment per entry (current
series is 2.11.x). When asked to log a change, follow this exact format/tag set rather than
inventing a new one. In-code change comments follow a similar per-block convention:
*!* DD.MM.YYYY followed by *!* author.name and a short description, directly above the
code being changed — preserve this style when editing existing modules.
Localization
gcLocale defaults to 'Romana', in which case goLocale is a Locale_dummy pass-through
(no translation lookup). Any other locale value loads the real Locale class (Locale.vcx)
backed by the locale*.dbf tables under Locale/. Most in-app strings and comments are
Romanian; keep new user-facing strings and code comments in Romanian to match the existing
codebase unless told otherwise.
Skill routing
When the user's request matches an available skill, invoke it via the Skill tool. When in doubt, invoke the skill.
Key routing rules:
- Product ideas/brainstorming → invoke /office-hours
- Strategy/scope → invoke /plan-ceo-review
- Architecture → invoke /plan-eng-review
- Design system/plan review → invoke /design-consultation or /plan-design-review
- Full review pipeline → invoke /autoplan
- Bugs/errors → invoke /investigate
- QA/testing site behavior → invoke /qa or /qa-only
- Code review/diff check → invoke /review
- Visual polish → invoke /design-review
- Ship/deploy/PR → invoke /ship or /land-and-deploy
- Save progress → invoke /context-save
- Resume context → invoke /context-restore