How anand-chaudhary/portfolio works
This repository is a Next.js App Router portfolio site: a mostly static, presentation-focused frontend with a small set of reusable interactive components and no visible backend/API layer.
1. Top-level architecture
- The app is organized around src/app, so routing is file-based through Next.js pages.
- The site is split into a few content routes: home (/), about (/about), projects (/project), and contacts (/contacts).
2. Route and page boundaries
- Each route has its own page.tsx under src/app/....
- This suggests the app is page-driven rather than data-driven: each screen is a distinct composition of shared components and local content.
- src/app/layout.tsx is the global shell that wraps all pages.
3. Global shell and shared UI
- layout.tsx is the main integration point for global navigation, fonts, and root-level providers/effects.
- src/components/navbar.tsx is likely the primary cross-page navigation element.
- Shared visual effects such as CursorDot, preLoader, particles, and marquee are reusable across multiple pages rather than tied to one route.
4. Presentation/components layer
- Most of the UI lives in src/components, which is a mix of custom widgets and page-level building blocks.
- testimonial.tsx indicates a dedicated section for social proof/content display.
- The presence of marquee, particles, and cursor effects shows the site emphasizes motion and visual polish as first-class architectural concerns.
5. Reusable primitive UI layer
- src/components/ui contains low-level, likely shadcn-style primitives: button, card, input, label, textarea, badge, accordion, progress.
- These are the design system foundation used by higher-level components and pages.
- This separation keeps layout/content components from depending directly on raw HTML styling patterns.
6. Styling system
- Styling is centered on Tailwind CSS with configuration in tailwind.config.ts, plus global styles in src/app/globals.css.
- postcss.config.mjs and components.json indicate a Tailwind-centered component workflow with utility-class composition.
- src/lib/utils.ts likely contains small helpers for class-name merging or UI composition.
7. Content and assets
- Static assets live under public/, including public/files/Resume.pdf, which is an explicit downloadable artifact.
- src/assets appears to hold imported local images/media used by components and pages.
- The absence of a CMS, database, or server data layer implies the content is embedded in components or local asset imports.
8. Contact surface
- The /contacts route and form primitives (input, textarea, label, button) suggest a contact section or form UI.
- Since there are no API route files, server actions, or backend services in the tree, any contact behavior is likely limited to client-side interaction, static links, or a simple form shell.
9. Animation and interactivity
- The repo strongly favors client-side presentation effects: cursor tracking, particles, loader transitions, marquee motion, and likely testimonial/section animations.
- These effects are isolated in dedicated components so they can be mounted where needed without contaminating page structure.
10. Technology/runtime boundary
- The application is a TypeScript Next.js app, intended to run in the browser with Node.js used for development/build.
- It is styled and assembled at build time, then served as a deployed frontend, with Vercel called out in the README.
11. Operational/tooling layer
- ESLint is configured via eslint.config.mjs, and the repo includes package-lock.json, implying standard npm-based CI/build reproducibility.
- .github/workflow/workflow.yaml suggests automated workflow coverage, likely for lint/build/deploy checks.
12. Overall data flow
- User enters through a page route.
- The root layout applies shared chrome and global styles.
- The page composes content from reusable UI primitives plus motion/effect components.
- Static assets such as the resume PDF are served directly from public/.
- There is no visible persistence tier; the site is essentially a static, component-driven portfolio frontend.
If you are drawing the architecture, the main boxes are: App Router pages, global layout/navbar, shared visual/effect components, UI primitives/design system, static assets, and build/deploy tooling.
Main entry points: layout.tsx Root layout · badge.tsx Other primitives · contacts/page.tsx Contacts page · app/page.tsx Home page
Components 26
App routes
Next.js App Router pages and global shell.
- Root layout · Global wrapper for the app, including shared chrome and providers.
src/app/layout.tsx - Home page · Landing route composition.
src/app/page.tsx - About page · About route composition.
src/app/about/page.tsx - Projects page · Project listing route composition.
src/app/project/page.tsx - Contacts page · Contact route composition.
src/app/contacts/page.tsx
Shared components
Reusable presentation and interaction components used across routes.
- Navbar · Primary cross-page navigation.
src/components/navbar.tsx - Cursor dot · Cursor-following visual effect.
src/components/CursorDot.tsx - Preloader · Loading or intro animation layer.
src/components/preLoader.tsx - Particles · Animated particle backdrop.
src/components/particles.tsx - Marquee · Horizontal text or content scroller.
src/components/marquee.tsx - Testimonial · Social proof or featured quote block.
src/components/testimonial.tsx
UI primitives
Low-level design system building blocks.
- Button · Core action control.
src/components/ui/button.tsx - Input · Single-line form field.
src/components/ui/input.tsx - Textarea · Multi-line form field.
src/components/ui/textarea.tsx - Card · Surface/container primitive.
src/components/ui/card.tsx - Other primitives · Badge, label, accordion, and progress building blocks.
src/components/ui/badge.tsx - Utils · Small class/composition utility helpers.
src/lib/utils.ts
Static assets
Imported media and public downloadable files.
- Resume PDF · Downloadable resume file.
public/files/Resume.pdf - Source assets · Imported local images and media used by components and pages.
src/assets
Tooling
Build, lint, and workflow configuration.
- Tailwind config · Tailwind theme and utility configuration.
tailwind.config.ts - Global styles · App-wide CSS entrypoint.
src/app/globals.css - Components config · Component system configuration for the UI workflow.
components.json - ESLint · Static analysis and code quality rules.
eslint.config.mjs - Next config · Next.js build/runtime configuration.
next.config.ts - PostCSS · CSS processing configuration.
postcss.config.mjs - Workflow · Automated repository workflow definition.
.github/workflow/workflow.yaml
Connections 33
- Root layout → Navbar: includes · Global shell mounts shared navigation.
- Root layout → Home page: wraps · Layout applies to the home route.
- Root layout → About page: wraps · Layout applies to the about route.
- Root layout → Projects page: wraps · Layout applies to the projects route.
- Root layout → Contacts page: wraps · Layout applies to the contacts route.
- Home page → Marquee: uses · Home page uses motion/presentation components.
- Home page → Particles: uses · Home page uses decorative background effects.
- Home page → Preloader: uses · Home page participates in intro/loading flow.
- About page → Testimonial: uses · About page can compose social proof content.
- Projects page → Marquee: uses · Projects page uses scrolling display elements.
- Contacts page → Input: uses · Contact form uses input controls.
- Contacts page → Textarea: uses · Contact form uses textarea control.
- Contacts page → Button: uses · Contact form uses action controls.
- Contacts page → Card: uses · Contact content is framed in surface primitives.
- Navbar → Button: uses · Navigation actions rely on button primitives.
- Testimonial → Card: uses · Testimonial content is rendered in card-like surfaces.
- Other primitives → Button: groups · Represents the broader primitive set.
- Other primitives → Input: groups · Represents the broader primitive set.
- Other primitives → Textarea: groups · Represents the broader primitive set.
- Other primitives → Card: groups · Represents the broader primitive set.
- Other primitives → Utils: supports · Primitives rely on small utility helpers.
- Root layout → Global styles: loads · Root layout applies global CSS.
- Root layout → Tailwind config: styled by · Layout and pages are assembled through Tailwind config.
- Global styles → Tailwind config: extends · Global CSS participates in the Tailwind pipeline.
- Components config → Other primitives: configures · Component workflow config supports the UI primitives.
- Workflow → ESLint: checks · Automated workflow likely runs linting.
- Workflow → Next config: builds · Workflow covers framework build/runtime checks.
- Workflow → Tailwind config: styles · Workflow supports the styled frontend build.
- Resume PDF → Contacts page: linked from · Public resume artifact is surfaced from the site.
- Source assets → Home page: supplies · Imported media supports page compositions.
- Source assets → About page: supplies · Imported media supports page compositions.
- Source assets → Projects page: supplies · Imported media supports page compositions.
- Source assets → Testimonial: supplies · Imported media supports page compositions.