Skip to content

Modular NestJS tutorial showcasing core concepts—controllers, providers, DTO validation, and RESTful APIs—built with TypeScript and Prisma.

License

Notifications You must be signed in to change notification settings

GRB-Workspace/Nestjs-Intro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Nest Logo

Nest.js Intro

A beginner-friendly project showcasing fundamental NestJS concepts through structured code examples, from controllers and providers to validation and RESTful APIs.

Documentation: Nest.js Note | Postman Documentation


Table of Contents
  1. About The Project
  2. Getting Started
  3. Resources
  4. Video Source

About The Project

Nest.js Intro is a structured tutorial repository that demonstrates key NestJS concepts through modular code examples. Organized into separate directories, it covers controllers, providers, DTO validation, RESTful APIs, and essential NestJS features, enabling you to learn and reference best practices for building scalable server-side applications with TypeScript.

Core Features

  • Modular Controllers
    Organize your request handling logic with dedicated controllers for clean routing.
  • Providers & Dependency Injection
    Leverage NestJS’s provider system to manage services and inject dependencies.
  • DTO Validation
    Enforce data integrity using DTOs (Data Transfer Objects) and class-validator decorators.
  • REST API Endpoints
    Implement CRUD operations and role-based queries for users and employees.
  • Essentials (Loggers, Guards, Error handling, Exception)
    Explore NestJS’s powerful features.

Built With

  • NestJS – A progressive Node.js framework for building efficient, reliable, and scalable server-side applications.
  • Node.js – JavaScript runtime built on Chrome's V8 engine.
  • TypeScript – Typed superset of JavaScript.
  • Prisma – Next-generation ORM for Node.js & TypeScript.
  • Neon – Serverless PostgreSQL database.
  • Postman – API development and testing tool.

(back to top)


Getting Started

Follow these steps to set up and run Nest.js Intro locally.

Prerequisites

  • Node.js (v22 or higher)
  • npm or yarn
  • Git

Installation and Setup

  1. Clone the repository:
    git clone https://github.com/GRB-Workspace/Nestjs-Intro.git
  2. Navigate to the project directory:
    cd Nestjs-Intro
  3. Install dependencies:
    npm install
    # or
    yarn install
  4. Configure environment variables:
    • Create a .env file based on .env.example.
    • Add your database connection string and any other required variables.
  5. Run database migrations (if using Prisma):
    npx prisma migrate dev
  6. Start the development server:
    npm run start:dev
  7. Access the API documentation in Postman:

(back to top)


Project Structure

Nestjs-Intro
├── .git
├── 01-Controllers
├── 02-Providers
├── 03-DTO-Validation
├── 04-REST-API
├── 05-Essentials
└── LICENSE
  • 01-Controllers – Example controllers for routing and request handling.
  • 02-Providers – Service providers demonstrating dependency injection.
  • 03-DTO-Validation – DTO classes and validation rules using class-validator.
  • 04-REST-API – Complete RESTful endpoints for users and employees.
  • 05-Essentials – Error handling, CORS, Logging, and etc showcasing advanced NestJS features.

(back to top)


Resources

(back to top)


Video Source

Learn step-by-step by following the tutorial video:
Nest.js Intro Tutorial

(back to top)


© 2025 Gayanuka Bulegoda


About

Modular NestJS tutorial showcasing core concepts—controllers, providers, DTO validation, and RESTful APIs—built with TypeScript and Prisma.

Topics

Resources

License

Stars

Watchers

Forks