medi_ledger/
│
├── backend/
│ ├── config/ # Configuration files
│ ├── controllers/ # API endpoint controllers
│ ├── middlewares/ # Custom middleware
│ ├── models/ # Mongoose models
│ ├── routes/ # API routes definitions
│ ├── utilities/ # Utility functions
│ ├── app.js # Express app setup
│ └── index.js # Server setup and initialization
│
├── frontend/
├── public/ # Public assets and HTML template
├── src/ # React source files
├── assets/ # Images, logos, and static assets
├── components/ # Reusable React components
├── pages/ # Full page components
├── services/ # API service functions for frontend
├── App.js # Main React component
└── index.js # Entry point for React
-
Navigate to the
backend
directory and install dependencies:cd backend npm install
-
Create a
.env
file and configure your environment variables :
PORT=
DATABASE_URL=""
JWT_SECRET=
CLOUDINARY_CLOUD_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=
MAIL_PASSWORD=
MAIL_USER=
MAIL_HOST=
MAIL_PORT=
-
Run the backend server:
npm run dev
-
Navigate to the
frontend
directory and install dependencies:cd frontend npm install
-
Run the frontend server:
npm run dev