A full-stack personal portfolio with a React + Vite frontend, Node.js + Express backend, real-time visitor tracking, and a contact form — all backed by MongoDB Atlas.
- 🎨 Dark UI with 3D WebGL background (OGL)
- 📊 Real-time visitor tracking — browser, OS, device, pages visited
- 💬 Contact form with spam filtering, rate limiting & validation
- 🔍
Ctrl+Ksmart search across all pages - 📈 Live GitHub repo count via SWR
- 🤖 Full SEO — sitemap, OG tags, JSON-LD, PWA manifest
- 🔐 Admin API key protected endpoints
Personal-portfolio/
├── client/ # React + Vite frontend
└── server/ # Express + MongoDB backend
- Node.js 18+
- MongoDB Atlas account (or local MongoDB)
git clone https://github.com/niladri-1/Personal-portfolio.git
cd Personal-portfoliocd server
npm install
cp .env.example .env # fill in your values
npm run devPORT=5000
NODE_ENV=development
MONGODB_URI=mongodb+srv://<user>:<password>@cluster.mongodb.net/portfolio
FRONTEND_URL=http://localhost:5173
ADMIN_API_KEY=your_strong_random_secret_herecd client
npm install
cp .env.example .env # fill in your values
npm run devVITE_GITHUB_USERNAME=your_github_username
VITE_API_URL=http://localhost:5000
VITE_TRACKER_API_URL=http://localhost:5000/api/v1| Method | Route | Auth | Description |
|---|---|---|---|
POST |
/api/v1/contact |
— | Submit contact form |
GET |
/api/v1/contact |
Admin key | Get all messages |
POST |
/api/v1/visitors/track |
— | Track page visit |
POST |
/api/v1/visitors/heartbeat |
— | Keep session alive |
GET |
/api/v1/visitors |
Admin key | Get all visitor data |
GET |
/api/v1/health |
— | Server health check |
Admin routes require the header:
X-Admin-Key: your_admin_api_key
Deploy server first, then client.
Project 1 — Server
| Setting | Value |
|---|---|
| Root Directory | server |
| Framework | Other |
| Build Command | npm install |
| Output Directory | (leave blank) |
PORT=5000
NODE_ENV=production
MONGODB_URI=mongodb+srv://username:password@cluster.mongodb.net/portfolio
FRONTEND_URL=http://localhost:5173
ADMIN_API_KEY=generate_a_strong_random_string_hereProject 2 — Client
| Setting | Value |
|---|---|
| Root Directory | client |
| Framework | Vite |
| Build Command | npm run build |
| Output Directory | dist |
VITE_GITHUB_USERNAME=your_github_username
VITE_API_URL=http://localhost:5000
VITE_TRACKER_API_URL=http://localhost:5000/api/v1
Built with ❤️ by Niladri Chatterjee