VeSync is a full-stack application. It consists of a Node.js/Express backend and a React/Vite frontend. The entire application is containerized using Docker and Docker Compose for easy setup and local development.
Before you begin, ensure you have the following installed on your machine:
To run the entire application locally with a single command, follow these steps:
git clone <your-repository-url>
cd VeSync-DockerSince sensitive configurations are not tracked in Git, you need to set up your environment variables for the backend.
- Navigate to the backend folder:
cd VeSync-BackEnd - Create a
.envfile based on the required configuration. It should look something like this:PORT=7777 MONGODB_URI=<your-mongodb-connection-string> JWT_SECRET=<your-secret-key> # Add any other required backend variables here
- Return to the root folder:
cd ..
Once your .env file is ready, you can start the complete application using Docker Compose:
docker compose up --build(Optional: Add -d at the end to run it in detached mode in the background).
- Frontend: http://localhost:5173
- Backend API: http://localhost:7777
The Docker setup uses volume mapping, meaning any changes you make to the code in the VeSync-BackEnd or VeSync-FrontEnd folders on your host machine will instantly reflect inside the containers (hot-reloading).
- Backend: Uses
nodemonfor hot-reloading. - Frontend: Uses Vite's native dev server for fast HMR (Hot Module Replacement).