How ayushp2563/onetaplink works
Project type and purpose
• This is a single-page application (SPA) built with Vite, React (TypeScript), Tailwind CSS, and shadcn-ui components.
• It’s primarily a front-end “Profile Designer” that connects to Supabase for authentication, database storage, and file storage.
File structure
• Top-level:
• public/ and index.html → static assets and entry point
• src/ → all React application code
• src/components/ → reusable UI components (layouts, theme provider, custom inputs, shadcn-ui wrappers)
• src/pages/ → page-level components (Auth, ProfileEditor, Settings, UserProfile, etc.)
• src/integrations/supabase/ → Supabase client config and type definitions
• supabase/config.toml → Supabase project configuration for local emulation/deployment
• vite.config.ts, tsconfig*.json, tailwind.config.ts → build tool and styling setups
• No custom backend server code—app relies on Supabase BaaS for backend functionality.
Key insights from the README
• Tech stack: Vite + React + TypeScript + Tailwind CSS + shadcn-ui
• Deployment: Lovable’s built-in publisher or external hosts (e.g., Netlify)
• Editing: changes flow through Git (GitHub) and Lovable UI, triggering rebuilds.
Main components
a. Client (Browser)
• Runs the React SPA, bundling by Vite.
• Renders UI using shadcn-ui + Tailwind CSS.
• Contains page routes (React Router or a custom router via “ProtectedRoute” component).
b. Hosting & CI/CD
• GitHub repo + Lovable UI for code editing & version control.
• Vite build pipeline triggered on push / Lovable “Publish.”
• Static files served via Vercel/Netlify (or Lovable’s hosting).
c. Supabase Backend
• Auth service for user sign-in / sign-up.
• Database (Postgres) storing user profiles, links, metadata.
• Storage buckets for profile images / favicons.
d. External services
• (Optional) GitHub OAuth integration via Supabase for SSO.
• (Optional) Third-party analytics or CDN endpoints for static assets.
Relationships and data flows
• User’s Browser → (HTTPS) → Static Host → serves index.html + JS/CSS
• SPA → (RPC/REST/WebSocket) → Supabase Auth → login/signup flows
• SPA → (Postgres queries via Supabase client) → read/write profile data
• GitHub/Lovable UI → (Git) → GitHub repo → triggers build & redeploy
Architectural patterns & design principles
• Component-based UI (Atomic Design):
• ui/ folder = design primitives (buttons, inputs, modals)
• components/ = compound components (Navbar, ProfileForm, layouts)
• pages/ = route-level containers
• Client-driven state and side effects via React hooks (use-debounce, use-toast)
• BaaS pattern: no custom backend, leveraging Supabase for all server-side needs