How mayuresh-22/nimbuswave works
Project Type & Purpose
• This is a full‐stack web application named NimbusWave.
• Frontend: Vite + React (in app/).
• Backend/API: Hono.js on Cloudflare Workers (in server/).
• Purpose: AI‐guided edge deployment platform. Users upload a build folder; AI assists, assets go to Cloudinary; final app deploys globally via Cloudflare Workers.
Main Components
a. User / Client Device
b. Frontend Application (app/)
– React + Vite UI, pages, navigators, components.
– Communicates via HTTPS to backend APIs.
c. API Gateway / Edge Runtime
– Cloudflare Workers environment (configured by wrangler.toml).
– Hosts Hono.js server (server/src/index.ts).
d. Backend Services (server/src/)
– Routes: /api/ai, /api/project, /api/user, /api/serve_app.
– Middlewares: authentication, rate‐limiting, credits.
– Business logic:
• LLM Service (llmService.ts)
• File handling & storage (cloudinary.ts)
• Deployment orchestration (deployment.ts, frameworks/vite-react.ts)
• User & project data in Supabase (supabase.ts)
e. External Services
– Cloudinary: static asset uploads.
– Supabase: PostgreSQL for user/project data.
– OpenAI (or LLM): AI guidance.
– Cloudflare Workers: global edge runtime for deployed apps.
f. Deployment Artifacts
– Uploaded ZIP (build folder).
– Generated Worker scripts.
Architectural Patterns & Principles
• Edge‐First: All API logic runs in Cloudflare Workers (low latency).
• Micro‐Layered: Separation of concerns via Hono.js routes and services.
• AI‐Assisted Workflow: Chat‐style API under /api/ai.
• Zero‐Configuration: Frontend only needs to upload; backend infers framework.
4. Inside Workers, subdivide:
– Routes: /api/ai, /api/project, /api/serve_app, /api/user
– Middlewares: auth.ts, userCredits.ts
– Services: cloudinary.ts, llmService.ts, deployment.ts, supabase.ts
6. Return paths: e.g., asset URLs from Cloudinary back to Worker, then to Frontend, then to User.