How sibiraj-003/linkme works
Purpose and entry points
LinkMe/Cardfy is a Vite React application for creating and publishing profile/link-card experiences, with authenticated dashboards, editors, card design, and public profiles. Browser startup is index.html → src/main.tsx → src/App.tsx; local/server-side integration is exposed through server.ts.
Application shell and navigation
src/App.tsx is the application composition boundary, coordinating page-level experiences and shared auth state. The main user-facing routes/views are:
• src/pages/Home.tsx
• src/pages/Login.tsx
• src/pages/Dashboard.tsx
• src/pages/PublicProfile.tsx
This separates private account management from publicly consumable profile rendering.
Authenticated user boundary
src/context/AuthContext.tsx centralizes authentication state for the React tree. It is backed by Firebase initialization/client access in src/lib/firebase.ts; Firestore authorization policy is defined separately in firestore.rules. Components and private pages should consume this context rather than independently managing session identity.
Creation and editing workflow
Content creation is organized into distinct authoring surfaces:
• src/pages/Editor.tsx for profile/link content editing
• src/pages/CardDesigner.tsx for visual card customization
• src/pages/Dashboard.tsx for managing the user’s authored/published assets
The expected flow is authenticated user → dashboard → editor/designer → persisted profile/card data → PublicProfile.tsx rendering for visitors.
Persistence and media services
The repository contains multiple external-service adapters:
• Firebase client: src/lib/firebase.ts
• Supabase client: src/lib/supabase.ts
• Cloudinary media integration: src/lib/cloudinary.ts
supabase_schema.sql defines the relational/storage-side database contract, while Firebase/Firestore appears to provide authentication and/or document authorization. Media upload and delivery should remain behind the Cloudinary adapter so page components do not depend on provider-specific URL or upload mechanics.
Server and AI integration
server.ts is the server/runtime boundary distinct from the Vite client. The README requires GEMINI_API_KEY, indicating server-mediated Gemini usage rather than embedding that secret in browser code. Client code should call server endpoints for Gemini-backed operations; environment configuration is represented by .env.example.
Deployment and runtime
The frontend is a TypeScript React/Vite app (src/main.tsx, vite.config.ts) deployed with Vercel configuration in vercel.json. Shared UI primitives are locally composed under src/components/ui, while global styling begins at src/index.css. Firebase app metadata/configuration is also present in firebase-applet-config.json and firebase-blueprint.json.
Main entry points: App.tsx Application shell · Dashboard.tsx Dashboard · supabase.ts Supabase client · Editor.tsx Profile editor
Components 19
React/Vite Client
- Browser entry
index.html - React bootstrap
src/main.tsx - Application shell · Coordinates routes and shared application state.
src/App.tsx - Auth context · Centralized session identity for private views.
src/context/AuthContext.tsx - Home
src/pages/Home.tsx - Login
src/pages/Login.tsx - Public profile · Renders published profile/card data for visitors.
src/pages/PublicProfile.tsx - UI primitives
src/components/ui
Authoring
- Dashboard · Manages authored and published assets.
src/pages/Dashboard.tsx - Profile editor · Edits profile and link content.
src/pages/Editor.tsx - Card designer · Customizes visual card design.
src/pages/CardDesigner.tsx
Service Boundaries
- Firebase client
src/lib/firebase.ts - Firestore policy
firestore.rules - Supabase client
src/lib/supabase.ts - Supabase schema
supabase_schema.sql - Cloudinary adapter · Encapsulates media upload and delivery.
src/lib/cloudinary.ts - Server runtime · Mediates Gemini operations outside the browser.
server.ts - Environment contract · Includes server-side Gemini API configuration.
.env.example - Vercel deployment
vercel.json
Connections 21
- Browser entry → React bootstrap: loads
- React bootstrap → Application shell: mounts
- Application shell → Auth context: provides
- Application shell → Home: routes to
- Application shell → Login: routes to
- Application shell → Dashboard: routes to
- Application shell → Public profile: routes to
- Application shell → UI primitives: composes
- Auth context → Firebase client: uses identity
- Firebase client → Firestore policy: governed by
- Dashboard → Auth context: requires
- Dashboard → Profile editor: opens
- Dashboard → Card designer: opens
- Profile editor → Supabase client: persists content
- Card designer → Supabase client: persists design
- Profile editor → Cloudinary adapter: uploads media
- Supabase client → Supabase schema: implements
- Public profile → Supabase client: reads published data
- Application shell → Server runtime: calls AI endpoints
- Server runtime → Environment contract: reads Gemini key
- Vercel deployment → Application shell: deploys client