Skip to content

Sabbir Mohammad Sami web developer

ResumeDownload Resume

All notes

(Development)7 min read

Setting Up Husky, Commitlint, and Lint-Staged for Git Hooks

Husky runs scripts on Git hooks, Commitlint rejects commit messages that break the Conventional Commits format, and lint-staged lints only the files you staged. Together they refuse a commit unless it passes ESLint, Prettier, a TypeScript type check and a production build โ€” set up here for a TypeScript Express back end, with every commit type explained.

The word โ€œHuskyโ€ set diagonally between rows of abstract code lines on a charcoal ground, captioned โ€œHusky SetUp with ESLint.โ€

Install Required Packages

Run the following commands to install Husky, Commitlint, and related tools:

Bash
# Install Husky and Commitlint
npm install husky @commitlint/config-conventional @commitlint/cli --save-dev

# Install lint-staged for running linters on staged files
npm install lint-staged --save-dev

npx husky init

Set Up Husky

Initialize Husky in your project:

Bash
npx husky install

Configure Commitlint

Open .husky/commit-msg and add the following script:

Shell
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx commitlint --edit --config=.commitlintrc.ts ||
(
    echo '๐Ÿค”๐Ÿค”๐Ÿค”๐Ÿค” Looks like your message format is not right ๐Ÿค”๐Ÿค”๐Ÿค”๐Ÿค”
              Commit Lint failed: Reformat your commit message according to convention.
    '
    false;
)

Configure Pre-Commit Hook

Open .husky/pre-commit and add the following script:

Shell
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

echo '๐Ÿ—๏ธ๐Ÿ‘ท Styling, testing and building your project before committing'

# Check staged files
npx lint-staged ||
(
    echo '๐Ÿคข๐Ÿคฎ๐Ÿคข๐Ÿคฎ Its FOKING RAW - Your styling looks disgusting. ๐Ÿคข๐Ÿคฎ๐Ÿคข๐Ÿคฎ
            Staged files Check Failed. Run npm run format, add changes and try commit again.';
    false;
)

# Check Prettier standards
npm run format ||
(
    echo '๐Ÿคข๐Ÿคฎ๐Ÿคข๐Ÿคฎ Its FOKING RAW - Your styling looks disgusting. ๐Ÿคข๐Ÿคฎ๐Ÿคข๐Ÿคฎ
            Prettier Check Failed. Run npm run format, add changes and try commit again.';
    false;
)

# Check ESLint Standards
npm run lint ||
(
        echo '๐Ÿ˜ค๐Ÿ€๐Ÿ‘‹๐Ÿ˜ค Get that weak shit out of here! ๐Ÿ˜ค๐Ÿ€๐Ÿ‘‹๐Ÿ˜ค
                ESLint Check Failed. Make the required changes listed above, add changes and try to commit again.'
        false;
)

# Check tsconfig standards
npm run type-check ||
(
    echo '๐Ÿคก๐Ÿ˜‚โŒ๐Ÿคก Failed Type check. ๐Ÿคก๐Ÿ˜‚โŒ๐Ÿคก
            Are you seriously trying to write that? Make the changes required above.'
    false;
)

## Run tests
#pnpm run test ||
#(
#    echo '๐Ÿคก๐Ÿ˜‚โŒ๐Ÿคก Failed Test. ๐Ÿคก๐Ÿ˜‚โŒ๐Ÿคก
#            Are you seriously trying to write that? Make sure you pass all tests and try to commit again.'
#    false;
#)

# If everything passes... Now we can build
echo '๐Ÿค”๐Ÿค”๐Ÿค”๐Ÿค”... Alright.... Code looks good to me... Trying to build now. ๐Ÿค”๐Ÿค”๐Ÿค”๐Ÿค”'

npm run build ||
(
    echo 'โŒ๐Ÿ‘ท๐Ÿ”จโŒ Better call Bob... Because your build failed โŒ๐Ÿ‘ท๐Ÿ”จโŒ
            Next build failed: View the errors above to see why.
    '
    false;
)

