SmartGrowth is a modern, full-stack web application that empowers small businesses to discover, apply for, and leverage growth grants (up to $10,000) and professional services. The platform features a seamless multi-step grant application, a robust service marketplace, a dynamic blog, and deep integration with Wix and Supabase for data, automation, and content management.
URL: [Your Production URL Here]
- Grant Application Wizard: 9-step, user-friendly survey to determine grant eligibility and maximize bonus earnings.
- Service Marketplace: Browse, filter, and purchase digital marketing, AI automation, consulting, and print services.
- Wix Blog Integration: Dynamic blog with categories, featured posts, and rich content, synced from Wix.
- Wix API Integration: Real-time sync for products, bookings, events, and contacts.
- Admin Dashboard: Monitor sync status, manage content, and trigger manual or automated syncs.
- Responsive UI: Mobile-first, accessible, and brand-consistent design.
- Authentication: Supabase Auth and custom SmartGrowth Auth.
- Edge Functions: Serverless backend for data sync, validation, and automation.
- Testing Suite: Robust, organized, and extensible test system for frontend, backend, and data integrity.
- Frontend: React 18, TypeScript, Vite, shadcn/ui, Tailwind CSS, Radix UI, React Router, React Query, Zod, React Hook Form
- Backend: Supabase (PostgreSQL, Edge Functions), Wix REST APIs, Node.js
- State Management: React Query, Context API
- Testing: Custom scripts, Jest/Vitest (unit), Playwright/Cypress (E2E), data validation, integration, and debug tools
src/
components/ # UI, forms, features, Wix, auth, layout, navigation, survey
contexts/ # React contexts (App, Auth, SmartGrowth)
hooks/ # Custom hooks (Wix, Supabase, Survey, etc.)
integrations/ # Third-party integrations (Supabase, Wix)
lib/ # Utility libraries and validation
pages/ # All page-level components (Home, Survey, Blog, Packages, etc.)
services/ # API and backend service logic (Wix, Supabase, Blog, Sync)
types/ # TypeScript types
utils/ # Utility functions
test/
unit/ # (Jest/Vitest unit tests)
integration/ # Integration/data validation scripts (see below)
e2e/ # (Playwright/Cypress E2E tests)
data-validation/ # Data cleanup, migration, validation
debug/ # Debug and environment scripts
results/ # Test results, logs, coverage
git clone <YOUR_GIT_URL>
cd growth-grant-wizard
npm installCopy and edit .env:
cp .env.example .envSet your Supabase and Wix credentials:
VITE_SUPABASE_URL=...
VITE_SUPABASE_ANON_KEY=...
VITE_WIX_API_KEY=...
VITE_WIX_SITE_ID=...
SUPABASE_SERVICE_ROLE_KEY=...npm run devVisit http://localhost:5173 (or as shown in your terminal).
- Supabase: Used for authentication, data storage, and edge functions.
- Wix APIs: Used for products, bookings, events, contacts, and blog content.
- Edge Functions: Automated and manual sync for all major entities.
- Blog System: Blog posts are synced from Wix, stored in Supabase, and rendered with rich content and SEO.
See docs/README_WIX_INTEGRATION.md and
docs/WIX_BACKEND_SETUP.md for full backend and integration setup.
- Home Page: Hero, features, service highlights, and CTAs.
- Survey: 9-step grant application with progress, bonus tracking, and validation.
- Packages/Services: Browse and purchase digital, AI, consulting, and print services.
- Blog: Dynamic, filterable, and SEO-optimized blog synced from Wix.
- Admin/Dashboard: Monitor sync status, trigger syncs, and view data health.
- Authentication: Secure login/signup with Supabase and custom flows.
- Responsive Design: Fully mobile-optimized and accessible.
unit/β (to be added) Unit tests for components and services (Jest/Vitest)integration/β Integration/data validation scripts:check-services.jsβ Service table checks (local/remote, REST/client, summary, breakdown)check-products.jsβ Product table checks, sync status, and sync functioncheck-wix-sync.jsβ Run all sync edge functionscheck-synced-data.jsβ Validate all local Wix datacheck-synced-services.jsβ Service sync validationcheck-sync-status.jsβ Print latest sync statusverify-database.jsβ Comprehensive DB CRUD/schema test
e2e/β (to be added) End-to-end browser tests (Playwright/Cypress)data-validation/β Data cleanup, migration, and validation scriptsdebug/β Debug and environment scriptsresults/β Test results, logs, and coverage
# Example: Check all services (prod)
node test/integration/check-services.js
# Example: Check all products and sync status (local)
node test/integration/check-products.js --local --sync-status
# Example: Run all sync edge functions
node test/integration/check-wix-sync.js
# Example: Validate all synced data
node test/integration/check-synced-data.js- Vercel/Netlify/Custom: Standard Vite/React deployment.
- Supabase: Deploy edge functions and configure environment variables.
- Wix: Set up API keys, webhooks, and CORS as described in the docs.
- All API keys and secrets are stored in environment variables.
- Supabase RLS (Row Level Security) is enabled for all sensitive tables.
- Edge functions use service role keys and are never exposed to the frontend.
- Regular audits and monitoring for API usage and data integrity.
- Fork the repo and create a feature branch.
- Add/modify code and tests.
- Run all tests and linting before submitting a PR.
- Document new features and update the README as needed.
Ready for the next step? Clone, configure, and start building with SmartGrowth!
This project is configured for robust dependency management, automated testing, and package publishing using GitHub Actions and Renovate. Below is an overview of the key files and how to use them.
- Purpose: Define project metadata, dependencies, scripts, and lock dependency versions for reproducibility and security.
- Usage:
- Add dependencies with
npm install <package>. - Run tests with
npm test. - Build with
npm run build.
- Add dependencies with
- Purpose: Configures npm to use GitHub Packages as the registry and authenticates using the
GITHUB_TOKEN. - Usage:
- Required for publishing and installing packages from GitHub Packages.
- No manual changes needed unless your username or registry changes.
- Purpose: Configures Renovate to automate dependency updates.
- Key Features:
- Weekly checks for updates (Monday 2am UTC).
- Minor/patch updates are grouped and auto-merged if tests pass.
- Major updates require manual review.
- Supports npm and GitHub Actions dependencies.
- Runs tests before merging PRs.
- Supports monorepos (grouping updates across multiple
package.jsonfiles).
- Purpose: Runs Renovate weekly to check for and PR dependency updates.
- Usage:
- PRs are created for updates, with changelogs and test results.
- Minor/patch updates may be auto-merged if tests pass.
- Purpose: Runs on PRs and pushes to ensure all code builds and tests pass before merging.
- Usage:
- Installs dependencies, builds the project, and runs tests.
- Required for PRs created by Renovate or contributors.
- Purpose: Publishes the package to GitHub Packages on pushes to release branches or tags.
- Usage:
- Triggered by pushes to
release/**branches or tags likev1.2.3. - Uses the
GITHUB_TOKENfor secure authentication.
- Triggered by pushes to
- Install dependencies:
npm install
- Run tests locally:
npm test - Build the project:
npm run build
- Publishing:
- Push to a
release/*branch or tag a commit (e.g.,v1.0.0) to trigger publishing.
- Push to a
- All workflows use
GITHUB_TOKENfor authentication (no personal tokens needed). - Dependencies are pinned in
package-lock.jsonfor security. - Workflows run on
ubuntu-latestfor compatibility and security. - Dependency caching is enabled for faster CI runs.
- Renovate is configured to group updates across multiple
package.jsonfiles if present. - For monorepos, ensure each package has its own
package.jsonand lock file.
This setup ensures your Node.js project is always up-to-date, secure, and reliably published with minimal manual intervention.