Giter VIP home page Giter VIP logo

fullstack_advance's Introduction

⫸ Introduction

This project offers a deep dive into advanced Node.js, TypeScript and Frontend with Next.js, Tailwind CSS, Redux Toolkit, RTK Query, and Validation, and so on. focusing on scalability and clean, production-ready code. It also serves as a boilerplate for your future projects, with every line of code meticulously documented for easy understanding.

⫸ Notes on the Project


⫸ You will learn the following things in this project

Before starting the project, you should have a basic understanding of the following: 0.1 & 0.2 are not part of the project, but they are essential for the project.

  • Error Handling
  • Logger
  • Swagger
  • CORS
  • Helmet
  • Cookie-parser
  • Dotenv
  • Body-parser
  • Morgan
  • Mongoose
  • MongoDB setup
  • Proper script setup
  • UUID
  • Compression
  • User Registration and Login
  • User Profile: Get, Update, Delete
  • Authentication Checks: Is Authenticated? Is the Owner?
  • Crypto: Password Hashing, Password Salting
  • Session Token: Cookie
  • API Versioning

Frontend - Next.js

  • Tailwind CSS
  • Axios
  • Convert File to Base64
  • Clsx
  • Tailwind-merge
  • Redux—Proper Setup (Redux Toolkit)
  • Toast
  • Validation
    • Form Validation (Yup & Formik) correct format of email, password, etc.
    • Only authorized/register users from the database are permitted to proceed to the next page.
  • Custom Hooks
  • Custom API
  • RTK Query & js-cookie: Best Practices for Access Token Storage and Refresh Token
  • AsyncThunk
  • Refresh Token (Cookie) & Access Token (Redux Store)
  • REDUX Persists for holding the state of the user even after the page refreshes.
  • Protected Routes

Backend - Node.js

  • JWT: Access Token, Refresh Token
  • Bcrypt: Password Hashing, Password Salting
  • Secure Authentication Mechanism
  • Authentication Checks: Is Authenticated? Is the Owner?
  • Crypto: Password Hashing, Password Salting
  • Local Storage (Variables)
  • Proper Error Handler
  • User Authentication: Register, Login, Reset Password
  • User Profile: Get, Update
  • OTP: Generate, Verify
  • Authenticated User Only
  • Session: Creation, Destroy
  • Generate Access Token using Refresh Token
  • Logout
  • Email: Normal Mail (Nodemailer , mailgen)
  • Email: Gmail Basic Auth (SMTP)
  • Email: Gmail Better (OAuth2)
  • Sharp (Media Processing)
  • Multer (File Upload)
  • AWS S3 (File Upload)
