This repository contains a full-stack application with a React frontend (user-frontend
) and a Spring Boot backend (user-backend
). The backend provides APIs that the frontend consumes to display data and perform operations.
Follow the instructions below to set up and run the application locally.
- Git
- Traefik
- Node.js (Version 18 or later)
- Java JDK (Version 17 or later)
- Maven (for building the Spring Boot backend)
- Docker (if you want to run the applications in containers)
git clone https://github.com/bansikah22/user-fullstack.git
cd user-fullstack
1. Navigate to the user-frontend directory:
cd user-frontend
2. Install dependencies:
npm install
1. Run the React development server:
npm start
The React application will run on http://localhost:3001
1. Open a new terminal and navigate to the user-backend directory:
cd user-backend
2. Build the Spring Boot application using Maven:
mvn clean install
3. Run the Spring Boot application:
java -jar target/user-0.0.1-SNAPSHOT.jar
The backend will be accessible at http://localhost:8082
1. Build the Docker images for both the frontend and backend:
docker build -t user-frontend:1.0 ./user-frontend
docker build -t user-backend:1.0 ./user-backend
2. Run the backend container:
docker run -d -p 8082:8082 user-backend:1.0
3. Run the frontend container:
docker run -d -p 3001:80 user-frontend:1.0
Frontend: http://localhost:3001
Backend: http://localhost:8082
docker-compose down -v
docker-compose up -d
Contributions are welcome! Please create a pull request for any improvements or bug fixes.
This project is licensed under the MIT License.