Skip to content

A modern, production-ready Express.js API designed for serverless deployment on Vercel. Features MVC architecture, caching, OpenAPI docs, Neon Postgres integration, and notifications via Telegram, Brevo, and more. Perfect for job applications, portfolio showcases, and scalable SaaS backends.

License

Notifications You must be signed in to change notification settings

devshahrukhanwar/api-shahrukh-anwar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Portfolio API – Express.js, Pug, Vercel, Neon Postgres, Swagger

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

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


🛠️ 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:

Key Description
APP_ENV Environment (local/production)
APP_URL Main app URL
API_URL API base URL
... (see .env.example for all keys)

📦 Integrations


🤝 Contact


📄 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:

Sponsor on GitHub Buy Me a Coffee


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

About

A modern, production-ready Express.js API designed for serverless deployment on Vercel. Features MVC architecture, caching, OpenAPI docs, Neon Postgres integration, and notifications via Telegram, Brevo, and more. Perfect for job applications, portfolio showcases, and scalable SaaS backends.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project