Wealth Watch is a MERN stack application with separate client and server folders. The backend is built with MongoDB and Express, while the frontend is developed using Vite, React, TypeScript, Material-UI (MUI), Recharts, and regression.
.
├── client/
└── server/
The backend folder contains the Express server and MongoDB configuration.
Make sure to create a .env
file in the server/
directory with the following content:
MONGODB_URL="mongodb+srv://<username>:<password>@<cluster>.li0sele.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0"
PORT=1337
Replace <username>
, <password>
, and <cluster>
with your MongoDB credentials.
-
Navigate to the
server/
directory:cd server
-
Install the dependencies:
npm install
-
Start the server:
npm run dev
The server will start on the port specified in the .env
file (default is 1337
).
The frontend folder contains the Vite React TypeScript application.
-
Navigate to the
client/
directory:cd client
-
Install the dependencies:
npm install
-
Start the development server:
npm run dev
The client application will start on the default Vite development server port.
- MongoDB: Ensure your MongoDB cluster is up and running, and the connection string in the
.env
file is correct. - Vite: Vite is used for faster development with React and TypeScript. The project uses various libraries like Material-UI for UI components, Recharts for charts, and regression for statistical analysis.
- Scripts: Common scripts for both
client/
andserver/
includenpm install
for installing dependencies andnpm run dev
for starting the development server.
To run both the client and server concurrently, you can use tools like concurrently
or create separate terminal sessions:
-
Open a terminal and start the server:
cd server npm run dev
-
Open another terminal and start the client:
cd client npm run dev
Now, both the server and client will be running, and you can interact with your Wealth-Watch application.