Certainly! Here is the updated README with instructions for setting up both the backend and frontend services, along with usage guidance:
# Money Exchange Backend and Frontend System
This repository contains the backend and frontend code for a money exchange system. The backend provides endpoints for managing transactions, branches, and currency exchange rates, while the frontend serves as the user interface for interacting with the system.
## Getting Started
To set up and run the backend and frontend system locally, follow these instructions:
### Prerequisites
- Docker
- Docker Compose
- Node.js and npm (for frontend development)
### Installation
1. Clone this repository to your local machine:
```bash
git clone https://github.com/MgPhone/SuperMarketBE.git-
Navigate to the project directory:
cd SuperMarketBE -
Create a
.envfile:Copy the contents of the
env_samplefolder into a new file named.envin the project directory. Update the variables in the.envfile with your specific configurations, such as database connection strings and API keys. -
Build the Docker images:
docker-compose build
To run this project, you'll need Docker installed on your system. We recommend using Docker Desktop, which provides an easy-to-use interface for managing Docker containers on both Windows and macOS.
Follow these steps to install Docker Desktop:
- For Windows: Install Docker Desktop for Windows
- For macOS: Install Docker Desktop for Mac
If you're using Linux, you can install Docker Engine by following the instructions here.
-
Start the Docker containers:
docker-compose up -d
-
Set up the frontend:
Navigate to the frontend directory, install the dependencies, and start the development server:
cd frontend npm install npm run dev -
Access the frontend and backend services:
- Frontend: Navigate to
http://localhost:5173in your web browser. - Backend: Once the containers are up and running, you can access the backend services by navigating to
http://localhost:5000in your web browser or sending requests using Postman.
- Frontend: Navigate to
-
Test the endpoints:
Use the provided Postman template (
money-exchange.postman_collection.json) to test the endpoints of the backend. Import the Postman template into Postman and execute the requests to interact with the money exchange system.
This README now includes comprehensive instructions for setting up both the backend and frontend services, along with usage guidance.