mirror of
https://github.com/irvanmalik48/realm.git
synced 2026-08-24 03:25:24 +00:00
Personal site.
https://irvanma.eu.org
- TypeScript 91.8%
- MDX 6%
- CSS 2.1%
- JavaScript 0.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .agents/skills/vercel-react-view-transitions | ||
| .claude/skills | ||
| .github/workflows | ||
| .vscode | ||
| posts | ||
| public | ||
| src | ||
| .env.example | ||
| .gitignore | ||
| components.json | ||
| eslint.config.mjs | ||
| LICENSE | ||
| next.config.ts | ||
| package.json | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| postcss.config.mjs | ||
| README.md | ||
| skills-lock.json | ||
| tsconfig.json | ||
Realm
A modern, high-performance personal portfolio and digital garden built with Next.js 16, React 19, Tailwind CSS v4, and native React View Transitions.
Features
- Framework & Engine: Next.js 16 with Turbopack and React 19.
- Authentication & OIDC (PASETO): Complete authentication system supporting Google OIDC and GitHub OAuth2 social login, plus traditional credentials (Email/Username + bcrypt), with tamper-proof PASETO tokens managed securely through Next.js BFF proxy routes and
httpOnlysession cookies. - Server Actions Data Fetching: All external API interactions (
LastFM,Contact, andHealth) run server-side via Next.js Server Actions with zero browser CORS/CSP overhead and secure credential isolation. - Live Heartbeat Status Pulse: Homepage real-time API status indicator polling backend
/healthevery 20 seconds with animated radar pulses and latency metrics. - Design & Styling: Tailwind CSS v4 with custom typography, fluid theme switching via
@wrksz/themes, and glassmorphic UI elements. - Seamless Transitions: Native View Transitions API integration with directional page slides and shared element morphs (
DirectionalTransition). - MDX Blog & Digital Garden:
- Live LastFM Integration: Real-time now-playing widget and user profile stats with caching and optimistic UI.
- Interactive Experience:
- Security & Type-Safety:
- Strict runtime environment validation using
@t3-oss/env-nextjsandzod. - Server-only code isolation with
server-only. - Secure HTTP headers and Content Security Policy (CSP).
- Strict runtime environment validation using
Project Structure
realm/
├── posts/ # MDX blog content & articles
├── public/ # Static assets, fonts, icons
├── src/
│ ├── actions/ # Next.js Server Actions (lastfm, contact, health)
│ ├── app/ # Next.js App Router
│ │ ├── about/ # About page
│ │ ├── api/auth/ # Auth BFF proxy handlers (login, register, oauth, me)
│ │ ├── blog/ # Blog index & dynamic [slug] post pages
│ │ ├── login/ # Sign in page with OIDC & credentials
│ │ ├── register/ # Create account page
│ │ ├── settings/ # Profile & site preferences
│ │ ├── globals.css # Theme tokens, transitions, and root styles
│ │ └── layout.tsx # Root layout with providers & metadata
│ ├── components/ # Reusable UI components & interactive widgets
│ ├── hooks/ # Custom React hooks (useAuth, etc.)
│ ├── lib/ # Utilities, types, auth context, and integrations
│ └── env.ts # Type-safe environment schema
├── .env.example # Environment variables template
├── next.config.ts # Next.js configuration
├── package.json # Project dependencies and scripts
└── tsconfig.json # TypeScript configuration
Getting Started
Prerequisites
- Node.js
20.xor later (or Bun / pnpm) - pnpm recommended
1. Clone & Install Dependencies
git clone https://github.com/irvanmalik48/realm.git
cd realm
pnpm install
2. Configure Environment Variables
Copy .env.example to .env.local and configure your keys:
cp .env.example .env.local
| Variable | Description |
|---|---|
NEXT_PUBLIC_SITE_URL |
Canonical URL of your site (e.g. https://irvanma.eu.org) |
NEXT_PUBLIC_ENVIRONMENT |
Environment (development, production, test) |
API_URL |
(Optional) Server-side backend API URL (e.g. https://api.irvanma.eu.org or http://localhost:8080) |
API_TOKEN |
(Optional) Cryptographically secure API token (realm_tok_...) generated via cmd/token |
LASTFM_API_KEY |
(Optional) LastFM API key for fetching scrobbles |
LASTFM_API_SECRET |
(Optional) LastFM API secret |
3. Start Development Server
pnpm dev
Open http://localhost:3000 in your browser.
Scripts
| Command | Description |
|---|---|
pnpm dev |
Starts local Next.js dev server with Turbopack |
pnpm build |
Builds optimized production bundle |
pnpm start |
Starts production Next.js server |
pnpm lint |
Runs ESLint checks |
pnpm doctor |
Runs React diagnostic checks |
License
Licensed under the RCCL License.