Prerequisites
Before you begin, ensure you have the following installed on your system:Node.js
Version 18.0 or higher recommended
Package Manager
npm (included with Node.js), yarn, or pnpm
Q-Sopa uses React 19.2.0 and Vite 7.3.1 as its core build tooling.
Getting Started
Install Dependencies
Install all required packages using your preferred package manager:This will install:
- React 19.2.0 - UI library
- React DOM 19.2.0 - DOM-specific methods
- Vite 7.3.1 - Build tool and dev server
- Tailwind CSS 4.2.1 - Utility-first CSS framework
- ESLint - Code linting
- Autoprefixer & PostCSS - CSS processing
Configuration Files
Vite Configuration
The project uses a minimal Vite configuration located invite.config.js:
vite.config.js
The Vite React plugin provides Fast Refresh support using Babel for optimal development experience.
ESLint Configuration
Q-Sopa uses the modern flat config format ineslint.config.js:
eslint.config.js
- React Hooks rules for proper hook usage
- React Refresh for HMR compatibility
- Custom rule: allows unused variables starting with capital letters or underscores
Package.json Scripts
The following scripts are available inpackage.json:
package.json
Development Workflow
Running the Development Server
Start the Vite development server for local development:- Hot Module Replacement (HMR) for instant updates
- Fast refresh for React components
- Error overlay for build errors
- Optimized dependency pre-bundling
Linting Your Code
Run ESLint to check for code quality issues:Building for Production
Create an optimized production build:- Runs the Vite build process
- Bundles and minifies JavaScript
- Optimizes CSS and assets
- Outputs to the
dist/directory
Preview Production Build
Test the production build locally before deployment:dist/ directory on a local server, allowing you to verify the production build behavior.
Environment Variables
The API base URL is configured insrc/services/api.js:
src/services/api.js
For local development with a different API endpoint, you can modify this value or use Vite’s environment variable system with
.env files.Next Steps
Project Structure
Learn about the file organization and directory structure
Styling Guide
Understand the CSS approach and styling conventions
