Skip to content

1.2 Tech Stack Concepts ​

After reading this section, you will gain:

  • An understanding of the layered architecture of a tech stack (frontend, backend, database)
  • Familiarity with the tech stack used in this tutorial and why it was chosen
  • The ability to quickly identify a project's tech stack through package.json

Terms mentioned in the introduction, such as TypeScript and Next.js, make up the tech stack of modern Web development.

What Is a Tech Stack ​

A tech stack is the combination of technologies used to build a project.

Modern Web applications are divided into three layers:

  • Frontend: The interface users see (HTML, CSS, JavaScript)
  • Backend: Server-side logic that processes data (Node.js, Python)
  • Database: Stores data (PostgreSQL, MongoDB)

This tutorial uses the Next.js full-stack framework—frontend and backend in the same project, all started with a single command.

🏗️ Click to explore: Tech stack layered architecture
速度:1x
👤

用户层

Layer 1
🌐Chrome📱iOS/Android💻Desktop
🎨

前端层

Layer 2
⚛️React📘TypeScript🎭Tailwind🧩shadcn/ui
⚙️

后端层

Layer 3
▲Next.js🟢Node.js🔐better-auth🤖AI SDK
💾

数据层

Layer 4
🐘PostgreSQL🌧️Drizzle🔴Redis⚡Supabase
🏗️

基础设施

Layer 5
▲Vercel🐳Docker🌊Nginx🐙GitHub
🏗️

点击左侧层级查看详情

或观看数据包流动动画

📊 本教程技术栈
前端→
后端→
数据→
基础设施

💡 Exercise: Click each layer to view the details and understand the relationship between the frontend, backend, database, and infrastructure.

🎯 Core concept: Modern Web applications are divided into multiple layers, each responsible for different duties and communicating through APIs.

The Tech Stack Used in This Tutorial ​

LayerTechnology ChoicePurpose
FrameworkNext.jsUnified frontend and backend
LanguageTypeScriptType safety
StylingTailwind CSSUtility-first CSS
Component Libraryshadcn/uiReusable UI components
Authenticationbetter-authType-safe authentication
Database ORMDrizzle ORMType-safe database operations
DatabasePostgreSQLRelational database
AI IntegrationVercel AI SDKStreaming AI interactions

Common "wheels" reference

There are millions of ready-made packages on npm. Here are some commonly used ones:

FunctionRecommended Package
Form validationzod
Form managementreact-hook-form
Data fetching@tanstack/react-query
Date/time handlingdate-fns or dayjs
HTTP clientaxios or ofetch
Iconslucide-react
Utility functionslodash

AI will choose the right package based on your needs. You only need to understand the principle of "don't reinvent the wheel."

Why Choose This Tech Stack ​

This tech stack was chosen for AI-native development, with two core principles: make AI more efficient and keep your costs lower.

1. Lower AI comprehension cost

Next.js full-stack = frontend and backend in the same project. The traditional approach requires two projects, CORS configuration, and starting two services; with Next.js, you only need one pnpm dev. The more consistent the project structure, the less likely AI-generated code is to go wrong.

2. Zero deployment cost

OptionCost
Traditional: rent a server¥50-200/month
This tutorial: Vercel/EdgeOneFree

3. npm ecosystem: don't reinvent the wheel

npm is the world's largest open-source code repository, with more than 2 million packages.

bash
# Need user authentication? Ready-made
pnpm add next-auth

# Need to handle dates? Ready-made
pnpm add dayjs

# Need data validation? Ready-made
pnpm add zod

AI does not write code from scratch; it assembles these ready-made "building blocks."

4. PostgreSQL has free hosting

DatabaseFree Hosting Platforms
PostgreSQLSupabase, Neon, Railway
MySQLAlmost none

5. When do you need full-stack?

If you're only building a purely static site (such as a company website), HTML + CSS is enough. When your project needs:

  • A user system (login, registration, permissions)
  • Data persistence (saving user data)
  • Business logic (payments, notifications, email)

then it's time to consider a full-stack tech stack.

Quickly Identifying a Project's Tech Stack ​

When taking over a new project, you can quickly understand its tech stack by checking package.json:

Dependency NameTechnology Type
nextNext.js full-stack framework
reactReact frontend library
typescriptTypeScript type system
drizzle-ormDrizzle database ORM
tailwindcssTailwind CSS styling
aiVercel AI SDK

Once you know the tech stack, you'll know:

  • What type of project it is
  • What environments are needed
  • What keywords to search for when you run into problems

Frequently Asked Questions ​

Q1: Do I need to understand these technologies? ​

You only need to know what they are and what problems they solve—you don't need to know how to write them. AI will handle the coding. You just need to:

  • Be able to understand the project's structure
  • Be able to describe the features you want

Q2: Why use TypeScript instead of JavaScript? ​

TypeScript can catch errors during development, and AI will use it to write code. You only need to know that when you see a .ts extension, it means TypeScript.

Q3: How is this different from the Java/Python taught in college? ​

Traditional teachingAI-native path
Job-orientedProduct-oriented
Study for 6-24 monthsLearn by building projects
Become a programmerUse tools to solve problems

The fundamental difference: most tutorials teach you how to become a programmer, while this tutorial teaches you how to solve problems through products. In the AI era, you don't need to become a programmer—you need to understand the tools, describe the requirements, and have AI help you implement them.

Alpha Preview:This is an early internal build. Some chapters are still incomplete and issues may exist.