Deployment of the Project
Deployment and Final Touches
You’ve successfully built a fully functional image carousel app using React and Vite. Your users can now upload their own images, view them in a beautiful, animated carousel, and interact with navigation buttons and thumbnails. By the end of this module, your carousel app will be live on the web and ready to share.
Uploading Your Carousel App to GitHub
We'll start by uploading our local project to GitHub so it's safely stored and easily deployable.
Step 1: Initialize Git in Your Project
Open your terminal in the root folder of your carousel app (where package.json exists), and run:
git init
git add .
git commit -m "Initial commit"
Step 2: Create a GitHub Repository
- Go to GitHub.com
- Click the "+" icon → New repository
- Name it something like carousel-app-react
- Do not select README or .gitignore (leave it empty)
- Click Create repository
Step 3: Push Local Code to GitHub
Back in your terminal, push your code to the new repository:
git branch -M main
git remote add origin https://github.com/your-username/carousel-app-react.git
git push -u origin mainIf it’s your first time pushing to GitHub, configure your credentials:
git config --global user.name "Your Name"
git config --global user.email "your@email.com"After pushing, your complete code will be visible on GitHub.
Deploying to Netlify
Now that your app is stored on GitHub, it's time to deploy it online using Netlify.
Step 1: Build Your App for Production
Use Vite’s build command to generate optimized files:
npm run build
This creates a dist/ folder containing everything Netlify needs to deploy your site.
Step 2: Create a Netlify Account
- Go to Netlify
- Sign up or log in with GitHub
- Click Add new site → Import an existing project
Step 3: Link to Your GitHub Repository
- Authorize Netlify to access your GitHub
- Select the carousel-app-react repository you just pushed
Step 4: Configure Deployment Settings
In the setup screen, enter the following:
- Build command: npm run build
- Publish directory: dist
Then click Deploy Site
In a few moments, your app will be live on a temporary URL, such as:
https://your-carousel-site.netlify.app/
You can customize the URL by going to Site Settings → Change Site Name.
You’re Live!
Your carousel app is now fully functional and live on the internet. You’ve gone from building UI and functionality in React to deploying it using modern tools like GitHub and Netlify. Congratulations on completing the carousel app build and deployment!


