Skip to content
View asrafmi's full-sized avatar
  • Solusi Teknologi Kreatif
  • Jakarta
  • 20:46 (UTC +07:00)
  • LinkedIn in/asrafmi

Block or report asrafmi

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
asrafmi/README.md

Asraf Muhammad — Portfolio

Personal portfolio website with an AI chat twin, built with Next.js (App Router), Tailwind CSS, and the Anthropic API.

Stack

  • Framework: Next.js 16 (App Router)
  • Styling: Tailwind CSS + inline styles for complex animations
  • AI: Claude Haiku via Anthropic SDK, streamed via SSE
  • Fonts: Geist & Geist Mono (Google Fonts)
  • Deploy: Vercel (recommended)

Project Structure

app/
├── api/chat/route.ts     # SSE streaming endpoint (Claude Haiku)
├── globals.css           # CSS variables, keyframes, Tailwind
├── layout.tsx            # Root layout + SEO metadata
└── page.tsx              # Homepage

components/
├── sections/             # Hero, About, Experience, Projects, Skills, Contact
└── ui/
    ├── Atmosphere.tsx    # Background grid, glow, spotlight, particles
    ├── Dock.tsx          # Fixed bottom nav with scroll-spy
    └── ChatPanel.tsx     # AI chat FAB + slide-in panel

hooks/
├── useCursorSpotlight.ts
├── useMagneticEffect.ts
├── useReveal.ts
└── useScrollSpy.ts

lib/
└── persona.ts            # AI system prompt (server-only)

Getting Started

  1. Install dependencies

    npm install
  2. Set up environment variable

    cp .env.local.example .env.local

    Fill in your Anthropic API key:

    ANTHROPIC_API_KEY=sk-ant-...
  3. Run the dev server

    npm run dev

    Open http://localhost:3000.

Environment Variables

Variable Description
ANTHROPIC_API_KEY Anthropic API key — get one at console.anthropic.com

Deploy

Push to GitHub and deploy to Vercel. Set ANTHROPIC_API_KEY in the Vercel project environment variables.

Roadmap

AI Chat — RAG with Vector DB

Currently the AI twin uses a hardcoded system prompt in lib/persona.ts. The plan is to replace this with a proper RAG pipeline so the AI can answer from richer, always-up-to-date context without touching code.

Target architecture:

Sanity CMS  →  embed on publish (webhook)  →  Vector DB  →  /api/chat retrieves top-k chunks  →  Claude Haiku
  • Content source: Sanity — manage CV, projects, blog posts, and any other portfolio content as structured documents. No code changes needed to update content.
  • Embeddings: Generate embeddings from Sanity content on every publish via a Sanity webhook → serverless function.
  • Vector DB: Store and query embeddings (candidates: Pinecone, Supabase pgvector, or Upstash Vector).
  • Retrieval: On each chat message, embed the user query → similarity search → inject top-k relevant chunks into Claude's context window instead of the static persona string.
  • Benefit: Content stays accurate automatically. Adding a new project or job in Sanity Studio is enough — no persona.ts edit, no redeploy.

Pinned Loading

  1. ai-photobooth ai-photobooth Public

    TypeScript

  2. chatgpt-messenger chatgpt-messenger Public

    TypeScript

  3. gemini-chatbot-api gemini-chatbot-api Public

    TypeScript

  4. gemini-flash-api gemini-flash-api Public

    TypeScript

  5. hris-mobile hris-mobile Public

    Dart

  6. thesis-ai-assistant thesis-ai-assistant Public

    TypeScript