A monorepo containing multiple interview practice projects built with React and Vite. All projects share the same dependencies from a single package.json file for easier management.
# Install all dependencies once
npm install
# List available projects
npm run list-projects
# Run a specific project
npm run dev:holidays # Public Holidays App
npm run dev:basic-app # Basic Vite React Appinterview-practice/
├── package.json # Shared dependencies for all projects
├── vite.config.js # Config for basic React app
├── src/ # Basic React app source
├── projects/ # Individual practice projects
│ └── public-holidays/ # Public Holidays project
│ ├── src/
│ ├── index.html
│ ├── vite.config.js
│ └── README.md
└── README.md # This file
- Port: http://localhost:3001
- Description: Shows national holidays for different countries
- Features: Country dropdown, holiday listing, React Query, Paper CSS
- API: OpenHolidays API integration
- Port: http://localhost:3000
- Description: Simple Vite + React starter template
- Features: Counter component, modern CSS
All projects use these shared dependencies:
- React 18.2 - UI framework
- Vite 5.0 - Build tool and dev server
- React Query - Data fetching and caching
- Axios - HTTP client
- ESLint - Code linting
npm run dev- Run default project (basic app)npm run dev:basic-app- Run basic React app on port 3000npm run dev:holidays- Run public holidays app on port 3001
npm run build- Build default projectnpm run build:basic-app- Build basic React appnpm run build:holidays- Build public holidays app
npm run preview:basic-app- Preview built basic appnpm run preview:holidays- Preview built holidays app
npm run lint- Lint all projectsnpm run clean- Clean build artifacts and cachenpm run list-projects- Show available projects
- Single Dependency Management - One
package.jsonfor all projects - Consistent Versions - All projects use the same library versions
- Easy Setup - One
npm installfor everything - Reduced Disk Space - Shared
node_modules - Simplified Maintenance - Update dependencies in one place
To add a new interview practice project:
- Create a new folder in
projects/ - Add the project files (src/, index.html, vite.config.js)
- Update root
package.jsonwith new scripts:"dev:project-name": "vite --config projects/project-name/vite.config.js"
- Configure vite.config.js with appropriate ports and paths
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
export default defineConfig({
plugins: [react()],
root: 'projects/your-project-name',
build: {
outDir: '../../dist/your-project-name'
},
server: {
port: 3002, // Use next available port
open: true
}
})-
Clone and setup:
git clone <repo> cd interview-practice npm install
-
Start developing:
npm run dev:holidays # or any other project -
Add more projects as needed following the structure above
Happy coding! 🚀