Skip to content

mensonones/nestjs-auth

 
 

Repository files navigation

NestJS Auth

A NestJS authentication starter project with Git hooks, commit linting, and code formatting pre-configured.


🔧 Features

  • 🚀 NestJS — scalable server-side framework
  • 🧹 Prettier — automatic code formatting
  • 🛡️ ESLint — code linting for consistent style
  • 📝 Commitlint — enforce Conventional Commits
  • 🪝 Husky + lint-staged — run linters & formatters on staged files before commit

⚙️ Setup

  1. Clone the repo:

    git clone https://github.com/your-username/nestjs-auth.git
    cd nestjs-auth
  2. Install dependencies:

    npm install
  3. Start development server:

    npm run start:dev

🪝 Git Hooks

This project uses Husky with the following hooks:

  • pre-commit: runs Prettier/ESLint on staged files (lint-staged)
  • commit-msg: runs Commitlint to check commit message format

📝 Commit Convention

All commits follow Conventional Commits:

Examples:

feat(auth): add JWT strategy
fix(api): correct response format
chore(deps): bump dependency versions

📦 Scripts

  • npm run start:dev — start NestJS in watch mode
  • npm run lint — run ESLint
  • npm run format — run Prettier
  • npm test — run tests (Jest, with --passWithNoTests enabled)

📂 Project Structure

nestjs-auth/
 ├── src/               # source code
 ├── test/              # test files
 ├── commitlint.config.cjs
 ├── .eslintrc.js
 ├── .prettierrc.json
 ├── package.json
 └── README.md

✨ Happy coding!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 85.5%
  • JavaScript 13.3%
  • Shell 1.2%