How lucsarruda/contrato-inteligente-preenchedor works
Project type and purpose
• This is a single-page frontend application built with React and TypeScript, bundled by Vite and styled via Tailwind CSS and the shadcn-ui component library.
• Domain purpose: a “Lovable” contract editor/preview tool (“ContractEditor”, “ContractPreview”, etc.) where users build and preview contract documents in their browser.
Key parts of the file structure
• Top-level: index.html (entry point), package.json (dependencies/scripts), vite.config.ts (build config), tailwind.config.ts, tsconfig*.json.
• src/:
• main.tsx → mounts the App
• App.tsx → root of the component tree
• components/ → feature components (ContractEditor, ContractForm, ContractPreview) plus a ui/ directory containing dozens of reusable UI primitives from shadcn-ui
• context/ContractContext.tsx → React Context for managing contract state
• hooks/ → custom React hooks (use-mobile, use-toast)
• lib/ → shared utilities and data templates (contractTemplate.ts, utils.ts)
• pages/ → route targets (Index.tsx, NotFound.tsx)
• public/: static assets (robots.txt)
Architectural insights from the README
• The tech stack is purely client-side (React + Vite)
• No dedicated backend in the repo; persistence and publishing are handled via the Lovable platform
• Deployment is “one-click” via Lovable, with optional custom domain
Final advice
• Don’t omit the build and deployment flow—this is crucial for understanding how code becomes the live app.