How inteshar/mrxiwlev works
Project Type and Purpose
• This is a full-stack “static” portfolio website built as a Single-Page Application (SPA) with React and styled via Tailwind CSS.
• It uses Vite as a build tool, deploys static assets to Vercel, and offloads backend concerns (authentication and data storage) to Firebase (Firestore and Auth).
• There are two logical frontends:
a. Public user-facing portfolio pages under src/components
b. Admin dashboard under src/admin for content management (login, blog management, contact list)
Top-Level Components
a. Client Browser
• Public User (navigates portfolio pages)
• Admin User (navigates admin pages via ProtectedRoute)
b. React SPA (served as static assets)
• Main app entry (src/main.jsx → App.jsx)
• Public modules (Hero, About, Blogs, BlogDetail, Projects, Service, Contact, SuccessDialog)
• Admin modules (AdminLogin, Dashboard, Blog editor, DisplayContacts, Profile, ProtectedRoute wrapper)
• Shared components (Navbar, Sidebar)
c. PWA / Static Asset Layer
• Vercel CDN serving built files (dist/)
d. Backend as a Service (Firebase)
• Authentication (firebase/auth) for admin sign-in
• Firestore (firebase/firestore) for storing blogs, contacts, profile data
• Queries encapsulated in src/firebase/firestoreQueries.js
e. Build & Deployment
• Vite config (vite.config.js) for dev server and production bundling
• Tailwind config (tailwind.config.js, postcss.config.js)
• Vercel config (vercel.json)
Relationships and Data Flow
• Browser → (HTTP request) → Vercel CDN → serves static JS/CSS/HTML.
• React Router (App.jsx) → renders public or admin routes.
• Public pages → (read-only) → Firestore (fetch list of blogs, project data, JSON assets).
• Admin pages → (Auth) → Firebase Auth → on success access Firestore (read/write blogs & contacts).
• Service Worker intercepts fetch events for caching and offline support.
Architectural Patterns & Design Principles
• SPA with code-split routes (public vs. admin)
• BaaS (Firebase) decouples backend infrastructure
• ProtectedRoute HOC guards admin routes
• Component-based UI layer (React + Tailwind)
• PWA principles (offline caching, manifest)
Essential Architectural Elements
• Clear separation between public portfolio and admin dashboard
• PWA assets and caching layer
• BaaS services (Auth, Firestore) as external dependencies
• Deployment pipeline (Vite build → Vercel)