How vacaramin/bidbuddy works
Project type and purpose
• This is a frontend-only SaaS single-page application (SPA) built with React (JSX), Vite/Webpack, and deployed to Firebase Hosting. Its purpose is to generate AI-powered Upwork proposals, let users configure templates, track history, and manage settings, all in the browser.
File structure
• Top-level config:
• .firebaserc, firebase.json → Firebase Hosting setup
• .github/workflows/*.yml → CI/CD pipelines for build & deploy
• package.json, vite.config.js, webpack.config.js → build tools & dependencies
• Public assets:
• public/, dist/, index.html → static site entry points
• Source code (src/):
• Layout/ (Sidebar, Topbar) → page chrome
• components/ (Card, Logo) → reusable UI blocks
• pages/ (Home, Bid, GenerateProposal, etc.) → route-level views
• hooks/ & utils/ → custom hooks (useLocalStorage) and services (apiService.js for AI calls)
• token.js, localStorage.js → auth token storage & local persistence
README for additional insights
• Core features: AI proposal generation, templates, history tracking, user settings.
• No backend code present—data persistence and business logic reside entirely in frontend and third-party APIs.
a. Main components:
• User’s browser running the React SPA
• SPA modules:
– Layout & routing (Topbar, Sidebar, pages)
– Components & hooks (UI, localStorage)
– Services (apiService calling AI provider)
• External AI service (e.g., OpenAI API)
• Local browser storage (localStorage)
• CI/CD pipeline (GitHub Actions)
• Hosting (Firebase Hosting)
b. Relationships & data flow:
1. User interacts with SPA UI → triggers page logic
2. SPA reads/writes to localStorage for settings & history
3. When generating proposals, SPA calls apiService → sends job description + user config to External AI API → receives generated text
4. SPA displays proposal and saves it to localStorage
5. On commit/merge, GitHub Actions runs build (Vite/Webpack), then deploys dist/ to Firebase Hosting
c. Architectural patterns & principles:
• Single-page application (client-side routing)
• Separation of concerns: Layout vs. Components vs. Pages
• Custom hooks & utility modules to isolate side-effects (e.g., localStorage, API calls)
• CI/CD for automated build and deploy
d. Key technologies:
• React (JSX, hooks)
• Vite & Webpack for dev/build
• Firebase Hosting for static site deployment
• GitHub Actions for CI/CD
• LocalStorage for persistence
• External AI service (via REST)
Essential details to capture
• Global token.js utility as part of apiService’s auth workflow
• Build step (Vite/Webpack) before deployment