How ibrahem-io/dga-v4 works
Project type and purpose
• This is a full-stack, single-page application built with React/TypeScript and Vite.
• It uses Netlify for hosting static assets and serverless functions, Supabase as the backend database/auth provider, and an external LLM service for AI analysis.
• The app appears to support file uploads, role-based dashboards (auditor, ministry, supervisor), and an AI-powered audit wizard.
File structure
• Top level:
• netlify.toml + netlify/functions – serverless backend (api-auth.ts, api-llm.ts)
• supabase/migrations – database schema migrations
• src – React front-end code under Vite (App.tsx, components/, services/, contexts/)
• Configuration: package.json, tsconfig*, vite.config.ts, tailwind.config.js, postcss.config.js, eslint.config.js
• src/services
• supabase.ts wraps Supabase client
• api.ts and enhancedApiService.ts abstract calls to netlify functions
• aiAnalysisService.ts calls the OpenAI or LLM endpoint
• submissionService.ts handles saving/uploading audit submissions
• src/components – UI broken out by feature (login, dashboards per role, wizard steps, file upload, chat, debug panels)