How rajswarnim2107/rajswarnim-portfolio works
Project type and purpose
• This is a full-stack personal portfolio website built with a React/TypeScript frontend (Vite + Tailwind CSS) and a small Node/TypeScript backend API. Its primary purpose is to showcase AI/ML expertise, projects, and professional information, and to handle any dynamic features such as a contact form or analytics.
File structure
• Top-level directories:
• client/ – the React front end
• server/ – the Node/TypeScript back end (API routes, storage)
• shared/ – shared data models/schema (used by both client & server)
• Config files:
• vite.config.ts & vite.config.github.ts – build/dev and GitHub Pages deploy settings
• drizzle.config.ts – database ORM configuration
• tailwind.config.ts, postcss.config.js – styling pipeline
• .github/workflows/deploy.yml – CI/CD workflow to build & deploy to GitHub Pages
• Package manifests (package.json/lock) and TS configs (tsconfig.json) live at the root, confirming a monorepo setup.
README insights
• The README confirms automatic GitHub Pages deployment via a GitHub Actions workflow.
• Local development uses npm run dev to spin up Vite’s dev server.
• Data (resume, projects, contact info) is driven by client/src/data/resume-data.ts.
• The project uses Drizzle ORM for database interactions (implied by drizzle.config.ts & shared/schema.ts).
a. Main components
• Browser (User)
• Frontend (client/ – React + Vite + Tailwind)
• Backend API (server/ – Node + TypeScript)
• Database (via Drizzle ORM, could be SQLite/Postgres)
• Shared Schema Layer (shared/schema.ts)
• CI/CD Pipeline (GitHub Actions)
• Hosting (GitHub Pages for frontend; optionally a server host or serverless for API)
b. Relationships & interactions
1. User ↔️ Browser ↔️ Frontend
– Static assets and SPA served by GitHub Pages (or Vite dev server locally)
2. Frontend ↔️ Backend API
– HTTP(S) calls (e.g., submit contact form, fetch analytics)
3. Backend API ↔️ Database
– Drizzle ORM uses shared/schema.ts for type-safe queries
4. CI/CD Pipeline ↔️ GitHub Pages
– On push to main → GitHub Actions builds client, then deploys to Pages
c. Architectural patterns & principles
• Monorepo with clear separation: client, server, shared code
• Type-safe shared schema ensures consistency between API and UI
• API layer abstracts data storage (single source of truth)
• Component-based UI in React with a theme‐provider, hooks, and reusable UI primitives
• CI/CD as code (deploy.yml), enabling automated, reproducible deployments
d. Key technologies/frameworks
• Frontend: React, TypeScript, Vite, Tailwind CSS, React Query (queryClient.ts)
• Backend: Node.js, TypeScript, Drizzle ORM
• Shared: shared/schema.ts for database models & types
• DevOps: GitHub Actions, GitHub Pages
Detail
• External services (e.g., GitHub Pages)
• Build tools (Vite) and dev tools (TypeScript compiler)
• Shared schema file connecting to both the API and the client types to stress consistency