
Explore Next.js and TypeScript with Shopify integration in a full guide. This short introduction frames the course scope and the key concepts for development.
Explore the varicella commerce open source project powering this course on Next.js and TypeScript, with official Shopify support, opportunities to contribute, and guidance to master the codebase and structure.
Develop practical debugging skills for this course by reading error messages, resolving issues quickly, and using the provided code, linked files, and Google searches to fix problems.
initiate a Next.js project with optional TypeScript, set up in Visual Studio Code, and run the dev server on localhost:3000 to preview an e-commerce app.
Initialize a Next.js project with TypeScript support, create a tsconfig.json, install TypeScript and @types/react, and set up a typed tsx file to define variables and functions.
Explore function parameters in TypeScript by building a simple personal info function that logs name and age, using string interpolation and explicit string and number types.
Learn to create custom types in TypeScript for a user object with name and age, using inline types, a type alias, and an interface, and compare their differences in practice.
Explore function types in TypeScript by contrasting interfaces and type aliases, define a function signature with name string and age number, and enforce a string return type.
Explore class types in TypeScript, contrasting interfaces with concrete classes, define constructors, and instantiate objects like a person with name and age, including default values and initialization.
Explore optional parameters in TypeScript by using question marks and defaults, enabling calls with a name only and age defaulting to zero in objects and functions.
Explore type narrowing in TypeScript by guarding unions (string or number) with typeof checks, using conditional logic, and leveraging common properties like length to safely operate.
Extend interfaces to create specialized person types by adding salary for business person and publications for academic person, while inheriting name and age from the base interface.
Explore union types in TypeScript, see how race car and city car share only common properties like name, and learn narrowing and extraction techniques to work with specific car types.
Explore TypeScript typecasting and type assertions, using as and angle-bracket syntax to treat a value as a race car or city car, and understand the risks of casting.
Explore interface narrowing in TypeScript by creating a human union of business and academic persons, using a kind field, switch statements, and never types to safely discriminate among cases.
Discover how declaration merging works in TypeScript by merging multiple interface declarations into a single interface, a feature that applies to interfaces—not types—and combines properties like name and age.
Explore how the never type enforces exhaustive checks in a union of car types—race car, city car, and SUV car—and propagates changes across the codebase with max speed constraints.
Explore generic object types in TypeScript, learning how to constrain objects by key and value types, use unions, and safely pass object literals to functions.
Explain how the void type defines functions that return no value, contrast with any, and illustrate defining function types and call signatures that return void.
Explore generics in TypeScript by building a simple array iteration using a generic items type, applying for each, and handling strings and numbers with type-safe operations like toUpperCase.
Learn how to constrain generics with extends in TypeScript, using a Laguerre class and a Person interface to ensure implemented classes provide required properties.
Understand default values of generics in TypeScript, including constraints and extends. See examples with Person and Car interfaces and learn how defaults must satisfy constraints.
Explore generics in types and interfaces by extending base types, default values, and optional parameters, using a logger to log student data and postgraduate workflows.
Explore using a generic single type with the ternary operator to derive the single element type from array types of string, number, or a person interface in TypeScript.
Explore mapped types and index types in TypeScript, and learn to define custom object types with string keys and string or number values, using generic type parameters.
Master the infer keyword to extract a function’s return type from generic parameters, and tailor type utilities for functions that return string, boolean, or objects.
Master the TypeScript keyof operator to extract keys from a type and build flexible person-based models using name and age, with key-driven access and type safety.
Learn to infer the return type of a promise in TypeScript and apply it to function arguments, using async/await and precise props typing for reliable data handling.
Learn how to infer the get static props data in a Next.js and TypeScript setup by returning product data through props and using revalidate every four hours.
Create a reusable, framework-based get all products module for Shopify that returns a hard-coded product list, with export default and an asynchronous, typed promise for future data fetching.
Implement a fetch api function in a Next.js and TypeScript context to request product data from a placeholder endpoint, parse the json response, and return the data for rendering.
Connect to a custom API server and fetch data from a local fake Shopify-like server for testing. Learn GraphQL-style queries and post requests to retrieve product data.
Explore building and testing Shopify GraphQL queries and mutations with a local GraphQL API, examining product, image, and edge connections via the storefront API.
Learn to fetch all Shopify products with a GraphQL query in a Next.js and TypeScript app, building a reusable getAllProducts utility to expose product edges, node data, and images.
Move the fetch API to a dedicated utils module and import it in the products fetch flow. Implement robust error handling with fallbacks using ?? and the || operator.
Define TypeScript schema for Shopify types and implement a generic fetcher return type to shape API data as product connections with edges and pageInfo in a Next.js workflow.
Map product data from a connection by iterating product edges to extract notes and normalize products from a fetch API.
Develop a normalize product images function that converts a Shopify image connection into a normalized image array, mapping edges to image objects with url, alt text, and height.
Define and export a reusable product type in a common framework folder, transforming Shopify GraphQL data into a consistent product interface with image fields and optional properties.
Learn to simplify imports by creating index files in the utils folder to re-export modules like fetch API, get all products, and normalize product, using default and named exports.
What is Next.js?
Next.js is a React-based framework that provides infrastructure and simple development experience for server-side rendered(SSR) & static page applications.
An intuitive page-based routing system (with support for dynamic routes)
Pre-rendering, both static generation (SSG) and server-side rendering (SSR) are supported on a per-page basis
What is Typescript?
TypeScript is an open-source language which builds on JavaScript, one of the world’s most used tools, by adding static type definitions.
Is this course right for you?
If you plan to start your career as a developer or improve your programming skills, this course is right for you. Learn how to build a professional web application inspired by the project of Next JS developers.
Start with learning the Typescript language and progress into building your own e-commerce application.
This resource is the only thing you need to start Web Development with Next.js. During this course, you will get the confidence and skills required to start your own projects. In addition, you will get the right mindset to apply for a developer career and improve in modern frameworks like Next.js and React.js.
What are you going to work on?
You will build an e-commerce application from scratch. You will learn how to write code in Typescript language, a superset of Javascript providing additional features, and a static type checker.
The course starts with an explanation and practical examples of the Typescript language. The typescript section is optional but it explains a lot of types of structures that will be used throughout the course.
After typescript lectures, you will start building your e-commerce app. You will learn how to structure the application in a modular and clean way.
You will build your own React components from the scratch. As the styling framework, the course is utilizing PostCSS and Tailwind CSS which is a great choice for every project.
Later in the course, you will learn the latest patterns on how to use hook functions efficiently. Entire checkout functionality is built on top of the hook functions. Hooks are reactive, modular, and easy to get tested.
At the end of the course, we will hook up the application with Shopify, and we will deploy it to the Vercel platform so anyone on the internet can access it.