Recording.2024-01-15.072657_1.mp4
  • Tailwind CSS
  • Shadcn/ui
  • dark mode/light mode
  • Parallel Routing (Intercepting Routes)
  • Modal
  • Zod(Schema Validation)
  • What is Redis?

  • How to set up Redis with docker? (redis-stack and redis-client)

  • CLI commands for Redis

  • Redis with Node.js

  • Data Types

    • String Operations (cli and node.js)set name, get name, setnx, MSET, MGET, INCR, INCRBY, GETRANGE, SETRANGE, GETRANGE, STRLEN, APPEND, SETEX, SETNX, MSETNX, SETRANGE, GETRANGE, STRLEN, DECR, DECRBY, PSETEX

    • List Operations (cli and node.js)LPUSH (Stack & Queue Concept), RPUSH (Stack & Queue Concept), LPOP, RPOP, LLEN, LRANGE, LINDEX, LINSERT, LSET, LTRIM, LREM, RPOPLPUSH, BLPOP, BRPOP, BRPOPLPUSH

    • Set Operations (cli and node.js)SADD, SREM, SISMEMBER, SMEMBERS, SPOP, SRANDMEMBER, SMOVE, SCARD, SINTER, SUNION, SDIFF, SDIFF, SINTERSTORE, SUNIONSTORE, SDIFFSTORE, SSCAN

    • Hash Operations (cli and node.js)HSET, HGET, HGETALL, HDEL, HEXISTS, HKEYS, HVALS, HLEN, HINCRBY, HINCRBYFLOAT, HMSET, HMGET, HSETNX, HSTRLEN, HSCAN

    • Sorted Set Operations (cli and node.js)ZADD, ZREM, ZSCORE, ZRANGE, ZREVRANGE, ZRANGEBYSCORE, ZREVRANGEBYSCORE, ZCARD, ZCOUNT, ZINCRBY, ZLEXCOUNT, ZRANGEBYLEX, ZREVRANGEBYLEX, ZREMRANGEBYLEX, ZREMRANGEBYRANK, ZREMRANGEBYSCORE, ZUNIONSTORE, ZINTERSTORE, ZSCAN, ZPOPMIN, ZPOPMAX, BZPOPMIN, BZPOPMAX, ZRANK

    • REDIS STREAMS OPERATIONS (cli and node.js)XADD, XLEN, XRANGE, XREVRANGE, XREAD, XREADGROUP, XGROUP, XACK, XCLAIM, XDEL, XTRIM, XINFO, XSETID, XREWRITE

    • Bitmaps Operations (cli and node.js)GEOADD, GEOPOS, GEODIST, GEORADIUS, GEORADIUSBYMEMBER, GEOHASH, GEOSEARCH, GEOSEARCHSTORE

  • Redis Pub/Sub

  • Scale A Node.js Application with Redis

    1. Basic Understanding and Setup
    • 1.1 Let's make a module
        1. Create a Basic Module
        1. Define the Module
        1. Use the Module
        1. Create More Modules
        1. Create a bookmarks Module
        1. Final Structure
    • 1.2 Let's make a basic controller and service
        1. Create the Controller and Service files
        1. Define the Controller
        1. Define the Service
        1. Register the Controller and Service in the Module
        1. Inject the Service into the Controller
        1. Use the Service's methods in the Controller
    1. Setting Up the Auth Controller
    • 2.1 Creating Basic Endpoints
    1. Setting up DB with docker(Prisma)
    1. Setting up TypeORM with NestJS (Prisma)
    1. Understanding DTOs and Class-Validator in NestJS
    • 5.1 Installing Class-Validator
    • 5.2 Creating and Validating DTOs
    • 5.3 Using DTOs in Controllers
    • 5.4 Global Validation Pipe
    1. Implementing Signup Logic with Argon2 and Prisma
    • 6.1 Installing Argon2
    • 6.2 Basic Signup Logic
    • 6.3 Handling Unique Email Validation
    • 6.4 Handling Errors
    • 6.5 Creating a Custom Exception Filter
    1. Implementing Login Logic
    1. Automate postgres restart & prisma migrations
    1. NestJs config module
    1. Passport & JWT module setup
    • 10.1 Basic Setup of Passport & JWT
    • 10.2 Let's setup strategy
    1. NestGuard
    • 11.1 Protecting Routes with Guards
    • 11.2 Providers
    • 11.3 Return User Payload
    • 11.4 JWT Guard
    1. Custom Param Decorator
    • 12.1 Creating a GetUser Decorator
    • 12.2 Http Decorator
    1. E2E Testing
    1. Setting Up Test Database
    1. Dotenv for Development and Testing
    1. Database Tear Down
    • 16.1 Cleaning the Database
    • 16.2 Database Tear Down in E2E Tests
    • 16.3 Create the test
    1. Auth E2E Testing with Pactum
    • 17.1 Signup test
    • 17.2 Signin test
    • 17.3 Error handling
    • 17.4 Multiple Error handling
    • 17.5 Storing the token
    1. User E2E Testing with Pactum
    • 18.1 Get User with Bearer Token
    • 18.2 Edit User with Bearer Token
      • 18.2.1 DTO for Edit User
      • 18.2.2 Service for Edit User
      • 18.2.3 Controller for Edit User
      • 18.2.4 Pactum Test for Edit User

⭐ Let's Revise the concepts and implement bookmarks [CRUD]

    1. Bookmarks Crud with Testing E2E

fullstack_advance's People

Contributors

subham-maity avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fullstack_advance's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.