How hemank-kumar/ashu-portfolio works
Purpose and Runtime
This is a Next.js 16 App Router portfolio for Ashutosh Singh, presenting data/ML, engineering skills, projects, and contact information through animated UI and a WebGL background. It runs as a Node/Next server with SSR-capable routes and browser-side React, Framer Motion, Three.js, and React Three Fiber.
Primary public entry points are app/page.tsx, app/projects/page.tsx, app/skills/page.tsx, and app/contact/page.tsx. Alternate/profile routes are app/malik/page.tsx and app/pravesh/page.tsx.
Application Shell, Metadata, and Discovery
The root application shell establishes shared layout, global styling, and site-level SEO/structured metadata:
• app/layout.tsx
• app/globals.css
• app/template.tsx
Search-discovery endpoints are generated through App Router metadata routes:
• app/sitemap.ts
• app/robots.ts
These form a boundary between crawler-facing metadata and the interactive portfolio UI.
Homepage Composition
app/page.tsx is the main composition point for the portfolio experience. It assembles reusable UI sections for navigation, hero content, credentials, skills, work, and outreach:
• components/ui/Navigation.tsx
• components/ui/HeroSection.tsx
• components/ui/ProjectsSection.tsx
Supporting content stages include timeline/leadership presentation, animated telemetry, and contact/footer rendering:
• components/ui/JourneyTimeline.tsx
• components/ui/LiveMetrics.tsx
• components/ui/ContactSection.tsx
The primary browser-side flow is user scrolling/navigation → section rendering and motion effects → route transitions to dedicated projects, skills, and contact pages.
3D Rendering Boundary
The immersive visual layer is isolated under the canvas components:
• components/canvas/SceneManager.tsx
• components/canvas/DataModel3D.tsx
SceneManager likely owns the React Three Fiber canvas lifecycle and scene composition, while DataModel3D represents a model/particle visualization. This boundary keeps WebGL rendering separate from conventional DOM sections, limiting Three.js-specific state and rendering work to the client-side graphics subsystem.
Server Actions and Content Mutation
Server-oriented action modules centralize mutations or data operations for portfolio-managed content:
• actions/cmsActions.ts
• actions/contactActions.ts
• actions/projectActions.ts
The expected control flow is UI/admin interaction → server action → persistence layer. Contact submission and project/CMS operations should cross this boundary rather than embedding database access in presentation components.
Persistence and Authentication
Prisma provides the database abstraction:
• prisma/schema.prisma
• lib/db.ts
Authentication is exposed through the NextAuth catch-all API route:
• app/api/auth/[...nextauth]/route.ts
• components/ui/LogoutButton.tsx
This establishes an authenticated/admin-capable boundary distinct from public portfolio browsing. Actions can use the shared database client and auth context to protect CMS/project operations.
Route and Page Segmentation
Dedicated route pages provide focused views rather than a single monolithic landing page:
• app/projects/page.tsx
• app/skills/page.tsx
• app/contact/page.tsx
The app/malik/layout.tsx route-local layout indicates that the Malik subtree can apply a distinct shell or presentation policy independently of the root layout. Route segmentation allows content-specific rendering while retaining shared global styling and metadata infrastructure.
Main entry points: layout.tsx Root layout · Navigation.tsx Navigation · app/page.tsx Home page · contact/page.tsx Contact page
Components 20
App Routes
App Router pages, layouts, and metadata endpoints.
- Root layout · Defines the shared application shell and global metadata.
app/layout.tsx - Global styles
app/globals.css - Page template · Applies shared route-transition presentation.
app/template.tsx - Home page · Main portfolio composition entry point.
app/page.tsx - Projects page
app/projects/page.tsx - Skills page
app/skills/page.tsx - Contact page
app/contact/page.tsx - Profile routes · Alternate Malik and Pravesh profile views.
- Malik layout · Applies a route-local shell to the Malik subtree.
app/malik/layout.tsx - Crawler metadata · Generates sitemap and robots responses.
Portfolio UI
Reusable browser-rendered sections and graphics.
- Navigation · Connects portfolio sections and dedicated routes.
components/ui/Navigation.tsx - Portfolio sections · Hero, projects, journey, metrics, and contact presentation.
- WebGL scene · Client-side canvas lifecycle and data-model visualization.
components/canvas/SceneManager.tsx - 3D data model
components/canvas/DataModel3D.tsx - Logout control
components/ui/LogoutButton.tsx
Content Backend
Server actions, authentication, and persistence.
- Content actions · CMS and project content mutations.
actions/cmsActions.ts - Contact action · Handles contact submissions.
actions/contactActions.ts - Auth API · Provides authenticated admin context.
app/api/auth/[...nextauth]/route.ts - Database client · Shared persistence access layer.
lib/db.ts - Database schema
prisma/schema.prisma
Connections 21
- Root layout → Global styles: loads
- Root layout → Page template: wraps routes with
- Root layout → Home page: hosts
- Root layout → Projects page: hosts
- Root layout → Skills page: hosts
- Root layout → Contact page: hosts
- Profile routes → Malik layout: uses local shell
- Home page → Navigation: renders
- Home page → Portfolio sections: composes
- Portfolio sections → WebGL scene: embeds
- WebGL scene → 3D data model: renders
- Navigation → Projects page: navigates to
- Navigation → Skills page: navigates to
- Navigation → Contact page: navigates to
- Contact page → Contact action: submits through
- Content actions → Database client: persists via
- Contact action → Database client: persists via
- Database client → Database schema: uses
- Logout control → Auth API: ends session through
- Content actions → Auth API: uses auth context
- Crawler metadata → Root layout: reflects site metadata