Project Setup
At this point, you should have installed everything necessary to start the development of this project! In this section, we won’t be creating any new content. We will simply set up our Integrated Development Environment (VS Code in this case) so that it’s ready for us to start creating our full-stack application.
Overview:
- Initialize our React Project using Vite (a JavaScript build tool)
 - Install Tailwind CSS into our project
 - Adding a custom font
 - Adding custom colors
 
Are you familiar with Github? Do you know how to create branches so that your team members can work in parallel? If not, we have some resources to get you started on understanding Github and the work flow. Github Resources
It’s imperative that your team understands how to handle merge conflicts and create pull requests. Without this knowledge, working on a project seamlessly together will prove challenging.
Once the project is setup and everyone has access to it, that is when you guys should begin working in separate branches. Don’t make the mistake of everyone creating their own independent project and trying to copy/paste code into each other’s IDEs to combine it.
File Directory Setup
Before we get into creating our first project, we want to make sure that we know where we’re building it.
- Open Visual Studio Code
 - Click on “File” in the top left corner and click on “Open Folder”
 - Navigate to where you want to create your folder. Right-click in the file explorer to create a new folder to hold your project directory. You can skip this step if you already have a folder dedicated to your projects.
- Do note that this folder will be the parent folder and will not be the folder of the actual project files. This means that this folder should be titled something generic such as “Projects” or even simply choose your Desktop.
 - When we run the commands in the future steps, we will be creating a new folder dedicated to the project itself within the folder we are currently in.

 - At this point, your VS Code should be in the working directory of the folder you have recently or previously created.
 
 
Vite
- 
Go to your web browser and search up Vite (or click the embedded link)
- This will link you to the documentation page of Vite.
 - *An essential skill of a programmer is to become comfortable with reading these pages. *
 
 - 
