Full Stack Pagination Tutorial (Next + SQL) | Real Project

Full Stack Pagination Tutorial (Next + SQL) | Real Project

T
Thapa Technical
Mar 19, 2026

📂 Source Code
👉 GitHub Repo: https://github.com/thapatechnical/job-portal-nextjs

----------------------------------------------------------------------------------
Learn how to implement real-world full stack pagination step by step in a Job Portal app 🚀

In this video, we go beyond basic UI pagination and dive deep into:

Limit & Offset (DB-level pagination)

Total counts handling

Sliding window algorithm (important 🔥)

Fixing edge cases (first & last page)

Pagination with filters

UI implementation using shadcn

If you want to build production-ready apps, this is a must-watch.
------------------------------------------------------------------------------------
🔗 Useful Playlists

📘 Next.js Full Stack Playlist:
https://youtube.com/playlist?list=PLwGdqUZWnOp0lwvSBaIzzgV9X0ZiZ-42O&si=aQ_TNBNNx5L7V_bn

⚛️ React.js Playlist:
https://youtube.com/playlist?list=PLwGdqUZWnOp1Rab71vx2zMF6qpwGDB2Z1&si=sDZRxsYNetYmojKd

💻 TypeScript Playlist:
https://youtube.com/playlist?list=PLwGdqUZWnOp0xfHQFmlL52b_6-QZ0mnk_&si=c4jfsd5ElDC1p0A5
------------------------------------------------------------------------------------
💸 Get All My YouTube Videos' Source Code for just ₹199! Grab Now - https://thapatechnical.shop/source-code

📺 Watch the complete Node.JS Playlist here :https://youtube.com/playlist?list=PLwGdqUZWnOp3KELplHtc-RnJ5xTUPqdgH&si=_ob8F88HYxCdspup

🔥 Access Source Code, PPT & Notes here for Free : https://www.thapatechnical.com/2024/11/introduction-to-nodejs.html
------------------------------------------------------------------------

🚀 Boost Your Skills with these Pre-Requisite Videos:

🔗 Best HTML Course - https://youtu.be/5ccq_nLHneE
🔗 Best CSS Course - https://youtu.be/MSICFljRcb4
🔗 JavaScript Basics Course Part 1 - https://youtu.be/13gLB6hDHR8
🔗 JavaScript Advanced Course Part 2 - https://youtu.be/YwsOCN8woA8

------------------------------------------------------------------------
💸 Build Your Own E-commerce Website for Free! - https://www.thapatechnical.com/2024/03/build-complete-ecommerce-website-using.html

------------------------------------------------------------------------
✌️ Join Us!

🚀 Become a Member: Unlock perks, free source code, and more Join Now : https://www.youtube.com/channel/UCwfaAHy4zQUb2APNOGXUCCA/join
📷 Connect on Instagram: https://www.instagram.com/thapatechnical
🗨️ Join Our Discord Server: Hang out with fellow programmers Discord Link: https://discord.gg/MdScmCsua6

------------------------------------------------------------------------

⌛TIMELINE⏳
0:00 Introduction – Pagination in Job Portal App
0:16 Pagination Basics & Folder Structure
1:30 Understanding Limit & Offset (Core Concept)
6:50 Applying Pagination in Database Query
7:30 Fetching Total Job Count from DB
11:15 Calculating Start & End Pages
12:30 Edge Case Issue (First & Last Page Problem)
14:30 Fixing Current Page Logic (Critical Step)
15:40 Building Visible Page Array (Sliding Window)
16:30 Preserving Filters with Pagination
18:40 Final UI Implementation using shadcn
22:10 Pagination Bug with Filters (Real-world Issue)
23:10 Support & Outro