Create a new Vite Project
lessonModern Three.js Course
Scaffold a new project using pnpm create vite, select the Vanilla TypeScript template, and verify the dev server runs correctly.
Browse
Find courses, lessons, articles, talks, and podcasts.
34 results for "vite"
Showing 1–24 · Page 1 of 2
lessonModern Three.js Course
Scaffold a new project using pnpm create vite, select the Vanilla TypeScript template, and verify the dev server runs correctly.
article
_This blog post is based off of a Firebase talk from [ViteConf 2022](https://firebase.blog/posts/2022/08/viteconf-2022). If you prefer the video (with a catchy beat!) you can watch it on [David's Twitter](https://twitter.com/_davideast/status/1588213108505546757)._ [ Vite](https://vitejs.dev/) is amazing. It allows you to build without needing to be a build tools engineer. Whether it's TypeScript, CSS modules, or framework builds… they all work with no config or just a small amount. Enabling Vue support is only a handful of lines. ```js import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' // Seriously, this is it! export default defineConfig({ plugins: [vue()] }) ``` Vite focuses you on what matters, building the website. I work on [Firebase](https://firebase.google.com/) and I'm also the self-proclaimed number one Vite super-fan. Why do I love Vite so much? Well, Vite reminds me a lot of what I like about Firebase. With Firebase, you start off by creating a project. With that project you can create [databases](https://firebase.google.com/docs/firestore/quickstart), [storage buckets](https://firebase.google.com/docs/storage/web/start), [serverless functions](https://firebase.google.com/docs/functions/get-started), [deploy websites](https://firebase.google.com/docs/hosting/quickstart), and set up [authentication](https://firebase.google.com/docs/auth/web/start) all in a few clicks. From [day one](https://firebase.blog/posts/2012/04/developers-meet-firebase) our goal has been to simplify back in development so you can focus on your site. That mission fits perfectly with Vite.  In this article, I'm going to show you the fundamentals of building realtime and authenticated websites on Firebase and Vite. ## Creating a Firebase Project The very first thing you need to do is [create a Firebase Project](https://console.firebase.google.com/). This project will house all of your databases, storage buckets, authenticated users, serverless functions, and so much more.  Once that's done you'll need to create an App. This app stores the configuration that the Firebase JavaScript library needs to talk to your specific Firebase backend.  Don't worry too much about the differences between an App and Project. However if you're curious about it, we have a video that describes [how Firebase Projects and Apps work](https://www.youtube.com/watch?v=27BUpiAXt9M). Now let's get started with some code. ## The Firebase CLI In the Firebase world development starts with our CLI. ```bash npm i -g firebase-tools ``` After installing via npm, I'm gonna unlock an experimental feature. I like to call it "Vite Mode". ```bash firebase experiments:enable webframeworks ``` Okay seriously though, this is a new feature [we recently announced](https://firebase.blog/posts/2022/10/whats-new-at-Firebase-Summit-2022) that auto-detects, runs, and builds popular JavaScript frameworks and tooling like Next.js, Angular, and you guessed it… Vite. From here, you'll run our init command for a specific service like hosting. ```bash firebase init hosting ``` The CLI will prompt you to pick from a list of frameworks and tools. Select Vite and once it's installed, let's get it up and running with the Firebase JavaScript library. ## The Firebase JavaScript library The Firebase JavaScript library is installed through npm. ```bash npm i firebase ``` To set up this library, you have to import an initialized app function, and usually you have to give it a configuration object. ```js import { initializeApp } from 'firebase/app'; const firebaseApp = initializeApp(); ``` However, we have a brand new feature in this experiment called auto init. This automatically initializes the Firebase app with the configuration behind the scenes. So you only need to import the Firebase services you need. ```js // Don't even worry about the firebaseApp! import { getAuth } from 'firebase/auth'; const auth = getAuth(); // We're about do something really cool ``` Now before we do anything else, we need to take the time to follow a best practice in the Firebase world. Setting up the [Emulator Suite](https://firebase.google.com/docs/emulator-suite). ## Following best practices with the Emulator Suite Firebase is cloud-based, but your Firebase development doesn't have to be. The Firebase CLI comes with a set of emulators that allow you to locally run Firebase services. You can run Firestore, Authentication, the Realtime Database, Cloud Functions, and Storage. This is considered a best practice when developing. With the emulators you can develop in isolation, without an internet connection, and easily reset to a seed of data. The Emulator Suite even [comes with a UI](https://www.youtube.com/watch?v=pkgvFNPdiEs) that is tailored for development tasks. To set up the Emulator Suite, run the following command: ```bash firebase init emulators ``` Then select emulators for Firestore, Authentication, and Hosting. You'll then see questions about port numbers and such, but I recommend going with the defaults. Once it's done you can boot up the emulators with the following command: ```bash firebase emulators:start ``` If you'd like to [import from a seed or export any data](https://firebase.google.com/docs/emulator-suite/install_and_configure#startup) you create while the emulators are running you can add two flags. ```bash firebase emulators:start --import=./seed --export-on-exit ``` Now we're set up for best practices. Let's do something cool like detect login state. ## Authentication Firebase Authentication allows you to manage users without running a server. Detecting login state is just a single function: ```js import { getAuth, onAuthStateChanged } from 'firebase/auth'; const auth = getAuth(); onAuthStateChanged(auth, user => { // This callback fires with the user's login state. // If they aren't logged in, it's null // It's also in realtime! So it will fire when a login/logout occurs }); ``` The `onAuthStateChanged()` function takes a call back that fires in real time when a user either logs in or out. If we were to run this function right now, the result would be null because there's no user. Let's change that. Firebase Authentication comes with so many providers to pick from. My favorite is anonymous authentication. It works a bit like "sign in as a guest". It's fantastic for temporary transactions or for merging to a permanent account later on. ```js import { getAuth, onAuthStateChanged, signInAnonymously } from 'firebase/auth'; const auth = getAuth(); onAuthStateChanged(auth, user => { }); signInAnonymously(auth); ``` Notice how the sign in function triggers the listener. This is a core concept in Firebase. We usually don't await the result of an async operation. ```js import { getAuth, onAuthStateChanged, signInAnonymously } from 'firebase/auth'; const auth = getAuth(); onAuthStateChanged(auth, user => { if(user != null) { console.log(user.uid); } }); // Nooooo! While this works (and sometimes is needed) we don't usually await the operation // Why? Because we rely on the listener! That way you get all events instead just the first one const user = await signInAnonymously(auth); ``` We use a listener to keep data flowing in real time. If we used `await` here, we would only get the initial login event and not any subsequent events such as a logout. Now, this user gives us a `uid` property, which is crucial for saving and securing data in a database like FireStore. <EmailSubscribeWidget /> ## NoSQL and Firestore Firestore is a no sequel database which follows a structure of: `collection/document/collection/document`. You can utilize this hierarchy to create data structures that are read by a key to write data. To store a user's chat messages, you can utilize the `uid` key in the path like so: ``` /messages/{uid} ``` Now without needing a query you can get the user's messages by just a single path. Instead of storing all messages at the root of the database, you can store them under a user's collection because documents can have subcollections. ``` /users/{uid}/messages ``` Each time you add a new set of user related data it can become a subcollection underneath a user document. Now you might be asking yourself, which strategy is better? That answer depends on how you will access your data. However, in general this tends not to be a huge problem because you can query across subcollections in [Firestore with Collection Group queries](https://firebase.blog/posts/2019/06/understanding-collection-group-queries). In this case we're going to go with the top level collection approach. Once we know the user is logged in, we'll call a function `syncData()` with the user information. ```js import { getAuth, onAuthStateChanged } from 'firebase/auth'; import { getFirestore, collection, onSnapshot } from 'firebase/firestore'; const auth = getAuth(); const db = getFirestore(); onAuthStateChanged(auth, user => { if(user != null) { syncData(user); } }); function syncData(user) { const messagesRef = collection(db, `messages/${user.uid}`); } ``` This function creates a reference to the messages stored on behalf of that user. And now for the fun part… reading the data in realtime. ```js import { getAuth, onAuthStateChanged } from 'firebase/auth'; import { getFirestore, collection onSnapshot } from 'firebase/firestore'; const auth = getAuth(); const db = getFirestore(); onAuthStateChanged(auth, user => { if(user != null) { syncData(user); } }); function syncData(user) { const messagesRef = collection(db, `messages/${user.uid}`); onSnapshot(messagesRef, snapshot => { const messages = snapshot.docs.map(doc => doc.data()); // Now you can bind them to your UI. Whenever the data changes // The UI will automatically stay up to date. }); } ``` The `onSnapshot()` function takes in a callback that is triggered anytime an update occurs. Inside the listener you can assign the results of the snapshot data to your UI, and now it's in sync. And just like that, we have a real time functioning chat app. Now I want to deploy this, but you know what? There's one more thing to address. ## Security You secure Firestore using our own custom language called [Security Rules](https://firebase.google.com/docs/firestore/security/get-started). Why a custom language? Well, these operations have to run FAST. The database can't update until the operation is run. Security Rules language is designed to run as fast as possible. ### Matching paths in Firestore Security Rules work off of matching the paths of data that you store in Firestore. ```js rules_version = '2'; service cloud.firestore { match /databases/{database}/documents { // This is like a router: messages/:uid match /messages/{uid} { } } } ``` Think of this like a router that matches routes with wildcard segments. ### Allowing read/write operations Once you've matched a path you specify an expression that determines whether a read or write is allowed. ```js rules_version = '2'; service cloud.firestore { match /databases/{database}/documents { // This is like a router: messages/:uid match /messages/{uid} { allow read: if true; allow write: if request.auth.uid == uid; } } } ``` This rule allows anyone to read a message. However, only the user who owns the data can write. Security Rules come with an entire set of variables you can access such as the incoming request. The request tells you who the current authenticated user is and we can use that to match against the `{uid}` wildcard created in the match statement. This is just a simple example but it is incredibly powerful because it can be used in so many ways. ### Updating Security Rules All of this information is great, but where do you actually write Security Rules? Well there are two ways to do this. You can write them directly in the Firebase Console.  The console provides a code editor with some code complete and shows you the history of your changes. However, this will only work for the production database and not for the emulator. We believe that the best practice is to write them directly in your source code. This is also important especially if you are [working on a team with code reviews](https://firebase.blog/posts/2021/01/code-review-security-rules). When you set up the Emulator for Firestore, it created a file named `firestore.rules`. You can write the rules above in that file and the emulator will pick them up automatically. You can also use the CLI to deploy your security rules, so you don't have to go and copy and paste them into the console (that would be gross!). ```bash firebase deploy --only firestore:rules ``` All right, this is secure. Let's ship this! ## Deploying to Firebase Hosting Let's checkout another new feature from the experiment! Typing `firebase deploy` detects Vite, runs the build, and ships it to Firebase Hosting. ```bash firebase deploy ``` You also get this cool web.app subdomain! Firebase Hosting is simple to set up, but it also has a lot of configuration that you can tap into. You can set up rewrites, redirects, custom headers, and much more. If you want to [dive deeper into Firebase Hosting](https://www.youtube.com/watch?v=P0x0LmiknJc) we have a video that covers it all. ## Wrapping things up! As you probably saw, Firebase can do a lot of things: serverless authentication, databases that update in realtime, and so much more. What you may not have seen, was Vite. Like I said earlier, Vite is amazing because it focuses you. Not once during this article did we have to go in and tweak configuration or install a bunch of plugins. Not that plugins and configuration are a bad thing, but it's amazing how far you can go no configuration using Vite. <CourseWidget slug="local-app-development-with-the-firebase-emulator-suite" /> <EmailSubscribeWidget />
lesson
Learn how to set up Vitest and React Testing Library in an existing Vite project. We'll install the necessary packages, configure Vitest with your existing Vite setup, update TypeScript settings, and write a basic unit test that renders a React component and verifies the results of the rendering.
lesson
Start with a basic Vite React TypeScript app and enhance it for production use by integrating Nitro as the server. This requires a custom Vite plugin for nitro as well as a custom renderer and manually creating Nitro config. The other way to approach this would be to add Vite to a Nitro app instead. Same basic result. The [Nitro config reference](https://nitro.unjs.io/config) is a great read of you'd like to explore more options.
lesson
Quick Get Started style introduction to Vite using `pnpm create vite` with the React TypeScript template. See [more in the official docs](https://vite.dev/guide/).
lessonDuration 37sFree
We’ll spin up a Vite project for React and install the required Zag.js dependency to model the pin input component logic.
lessonDuration 3m 16sFree
The app is built on top of [vite](https://vitejs.dev/) instead of the more popular [create react app](https://reactjs.org/docs/create-a-new-react-app.html). The benefit of vite is that it installs and builds extremely quickly. One of the downsides of vite is that it doesn't come with any out-of-the-box testing support. It also has its own [esbuild-based compiler](https://vitejs.dev/guide/features.html#typescript), which is not currently compatible with jest, so we have to configure JSX & TypeScript support for jest even though `vite` handles that already for our app. This lesson requires installing a handful of modules: ``` npm install -D jest npm install -D @testing-library/react @testing-library/jest-dom @testing-library/user-event npm install -D @babel/preset-react @babel/preset-typescript @babel/preset-env npm install -D identity-obj-proxy ``` Each of them serves an important purpose: - [jest](https://jestjs.io/) _runs our tests_ - [@testing-library/react](https://testing-library.com/docs/react-testing-library/intro) adds the ability to render react components inside of our test environment - [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) _allows us to assert that components are in the DOM and contains certain text and classes_ - [@testing-library/user-event](https://testing-library.com/docs/ecosystem-user-event) _allows us to interact with rendered components programmatically_ - [@babel/preset-react](https://babeljs.io/docs/en/babel-preset-react), [@babel/preset-typescript](https://babeljs.io/docs/en/babel-preset-typescript), and [@babel/preset-env](https://babeljs.io/docs/en/babel-preset-env) allow us to use ES6 Modules, JSX, and TypeScript in our tests - [identity-obj-proxy](https://github.com/keyz/identity-obj-proxy#identity-obj-proxy---) is helpful when rendering CSS modules so that we can see the original class names instead of obfuscated ones We also have to add numerous config files such as `babel.config.js` and `jest-setup.ts` which are required to enable all of this functionality. We put our `jest` config in our `package.json` file which works well, but you can also put it in a file named `jest.config.ts` or `jest.config.js`. See the [Jest Configuration Documentation](https://jestjs.io/docs/configuration) for more details about configuring jest.
lessonDuration 41sFree
In this lesson, you'll learn how to set up a new Vite project and configure it to use React with TypeScript.
lessonDuration 39s
In this lesson, you'll globally install the Netlify CLI and use its dev command to run your site locally. Netlify automatically detects if it's a Vite project!
lessonDuration 2m 18s
Vite is a lightning-fast way to start a new project. In this lesson, we will use Vite to generate a new project with Vue as the framework. We'll also take a tour of the project that was generated by Vite. Starting with the `vite.config.js` and going through the `index.html` entry point, down through `main.js` and `App.vue`.
lessonDuration 4m 9s
After all your hard work, it's time to deploy your app! In this lesson, you will learn how to get your project onto GitHub and deploy it using Netlify
course
Build production-ready 3D experiences on the web with Three.js, TypeScript, and Vite. This workshop takes you from an empty project to a modular, maintainable Three.js application using the same architectural patterns you'd reach for on a real product team. You'll start by scaffolding a Vanilla TypeScript Vite project and wiring up `three` with full `@types/three` support. From there, you'll build up the core building blocks of every 3D scene: the Scene, Camera, Renderer, and Canvas. And, develop a mental model for how they fit together before a single pixel hits the screen. Once the fundamentals click, you'll bring the scene to life. You'll add meshes with `BoxGeometry` and `MeshBasicMaterial`, translate and orient them using `position`, `rotation`, and `scale`, and learn what a `Vector3` actually represents in 3D space. You'll drive smooth, frame-rate independent motion with `requestAnimationFrame` and Three.js's `Clock`, and make the canvas feel native to the browser by handling window resize events without stretching or distortion. You'll wire up Tweakpane to build a live debug panel so you can tune scene parameters in real time instead of bouncing back to the editor. The back half of the workshop is where most Three.js tutorials stop, and where this one pushes further. You'll refactor a messy `main.ts` into a set of composable factory functions, each owning its own subsystem (renderer, camera, resize observer) and exposing a `dispose` method for clean teardown. You'll handle Vite's hot module replacement with `import.meta.hot` so cameras, renderers, and WebGL contexts are properly cleaned up between reloads, preventing the memory leaks and duplicated contexts that quietly kill dev performance in real projects. By the end, you'll have a scalable Three.js project structure, a working debug workflow, and the architectural instincts to keep a 3D codebase maintainable as it grows. ## What you'll learn - Scaffolding a Three.js project with Vite and TypeScript - The anatomy of a 3D scene: Scene, Camera, Renderer, Canvas - Transforming objects with position, rotation, and scale - Building a frame-rate independent animation loop - Handling resize and HMR without leaking WebGL contexts - Debugging scenes live with Tweakpane - Factory composition and `dispose` patterns for modular Three.js code ## Who this is for Developers comfortable with TypeScript and modern frontend tooling who want to move past copy-paste Three.js snippets and build 3D applications with the same rigor they'd apply to the rest of their stack.
lesson
In this lesson, we learn how to quickly scaffold a new application using TanStack Router by running `npm create @tanstack/router`. This command initializes a project with the necessary dependencies, including Vite and React plugins for TanStack Router, as well as [React Router DevTools](https://tanstack.com/router/latest/docs/framework/react/devtools). We explore the project structure, focusing on key files like `main.tsx` (which sets up the application using `ReactDOM.createRoot(rootElement)`), and `routeTree.gen.ts`, an automatically generated file that should not be manually edited. This file is dynamically updated when changes are made to the application's routes. The lesson also covers how tooling like VS Code is configured to prevent accidental overwrites of generated files.
lesson
This lesson demonstrates how to give Cursor direct access to your terminal output using the [Nx MCP extension](https://nx.dev/getting-started/ai-integration?utm_source=youtube&utm_medium=videos&utm_campaign=Nx-AI&utm_id=Nx-AI), enabling automatic error detection and fixing in monorepo projects. **Workflow demonstrated in this lesson:** - Encounter a runtime error when serving a Vite application in an Nx monorepo - Install and configure the Nx Console extension with MCP integration - Ask Cursor to check your terminal for errors and fix the underlying issues - Watch as the AI accesses running task details and terminal output through Nx MCP tools - Observe how it analyzes workspace relationships to identify incorrect imports and missing dependencies **Key benefits:** - Seamless Error Handling: AI gains direct access to terminal output and running task information - Automatic Diagnosis: Accurately identify the root cause of errors without manual copying - Context-Aware Fixes: Leverage workspace knowledge to implement proper solutions - Reduced Context Switching: Eliminate the need to manually relay information between terminal and AI
course
Create a serverless application and deploy it in under thirty minutes! We'll be using Netlify, Vite, TypeScript, and React in our project. This stack synergizes extremely well for rapidly developing professional-quality applications. If you haven't heard of Vite, it's the French word for quick! It's also a build tool that consists of a dev-server and an extremely fast bundler. It makes for a rapid development loop. As for the rest. Netlify makes hosting fast and easy with serverless functions and continuous deployment. React enables you to quickly create reusable components. And TypeScript helps you write cleaner code that is easier to refactor. So get started and learn how to use this stack in your own applications!
lesson
In this quick walkthrough, you’ll learn how to drop Nx into an existing npm or pnpm workspace and immediately benefit from project graph visualization, caching, and smart task orchestration, all without rewriting your setup. You’ll start with a standard React monorepo containing a Vite app, a UI package, and utility functions. Then, using a single command (`nx init`), you’ll initialize Nx and see how it auto-detects your existing scripts, builds a dependency graph, and enables advanced features like affected commands and local caching. We're also going to explore optional enhancements using Nx plugins for Vite and React. You’ll see how they help Nx infer tasks directly from your Vite config files, improve DX with the Nx Console VS Code extension, and leverage Nx plugin generators to scaffold code with a consistent structure. What you’ll learn - How to initialize Nx in an existing npm or pnpm monorepo - How Nx understands your workspace structure and scripts - How local caching and affected builds speed up development - How optional Nx plugins improve DX without adding bloat - How to scaffold new packages
podcast
In this episode of What's Good, Joel Hooks sits down with Dev Agrawal, a member of the SolidJS core team, to discuss the evolving landscape of web development, AI-assisted coding, and modern framework architecture. ## Episode Highlights ### SolidJS and Modern Framework Architecture - Detailed comparison between SolidJS and React, highlighting key advantages - Deep dive into Suspense implementation and reactive state management - Overview of Dev's work on cross-boundary reactivity in SolidJS - Discussion of his $7,000 Solid Hack competition winning project - Exploration of stateful server components with WebSocket updates ### AI-Assisted Development - Discussion of AI agents managing tasks and grooming backlogs during meetings - Exploration of using AI tools like Cursor for development - Joel shares his experience building [JoelFit](https://joelfit.app), a full-stack application developed primarily through AI prompting - Analysis of AI's current limitations and the importance of human guidance in development ### Emerging Technologies and Trends - Analysis of React Server Components and their impact on the ecosystem - Discussion of Cloudflare Durable Objects as individual compute units - Introduction to Zero Sync and its implications for local-first applications - Exploration of incremental view maintenance and its performance benefits - Overview of Vite 6's improvements for server components and meta frameworks ### Featured Projects and Resources - [JoelFit (code)](https://github.com/joelhooks/joelfit) - Joel's AI-assisted development project on github - [Solid Suspense Demo v2](https://github.com/devagrawal09/solid-suspense-demo-v2) - Dev's demo showcasing Solid's advantages - [Building Asynchronous UIs Without the Hassle](https://youtube.com/watch?v=pX5r_jTLbvw) - Dev's conference talk ## Key Takeaways - SolidJS offers built-in support for async operations without React's bailout issues - The entire Solid ecosystem was built with suspense support from v1 - Durable Objects are often misunderstood - they're individual compute units rather than just shared state - Zero Sync's incremental view maintenance pairs particularly well with Solid's architecture - React has moved away from traditional SPA towards full-stack architecture - Framework choices continue to evolve with different approaches to reactivity and state management ## Connect with Dev - Watch Dev's talk on [Building Asynchronous UIs Without the Hassle](https://youtube.com/watch?v=pX5r_jTLbvw) - Check out his [Solid Suspense Demo](https://github.com/devagrawal09/solid-suspense-demo-v2) --- *Note: This episode was recorded in January 2024 and discusses emerging technologies and trends in web development.*
lesson
It's fairly trivial to create a React project, but there's always a big hurdle between creating it locally and making it shareable so that someone else can run it. This lesson walks you through the process of automating creating a React project locally, creating the repository where it's going to be hosted, and creating shareable links where it can be run so that you can quickly and easily create single one-off demos and shoot them over to your friends and coworkers for sharing your code ideas in a working environment. ```bash share-react-project() { if [[ -z "$1" ]]; then echo "Usage: share-react-project <project_name>" return 1 fi local project_name="$1" local github_username=$(gh api /user --jq '.login') echo "Creating Vite project: $project_name" pnpm create vite "$project_name" --template react cd "$project_name" echo "Initializing Git repository" git init echo "Adding all files to Git" git add . echo "Creating initial commit" git commit -m "Initial commit" local codesandbox_link="https://codesandbox.io/p/github/${github_username}/${project_name}" echo "Adding CodeSandbox link to README.md" echo "" >> README.md echo "## CodeSandbox" >> README.md echo "[](${codesandbox_link})" >> README.md echo "Adding README.md to Git" git add README.md echo "Committing README.md changes" git commit -m "Add CodeSandbox link" echo "Creating GitHub repository: $github_username/$project_name" gh repo create "$github_username/$project_name" --public echo "Pushing to remote 'origin'" git push -u origin main echo "Project '$project_name' created successfully!" echo "GitHub repository: https://github.com/$github_username/$project_name" echo "CodeSandbox link: $codesandbox_link" } ```
lessonModern Three.js Course
Extract the Three.js camera into a factory function that subscribes to a shared resize observer and returns a dispose method. Learn how to handle Vite's hot module replacement with import.meta.hot to clean up cameras, renderers, and WebGL contexts, preventing duplication and boosting dev performance.
lessonModern Three.js Course
Install the three package and @types/three for full TypeScript support. Import Three.js into the project and confirm the types are working.
lessonDuration 2m 18sFree
Our goal is to create an application that allows us and others to create and manage event listings to help others discover events in their area. The first step in getting there is getting set up with a new application that we can start building upon. In this first lesson, we’ll dig right in by creating a new React application on top of Vite. We’ll learn how we can use an existing template cloned to our local filesystem using degit, to ultimately give us the ability to more quickly start a new project with some templated groundwork that we can use between this and other new projects. We’ll explore our new application including some of the basic UI and routing that will allow us to jump right into getting started wiring it up with Appwrite. **What You’ll Learn** - Create a new React app from a starter template - Get familiar with how the app is organized including routing **Resources** - [Starter](https://github.com/colbyfayock/livebeat-starter)
lessonDuration 1m 51sFree
To start with component testing in Cypress you need to open Cypress and go through setup wizard that will help you out with your first steps. It will take you through a couple of steps, where you’ll install dependencies and create important configuration. Most of this is done for you, but you can customize anything. In our application, we will be working with Vue 3 framework with Vite bundler.
lessonDuration 2m 34s
In order to create applications inside our monorepo, we can use different CLI tools like create-next-app or the Vite CLI. We'll install them inside the apps folder. We will create a blog and a dashboard app, one using create-next-app and the other using the Vite CLI. It is also important to note that the only package-lock.json file that should exist, exists at the root of the project.
lessonDuration 2m 18sFree
All of the code for this application can be found in the [redux-shopping-cart](https://github.com/xjamundx/redux-shopping-cart/tree/testing) github repo, specifically in the `testing` branch. An explanation for how it was built can be found by completing the [Modern Redux with RTK and TypeScript](https://app.egghead.io/playlists/modern-redux-with-redux-toolkit-rtk-and-typescript-64f243c8) course on egghead. To quickly summarize a few of the things you need to know to be successful: 1. This app is built with [Redux Toolkit](https://redux-toolkit.js.org/) which has a slightly different syntax than standard Redux, however the testing examples should all work seamlessly in any Redux application 2. The app is built on top of [vite](https://vitejs.dev/) instead of the more popular [create react app](https://reactjs.org/docs/create-a-new-react-app.html). The benefit of vite is that it installs and builds extremely quickly. One of the downsides of vite is that it doesn't come with any out-of-the-box testing support. It also has its own [esbuild-based compiler](https://vitejs.dev/guide/features.html#typescript), which is not currently compatible with jest, so we have to configure JSX & TypeScript support for jest even though `vite` handles it already. 3. Almost all of the key files for the project are found in the `src/features` folder. "Slice" files are a Redux Toolkit convention and they contain all the redux code for that part of the application. 4. You can get the app started by typing `npm run dev` and opening your browser to [http://localhost:3000/](http://localhost:3000/).