# If everything passes... Now we can commit
echo 'โœ…โœ…โœ…โœ… You win this time... I am committing this now. โœ…โœ…โœ…โœ…'

Create Commitlint Configuration

Create a .commitlintrc.ts file and add the following configuration:

TypeScript
import type { UserConfig } from '@commitlint/types';

const commitConfig: UserConfig = {
  extends: ['@commitlint/config-conventional'],
};

module.exports = commitConfig;

Update package.json

Add the following scripts and configuration to your package.json:

JSON
{
  "name": "stationery-shop-backend",
  "version": "1.0.0",
  "main": "dist/server.js",
  "scripts": {
    "start": "node ./dist/server.js",
    "start:prod": "node ./dist/server.js",
    "start:dev": "ts-node-dev --respawn --transpile-only src/server.ts",
    "build": "tsc",
    "deploy-vercel": "vercel --prod",
    "test": "echo "Error: no test specified" && exit 1",
    "lint": "eslint src/**/*.ts",
    "lint:fix": "eslint src/**/*.ts --fix",
    "format": "prettier --write .",
    "prepare": "husky",
    "type-check": "tsc --pretty --noEmit"
  },
  "lint-staged": {
    "src/**/*.{ts,js}": [
      "eslint --fix",
      "git add"
    ]
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "description": "",
  "dependencies": {
    "cors": "^2.8.5",
    "dotenv": "^16.4.5",
    "express": "^4.21.1",
    "mongoose": "^8.8.2",
    "zod": "^3.23.8"
  },
  "devDependencies": {
    "@commitlint/cli": "^19.6.0",
    "@commitlint/config-conventional": "^19.6.0",
    "@eslint/js": "^9.15.0",
    "@types/cors": "^2.8.17",
    "@types/eslint__js": "^8.42.3",
    "@types/express": "^5.0.0",
    "eslint": "^9.14.0",
    "eslint-config-prettier": "^9.1.0",
    "globals": "^15.12.0",
    "husky": "^9.1.7",
    "lint-staged": "^15.2.10",
    "prettier": "^3.3.3",
    "ts-node-dev": "^2.0.0",
    "typescript": "^5.6.3",
    "typescript-eslint": "^8.15.0"
  }
}

Commit Types

Here are the supported commit types and their descriptions:

TypeDescriptionExample
feat:Adding a new feature.feat(auth): add user authentication module
fix:Fixing a bug.fix(login): resolve token validation issue
build:Changes to the build system or dependencies.build: upgrade TypeScript to version 5.6.3
chore:Routine tasks like dependency updates or configs.chore: update eslint configuration
ci:Continuous integration (CI/CD) changes.ci: add GitHub Actions for testing
docs:Documentation changes only.docs: add API documentation for user endpoints
style:Code style changes that donโ€™t affect functionality.style: format code with Prettier
refactor:Code refactoring without adding new features or fixing bugs.refactor: optimize data fetching logic
perf:Performance improvements.perf: reduce database query execution time
test:Adding or updating tests.test: add unit tests for user service
revert:Reverting a previous commit.revert: undo feat: add user authentication module
hotfix:Urgent fixes in production (*not part of the formal spec, but commonly used*).hotfix: patch critical security vulnerability

Common Questions

What does Husky do?
Husky runs your scripts on Git hooks such as pre-commit and commit-msg. The hooks live in the .husky/ folder and are committed with the project, so everyone who clones the repository runs the same checks before a commit is made.
What is the difference between Husky and lint-staged?
Husky decides when something runs โ€” on a Git hook. lint-staged decides what it runs on: only the files staged for the commit. Together, the pre-commit hook lints and formats just the changed files, which keeps it fast on a large project.
What is a Conventional Commit message?
A message in the form type(scope): description, for example feat(auth): add login with Google. Common types are feat, fix, docs, style, refactor, test and chore. Commitlint with @commitlint/config-conventional rejects any message that does not follow the format.
How do I skip the Husky hooks for one commit?
Run git commit --no-verify (or -n). It skips the pre-commit and commit-msg hooks for that commit only. Keep it for emergencies: the checks exist so that broken or unformatted code never reaches the shared branch.
Topic
Development
Published
Reading
7 min ยท 874 words
Sections
8
Tags
  • Git hooks
  • Husky
  • Commitlint
  • lint-staged
  • ESLint
  • Prettier
  • TypeScript

Experience

( 03 roles โ€” 2+ years )

Full-stack developer in Dhaka, Bangladesh. Building for clients in Germany and Bangladesh since 2022.

  1. (01)

    August 2025 โ€” Present

    Full-Stack Developer

    Susko GmbH ยท Full Time ยท Remote

    • Developed and enhanced an AI-powered SaaS and social media automation platform โ€” AI content, image and video generation, automated scheduling and publishing, multi-account and content-team management, Meta, Instagram and Google integrations, WhatsApp-based content generation and scheduling, admin controls and subscription management.
    • Built a full-stack Padel court management and automation system that connects physical court hardware to a real-time web dashboard โ€” court and player management, game control and live scores over WebSocket โ€” and worked on the sensor electronics, PCB design, footprint verification, Gerber validation and JLCPCB manufacturing.
    • Built and maintained automation workflows with n8n, webhooks, APIs and external service integrations that take manual steps out of business processes.
    • Delivered 40+ production websites and full-stack applications for German clients across industries in React, Next.js and TypeScript โ€” shop management, review management and automation, fundraising platforms, menu management, QR code generation and other custom business tools.
    • Optimized backend performance across production applications โ€” database queries, API paths, data processing and Redis-based workflows โ€” for faster, more responsive apps.

    Next.js ยท React ยท TypeScript ยท Node.js ยท Python ยท Prisma ยท Redis ยท WebSocket ยท n8n ยท OpenAI

  2. (02)

    March 2024 โ€” May 2025

    Software Developer

    Bangladesh Associate of IT Solutions ยท Full Time ยท On-site

    • Developed a full-stack inventory management system tracking products, sales, payments, returns, waste products, customer ledgers and SMS notifications, in React, TypeScript, Express and MySQL.
    • Scaled an accounting management platform from a single-client application into a multi-user system, with financial dashboards, journal entries, transaction management, reporting and data visualization.
    • Deployed and maintained web applications on cPanel and VPS servers โ€” production deployments, domain configuration, server setup and troubleshooting.
    • Delivered websites for schools, madrasas and other organizations, turning client requirements into responsive, production-ready web applications.
    • Developed and redesigned production and company portfolio websites in React, Next.js and TypeScript, with a focus on responsive design and user experience.

    React ยท Next.js ยท TypeScript ยท Express ยท MySQL ยท Tailwind CSS ยท cPanel ยท VPS

  3. (03)

    November 2023 โ€” April 2024

    Full-Stack Developer

    Diginie IT ยท Internship ยท Remote

    • Completed a remote internship as a full-stack developer, building and maintaining client web applications in Next.js, TypeScript and Tailwind CSS.
    • Turned designs into responsive pages that held together on every screen size, and kept existing client sites running.

    Next.js ยท TypeScript ยท Tailwind CSS ยท GitHub

About

( Dhaka, Bangladesh )

Sabbir Mohammad Sami โ€” full-stack web & app developer at Susko GmbH, building for the web since 2022.

Sabbir Mohammad Sami, smiling and looking off to the side, seated on a white block in a black sweater โ€” black-and-white studio portrait

Iโ€™m a full-stack developer from Dhaka who cares about the part people actually touch โ€” unusual layouts, careful CSS, motion that means something โ€” and about the code underneath being just as clean.

( Story )

I grew up in Dhaka and studied arts and humanities at Kabi Nazrul Government College. Alongside my studies I joined a web development course, and that is where the real growth started โ€” surprise. Alongside work, I am now in my third year of Honours in Economics at National University.

My first website was a tourism site about the place I most wanted to visit. I built it in class 10.

Today I build AI products, automation and client platforms at Susko GmbH, after two years of shipping inventory, accounting and client sites at BAITS. What I am after has not changed: interfaces that look good and back-ends that run smoothly, from the same pair of hands.

Honest, down to earth, and fond of hard work. My inbox is always open โ€” for a project, or just to say hi.

  1. ( Education )

    1. Kabi Nazrul Government College

      • Arts and humanities
      • Dhaka, Bangladesh
    2. National University, Bangladesh

      Session 2023โ€“2024 ยท Now

      • Honours in Economics โ€” 3rd year
      • Department of Economics
  2. ( Co-curricular )

    โ€”

    Bangladesh National Cadet Corps (BNCC)

    • 1 No Battalion, Ramna Regiment
    • Rank: Cadet Corporal
  3. ( Languages )

    Bangla, English, Hindi

    • Bangla โ€” native
    • English โ€” comfortable
    • Hindi โ€” fluent

( Skills )

Expertise
React ยท Next.js ยท JavaScript ยท TypeScript ยท MongoDB ยท Bootstrap ยท Tailwind CSS ยท shadcn/ui ยท GitHub ยท Figma
Comfortable
Flutter ยท Dart ยท MySQL ยท Mongoose ยท Express ยท TanStack Query ยท Firebase ยท React Router ยท Photoshop
Familiar
Zod ยท Framer Motion ยท GSAP ยท JWT ยท Axios ยท CORS ยท Stripe ยท Vercel

( Questions )

Who is Sabbir Mohammad Sami?

Sabbir Mohammad Sami (S M Sami) is a full-stack web and app developer from Dhaka, Bangladesh. Since August 2025 Sami has worked as a Full-Stack Developer at Susko GmbH in Germany, after building inventory and accounting platforms at Bangladesh Associate of IT Solutions (BAITS). Sami has been building for the web since 2022.

What does Sabbir Mohammad Sami build?

Sami builds websites, web apps, mobile apps and AI products end to end: company and restaurant websites, booking and management platforms, an AI social media platform (Kocial), an AI review manager (ReviewSync) and a Flutter money app (Sompi). That includes 40+ production websites for clients in Germany and Bangladesh.

Which technologies does Sami work with?

Sami works across the MERN stack โ€” MongoDB, Express, React and Node.js โ€” and with Next.js, TypeScript, Tailwind CSS, MySQL, PostgreSQL, Prisma and Redis. Mobile apps are built in Flutter and Dart. AI features use the OpenAI API, n8n automations and webhooks, and motion uses GSAP.

Does Sami build mobile apps with Flutter?

Yes. Sami builds cross-platform apps in Flutter and Dart. Sompi, Samiโ€™s own money tracker, runs on Android, iOS, the web and the desktop from one Flutter codebase, with Riverpod for state and an encrypted SQLite store, so every account and transaction stays on the device.

Does Sami build AI products?

Yes. At Susko GmbH Sami builds AI SaaS: Kocial writes captions, generates images and publishes to Facebook and Instagram for agencies, and ReviewSync answers Google reviews in a businessโ€™s own voice. Sami also builds n8n workflows that connect AI models to business tools.

How can I hire Sami as a web or app developer in Dhaka?

Email smsami.dev@gmail.com or use the contact form on this site with a short note about the project. Sami works with clients in Dhaka, across Bangladesh and abroad โ€” remotely for companies in Germany โ€” and replies in English or Bangla.

( Contact )

Contact

( Available for projects )

Based in Dhaka, Bangladesh (GMT+6). Happy to talk in English, Bangla or Hindi.

Letโ€™s work together.

Have an exciting project you need help with? Send me an email, give me a call, or write below โ€” a project, a question, or just to say hi.

( Write to me )

* Required