How krishnakumar24/image-sharing works
Project Type and Purpose
• This is a Wix Velo site repository configured for local development via Git Integration and the Wix CLI.
• It’s effectively a “full‑stack” serverless web app running on the Wix platform, with three code domains: page code (frontend), public assets (static), and backend web modules (serverless functions).
• Purpose: let developers clone this repo, edit page logic and backend logic in their IDE, preview changes locally via the Local Editor, then push to GitHub and publish to Wix via the CLI.
File Structure Analysis
• Top level:
• package.json / package-lock.json – Node dependencies and scripts.
• wix.config.json / wix.lock – Wix CLI project configuration.
• src/
– backend/ – serverless function modules (.web.js), jobs.config, permissions.json
– pages/ – per‑page Velo code files, a masterPage.js common script, README.md
– public/ – static assets (images, client‑only code), README.md
• Key patterns:
• Separation of concerns between static content (public), page‑scoped UI logic (pages), and backend services (backend).
• Standard Wix Velo folder conventions reflect an MVC‑like separation: Views = pages + public, Controllers = page code, Services = backend web modules.
Insights from README
• Describes development workflow:
• Clone repo → IDE → npm install → wix dev (Local Editor)
• Local Editor syncs code + design for real‑time preview
• Use Wix CLI to preview and publish (wix preview / wix publish)
• No external databases in this repo; data persistence is handled by Wix Data Collections (not shown in file tree) or external services wired in backend modules.
Main Components
a. Developer Environment
• IDE (VS Code, WebStorm, etc.)
• Node.js + npm/yarn
• Git CLI
• Wix CLI (@wix/cli)
b. GitHub Repository
• Origin for code; triggers CI/CD when commits are pushed.
c. Local Editor Server
• wix dev process that hosts a preview of the site locally.
d. Wix Production Platform
• Static File Hosting (public + built page code)
• Serverless Backend (web modules from src/backend)
• Scheduler (jobs.config-driven cron jobs)
• Permissions Engine (permissions.json)
e. End Users (Browser)
• Consume the site via Local Editor (dev) or via the live Wix domain (prod).
Component Interactions & Data Flows
1. Developer writes code → commits & pushes to GitHub → Wix CLI/CD pipeline deploys to Wix.
2. Developer runs wix dev locally → Local Editor fetches code from src/ → serves pages & static assets, spins up serverless endpoints for backend modules.
3. User/browser requests page → served by Local Editor or Wix Hosting → page code executes in browser, may call backend endpoints (email.web.js, files-manager.web.js) via REST calls.
4. Backend modules interact with Wix platform services (email API, file storage, scheduled jobs).
• Annotation of config files and build steps.