Portfolio API
July 3, 2025 ยท View on GitHub
๐ Overview
A modern, production-ready Node.js/Express portfolio API, designed for ready-to-ship serverless deployment on Vercel.
Feature robust MVC architecture, hot reload, caching, OpenAPI docs, analytics, notifications, and seamless integration with Neon Postgres.
Perfect for job applications, portfolio showcases, and scalable SaaS backends.
๐ฅ๏ธ Frontend(UI)
This repository is backend-only. For frontend features and UI, please use the companion repository:
Note: For full functionality, clone and run the frontend UI from shahrukh-anwar as well.
โจ Features
| Feature | Description |
|---|---|
| Express.js | Fast, minimalist API server |
| Vercel Ready | Serverless, zero-config deployment |
| MVC Structure | Clean separation of controllers, models, routes, services, utilities |
| Hot Reload | Local dev with nodemon and tsc --watch |
| Caching | File-based cache for serverless architecture |
| CORS | Secure, environment-aware CORS for local, preview, and production |
| Database | Neon Postgres (free tier, scalable) |
| Cron Jobs | Automated temp file cleanup (Vercel + local) |
| OpenAPI/Swagger Docs | Live, interactive API docs at /docs |
| Notifications | Email (Brevo), Telegram, and more |
| API | Telegram, Twitter, Medium, Dev.to, Brevo |
| Analytics & Logging | Custom utilities for request/error logging and analytics |
| Professional Documentation | All endpoints documented with OpenAPI |
๐๏ธ Project Structure
.
โโโ src/
โ โโโ config/ # Application wide configs
โ โโโ controllers/ # Business logic (Notification, Puppeteer, Social, Utility)
| โโโ middleware/ # Middlewares to secure the routes
| โโโ migrations/ # SQL migrations for Neon Postgres
โ โโโ models/ # Data models (Contact, etc.)
โ โโโ routes/ # API route definitions
โ โโโ services/ # External integrations (Email, Telegram, etc.)
โ โโโ utility/ # Cache, DB, Logging, Response, Template
โ โโโ views/ # For views, email templates
โ โโโ swagger.js # Swagger/OpenAPI config
โ โโโ index.js # Express app entry point
โโโ .env.example # Environment variable template
โโโ vercel.json # Vercel deployment config
โโโ README.md
๐ API Documentation
- Live Swagger UI: https://api-shahrukhanwar.vercel.app/docs
- OpenAPI Spec: All endpoints are fully documented with request/response schemas, tags, and examples.
๐ ๏ธ Quick Start
1. Clone the Repository
git clone https://github.com/devshahrukhanwar/api-shahrukh-anwar.git
cd api-shahrukh-anwar
2. Install Dependencies
npm install
3. Configure Environment
- Copy
.env.exampleto.envand fill in your secrets. - Set up Neon Postgres (DB), Brevo (Email), Telegram API (Notifications), Twitter API, Dev.to
- Add your API keys for Twitter, Brevo, Telegram, etc.
4. Run Locally
npm run dev:all
# or
npm run dev
- Visit http://localhost:3000/docs for API docs.
5. Deploy to Vercel (Optional)
๐ Environment Variables
See .env.example for all required variables:
| Key | Description |
|---|---|
| APP_ENV | Environment (local/production) |
| APP_URL | Main app URL |
| API_URL | API base URL |
| ... | (see .env.example for all keys) |
๐ฆ Integrations
- Database: Neon Postgres
- Cache: File based(Default), Upstash Redis
- Email: Brevo
- Social: Twitter, Dev.to, Medium
- Notifications: Telegram, Email
๐ค Contact
- ๐ง Email: shahrukhanwar@proton.me
- ๐ Portfolio: shahrukhanwar.vercel.app
- ๐ผ LinkedIn: linkedin.com/in/devshahrukh
- ๐ฆ Twitter: x.com/devshahrukh
๐ License
This project is open source and available under the MIT License.
๐ Sponsor & Support
If you find this project useful, star the repository, consider supporting me:
Developed by Shahrukh Anwar | Built with Express.js | Hosted on Vercel