Overview
Clínica Vitalis consists of two main components that need to be installed separately:- Backend: Node.js API server with Express and Sequelize
- Frontend: React application built with Vite and Material-UI
Prerequisites
Before installing Clínica Vitalis, ensure you have the following installed:- Node.js: v18.0.0 or higher
- pnpm: v10.20.0 or higher (specified package manager)
- Git: For cloning the repository
The project uses pnpm as its package manager. While npm or yarn might work, pnpm is recommended for consistency.
Backend Installation
Install Dependencies
Install all required backend dependencies using pnpm:This will install the following key dependencies:
- express (v5.1.0): Web framework
- sequelize (v6.37.7): ORM for database operations
- sqlite3 (v5.1.7): SQLite database driver
- bcryptjs (v3.0.3): Password hashing
- jsonwebtoken (v9.0.2): JWT authentication
- dotenv (v17.2.3): Environment variable management
- cors (v2.8.5): CORS middleware
- express-validator (v7.3.1): Request validation
Configure Environment Variables
Create a
.env file in the backend directory. See the Configuration page for details.Initialize Database
The database will be automatically created when you first start the server. See Database Setup for more information.
Frontend Installation
Install Dependencies
Install all required frontend dependencies:This will install the following key dependencies:
- react (v19.2.0): UI library
- react-router-dom (v6.30.2): Routing
- @mui/material (v7.3.6): Material-UI components
- @reduxjs/toolkit (v2.11.0): State management
- react-redux (v9.2.0): Redux bindings for React
- redux-persist (v6.0.0): State persistence
- react-hook-form (v7.66.1): Form handling
- jwt-decode (v4.0.0): JWT decoding
- sweetalert2 (v11.26.3): Alert dialogs
- date-fns (v4.1.0): Date utilities
Starting the Application
Development Mode
.env file (default: 3000), and the frontend will typically start on port 5173.
Production Build
Verifying Installation
To verify that everything is installed correctly:Troubleshooting
Port Already in Use
If you get a “port already in use” error, either:- Change the
PORTin your.envfile - Kill the process using that port:
