How eudoca/wisecomply_new works
Project Type and Purpose
• WiseComply is a single‐page web application (SPA) built with React and TypeScript, bundled with Vite, styled with Tailwind CSS and shadcn/ui components. Its purpose is to guide users through compliance tasks and constitution generation for New Zealand incorporated societies. There is no custom backend API in this repo—data is managed in‑memory or via client‑side persistence (e.g., browser storage) if implemented.
Architecture Analysis from File Structure & README
• Top‑level:
• public/ & src/ → static assets and application code
• README.md, vite.config.ts, tsconfig.json, tailwind.config.js → build, type, and style configuration
• vercel.json → deployment target (static hosting on Vercel)
• src/ contains:
• main.tsx → application entry point, ReactDOM.render, Router setup
• App.tsx → route definitions (React Router DOM) and high‑level layout selection
• layouts/ → wrapper components (AuthLayout, DashboardLayout)
• pages/ → route targets (HomePage, ComplianceActivitiesPage, ConstitutionPage, etc.)
• components/ → feature modules (compliance, constitution, disputes, officers, settings) plus core UI and wizard building blocks
• lib/, utils/, types/ → shared code, helpers, and TypeScript definitions
Main Components & Relationships
• Frontend SPA (React + TS)
• Router Layer (React Router DOM)
• Layout Layer (DashboardLayout, AuthLayout)
• Feature Modules (each mapped to a page):
– Compliance Activities (multi‑step wizard)
– Constitution Wizard (block‑based wizard)
– Disputes Management
– Officer Management
– Settings/Configuration
• Shared UI Library (shadcn/ui + custom wrappers in components/ui)
• State Layer: React Context API for cross‑component state in wizards; local useState for per‐component state
• Styling: Tailwind CSS, PostCSS
• Build & Deploy
• Vite dev server (npm run dev) for local development
• Vite build → dist/ (bundled .js, .css, index.html)
• Static Host (Vercel or any CDN) serves dist/ over HTTPS
• Runtime Flow
Browser → index.html → main.tsx → App.tsx (Router) → Page component → Feature Components → UI components
Architectural Patterns & Principles
• Component‑based decomposition: UI split into small, reusable pieces (components/ui, wizard, feature‑specific components)
• Page‑oriented routing: one top‑level page per feature (pages/)
• Layered organization: layouts → pages → components → UI primitives
• Build‑time configuration: centralized config files (tailwind.config.js, tsconfig.json, vite.config.ts)