Portfolio API

July 3, 2025 ยท View on GitHub

Frontend Vercel Deploy Postgres File Swagger Docs License


๐Ÿ“ 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

FeatureDescription
Express.jsFast, minimalist API server
Vercel ReadyServerless, zero-config deployment
MVC StructureClean separation of controllers, models, routes, services, utilities
Hot ReloadLocal dev with nodemon and tsc --watch
CachingFile-based cache for serverless architecture
CORSSecure, environment-aware CORS for local, preview, and production
DatabaseNeon Postgres (free tier, scalable)
Cron JobsAutomated temp file cleanup (Vercel + local)
OpenAPI/Swagger DocsLive, interactive API docs at /docs
NotificationsEmail (Brevo), Telegram, and more
APITelegram, Twitter, Medium, Dev.to, Brevo
Analytics & LoggingCustom utilities for request/error logging and analytics
Professional DocumentationAll 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


๐Ÿ› ๏ธ 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.example to .env and 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

5. Deploy to Vercel (Optional)

Deploy with Vercel


๐Ÿ”’ Environment Variables

See .env.example for all required variables:

KeyDescription
APP_ENVEnvironment (local/production)
APP_URLMain app URL
API_URLAPI base URL
...(see .env.example for all keys)

๐Ÿ“ฆ Integrations


๐Ÿค Contact


๐Ÿ“„ License

This project is open source and available under the MIT License.


If you find this project useful, star the repository, consider supporting me:

Sponsor on GitHub Buy Me a Coffee


Developed by Shahrukh Anwar | Built with Express.js | Hosted on Vercel