Scroll down to “Scaffolding Your First Vite Project”
- You can follow any of the installation methods listed, but we recommend running this single line in your VS Code terminal: 
npm create vite@latest - To open your terminal, you can find the button in the top bar of VS Code as shown below. You could also use the shortcut 
Ctrl + Shift + `where the last symbol is “back-tick” which can be found below the Escape key.
 
 - You can follow any of the installation methods listed, but we recommend running this single line in your VS Code terminal: 
 - 
Follow the instructions for the installation
- 
You will be prompted to install a package, name your project (whatever you want), and choose what framework you will be using. Below is an example of what this process would look like.
PS C:\Users\diamo> npm create vite@latest
Need to install the following packages:
[email protected]
Ok to proceed? (y) y
? Project name: » HackUTD Guided Project
? Package name: » hackutd-guided-project (Press enter)
? Select a framework: » - Use arrow-keys. Return to submit.
Vanilla
Vue
> React
Preact
Lit
Svelte
Solid
Qwik
Angular
Others
? Select a variant: » - Use arrow-keys. Return to submit.
TypeScript
TypeScript + SWC
> JavaScript
JavaScript + SWC
Remix ↗ 
 - 
 - 
At this point, your terminal should look similar to the output below. Continue following the steps and run the commands.
PS C:\Users\diamo> npm create vite@latest
Need to install the following packages:
[email protected]
Ok to proceed? (y) y
√ Project name: ... HackUTD Guided Project
√ Package name: ... hackutd-guided-project
√ Select a framework: » React
√ Select a variant: » JavaScript
Scaffolding project in C:\Users\diamo\HackUTD Guided Project...
Done. Now run:
cd "HackUTD Guided Project"
npm install
npm run dev
PS C:\Users\diamo> cd '.\HackUTD Guided Project\'
PS C:\Users\diamo\HackUTD Guided Project> npm install
added 257 packages, and audited 258 packages in 19s
100 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
PS C:\Users\diamo\HackUTD Guided Project> npm run dev
> [email protected] dev
> vite
VITE v5.4.10 ready in 438 ms
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ press h + enter to show help - 
Now you should be able to click on the Local server link and see the React + Vite test page. Take some time to mess around with the site. Take note of a few of the features such as the storage and updating of information, hover effects, etc. By the end of this project, you will be able to implement these features on your own.
- To shut off your development server, click on the terminal and hit 
ctrl+cTo start up the server again, executerun devin the terminal. You can find more useful shortcuts in our All Resources in the Essential Shortcuts page. 
 - To shut off your development server, click on the terminal and hit 
 - 
Your file directory should like the screenshot below. We will now briefly explain the directory, but you can learn more about it here. Though this may be confusing right now, eventually it'll all come together.
\root\src\- This folder is where all our code will go. This includes our components, hooks, utilities, and more.
 
\root\public\- This folder is where we can store any downloaded images or other assets such as icons.
 
index.html- This file is the foundational HTML structure that is used to display all of the content in our project.
 
App.css&index.css- Any .css files are used for styling purposes.
 
main.jsxvsApp.jsx- These are both .jsx files but have unique and vitally important purposes.
main.jsxis the entry point for our application. You can think of it as the root of our project.App.jsxon the other hand is where we put all of our React code such as pages and components. Note:App.jsxis a component and is called in themain.jsxfile. 
- These are both .jsx files but have unique and vitally important purposes.
 
The final file structure should look like this. Though there are many components that we haven’t created yet, this serves as a reference for the future.

 - 
Before we move on to the next step, let’s clean up our file directory a little bit. We’re going to be deleting the following things:
App.cssfound in thesrc/foldervite.svgfound in thepublic/folder- The content of 
index.cssfound in thesrc/folder - The folder 
assets/found in thesrc/folder- Do note that we attempt to 
importthis file within ourApp.jsxfile towards the top. Make sure you remove that file to avoid this error. 
 - Do note that we attempt to 
 
 - 
Now your
index.cssfile should be empty and your directory should look like the screenshot below. Let’s move on to the next section! 

Tailwind CSS
As some of you may already know, CSS is what enables us to stylize our web page and make it look nice. Tailwind is a tool that allows us to write CSS effectively and faster. We will now be adding Tailwind into our project using Node Package Manager (NPM). Documentation regarding npm can be found here. For our purposes, you just need to know that the keyword npm is used in the terminal to install packages from the internet directly into our project.
- Go to your web browser and search up Tailwind (or click the embedded link)
 - Click on “Docs” which can be found on the navbar. Proceed to the “Framework Guides” section found in the screenshot below.

 - Within this section, find the Vite installation guide shown in the screenshot below.

 - We can skip Step.1 because we already initialized our project in the previous section. Instead, start at step 2 and run the following commands in your terminal:
 
    npm install -D tailwindcss postcss autoprefixer
    npx tailwindcss init -p
- After running these two commands, we should now see the 
tailwind.config.jsfile in our directory. - As seen in the documentation for step 3, we need to add some lines of code into the file.
 
// inside tailwind.config.js
export default {
  content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
...
}
- Make your way into the 
index.cssfile found in the./srcfolder that should already be empty. Now we can just copy and paste these three lines into it.- If you see squiggly lines, you can ignore those.
 
/*inside index.css*/
@tailwind base;
@tailwind components;
@tailwind utilities; 
Adding a Custom Font
Now that our Tailwind CSS is setup, let’s add a custom font to our project.
- 
Go to your web browser and search up poppins google font (or click on the embed)
 - 
Click on “Get font” found in the top right corner
 - 
Click on
<> Get embed code
 - 
Switch the type to @import and copy the code without the
<style>tags.
 - 
Go back to your
index.cssfile and paste it in at the very top. - 
Also, add this code at the bottom of the file.
bodyapplies the styles to the body of the project. Thebackground-colorwill make the entire background to this yellowish-white color. Yourindex.cssfile should now look like this:

 - 
We want to now add some variations of fonts such as bold and semibold. We can simply go back to the Google Fonts page and copy and paste the entire CSS class list. Now your index.css file should look like this:
 
  /* index.css */
  @import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
  @tailwind base;
  @tailwind components;
  @tailwind utilities;
  body {
      background-color: #fcf7f1;
  }
  .poppins-thin {
      font-family: 'Poppins', sans-serif;
      font-weight: 100;
      font-style: normal;
  }
  .poppins-extralight {
      font-family: 'Poppins', sans-serif;
      font-weight: 200;
      font-style: normal;
  }
  .poppins-light {
      font-family: 'Poppins', sans-serif;
      font-weight: 300;
      font-style: normal;
  }
  .poppins-regular {
      font-family: 'Poppins', sans-serif;
      font-weight: 400;
      font-style: normal;
  }
  .poppins-medium {
      font-family: 'Poppins', sans-serif;
      font-weight: 500;
      font-style: normal;
  }
  .poppins-semibold {
      font-family: 'Poppins', sans-serif;
      font-weight: 600;
      font-style: normal;
  }
  .poppins-bold {
      font-family: 'Poppins', sans-serif;
      font-weight: 700;
      font-style: normal;
  }
  .poppins-extrabold {
      font-family: 'Poppins', sans-serif;
      font-weight: 800;
      font-style: normal;
  }
  .poppins-black {
      font-family: 'Poppins', sans-serif;
      font-weight: 900;
      font-style: normal;
  }
  .poppins-thin-italic {
      font-family: 'Poppins', sans-serif;
      font-weight: 100;
      font-style: italic;
  }
  .poppins-extralight-italic {
      font-family: 'Poppins', sans-serif;
      font-weight: 200;
      font-style: italic;
  }
  .poppins-light-italic {
      font-family: 'Poppins', sans-serif;
      font-weight: 300;
      font-style: italic;
  }
  .poppins-regular-italic {
      font-family: 'Poppins', sans-serif;
      font-weight: 400;
      font-style: italic;
  }
  .poppins-medium-italic {
      font-family: 'Poppins', sans-serif;
      font-weight: 500;
      font-style: italic;
  }
  .poppins-semibold-italic {
      font-family: 'Poppins', sans-serif;
      font-weight: 600;
      font-style: italic;
  }
  .poppins-bold-italic {
      font-family: 'Poppins', sans-serif;
      font-weight: 700;
      font-style: italic;
  }
  .poppins-extrabold-italic {
      font-family: 'Poppins', sans-serif;
      font-weight: 800;
      font-style: italic;
  }
  .poppins-black-italic {
      font-family: 'Poppins', sans-serif;
      font-weight: 900;
      font-style: italic;
  }
Adding Another Custom Font
Now we have successfully imported Poppins into our project. Try importing another font called Inter on your own! Note that for the styling, we will provide the code for the regular and semibold font styles.
At this point, your code should look something like this: answer
Adding custom colors
You might be wondering, ” What’s the point?”
It is ideal to create a color scheme during the initial design of a project. This helps to create a consistent theme across all elements and also simplifies the process of using custom colors that aren’t natively provided in Tailwind. Take a look at this documentation if you have more questions.
We will be adding 5 custom colors, and you can find the code for the entire tailwind.config.js file below:
/** @type {import('tailwindcss').Config} */
export default {
  content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'],
  theme: {
      extend: {
          colors: {
            pastelblue: '#A1CAF1',
            pastelgreen: '#B0E57C',
            pastelpink: '#FDC1C5',
            darkgreen: '#355E3B', 
            darkblue: '#003366',
          },
      },
  },
  plugins: [],
};
Congratulations!
You’ve made it to the end of this section! Another friendly reminder to take a break. Drink some water, touch some grass. When you’re ready, go to the next page where we’ll guide you in the creation of your first React component!
We will assume that you guys have a baseline understanding of HTML, CSS, and Javascript. However, if you require additional resources or help, you can find related documentation here: All Resources