This project is created to demonstrate backend knowledge. The React app included here needs to be run to facilitate passing data to the backend via a request and getting the appropriate response so we can visually see the results.
Note: The UI is designed solely to demonstrate functionality and does not represent any effort to create a visually appealing UI.
Follow these steps to get the Receipt Processor app up and running on your local machine.
If you prefer to run the application in a docker container, follow these steps:
- Clone the Repository:
- Open your terminal (command prompt on Windows).
- Navigate to the directory where you want to store the app.
- Run the following command to clone the repository:
git clone https://github.com/sterno2510/receiptProcessor.git
- Navigate to the Project Directory:
- After cloning, navigate into the project directory using:
cd receipt-processor
- Build the Docker Image:
docker build -t receipt-processor .
- Run the Docker Container:
docker run -d -p 3001:3001 receipt-processor
This command builds and runs the Docker container named receipt-processor
, mapping port 3001 on your local machine to port 3001 in the container.
- View the App:
Once the container is running, you can view the app by navigating to http://localhost:3001 in your web browser.
Before you begin, ensure you have the following installed on your computer:
- Node.js: Download and install Node.js from nodejs.org. The Receipt Processor app requires Node.js version 22.2.0.
- Download Node.js:
- Visit nodejs.org.
- Download the Node.js version 22.2.0 installer suitable for your operating system.
- Install Node.js:
- Run the downloaded installer and follow the installation prompts.
- Verify the installation by opening a terminal and running:
This should display
node --version
v22.2.0
.
- Clone the Repository:
- Open your terminal (command prompt on Windows).
- Navigate to the directory where you want to store the app.
- Run the following command to clone the repository:
git clone https://github.com/sterno2510/receiptProcessor.git
- Navigate to the Project Directory:
- After cloning, navigate into the project directory using:
cd receipt-processor
- Install Dependencies:
- Once inside the project directory, install dependencies by running:
npm install
This command will download and install all necessary packages defined in package.json
.
- Start the Development Server:
- To start the server using
nodemon
, run:Make sure your server entry point file is namednodemon server.js
server.js
. Adjust the command if your file has a different name.
- Start the React App:
- Open a new terminal window/tab (while keeping the server running).
- Navigate to the project directory if not already there.
- Start the React app by running:
npm start
This command compiles the React app and opens it in your default web browser. If it doesn't open automatically, you can visit http://localhost:3000
in your browser.
- Explore the App:
- You should now see the Receipt Processor app running locally!
- Click on any of the receipts to test functionality of the backend!