Skip to content

Commit 1fc8307

Browse files
committed
setup guide readme
1 parent 9a6fc8b commit 1fc8307

1 file changed

Lines changed: 119 additions & 0 deletions

File tree

README.md

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,3 +378,122 @@ Now you’re all set to run the auto-match and reconcile against your purchase o
378378
*Figure 6: The Auto-Match engine processes your invoice and then confirms a 100% match—every line item and the total perfectly aligned with your Purchase Order.*
379379

380380
Instant peace of mind knowing your invoice is exactly what you ordered.
381+
382+
383+
<a id="getting-started"></a>
384+
## Getting Started
385+
386+
Follow these steps to get MatchFlow up and running locally via Docker Compose.
387+
388+
---
389+
390+
### Prerequisites
391+
392+
#### Local Development Tools
393+
- **Docker Engine** ≥ 20.10
394+
- **Docker Compose** ≥ 1.29
395+
- A modern web browser (Chrome, Firefox, Safari, Edge)
396+
397+
#### Azure Resources
398+
Before running MatchFlow, you need to set up these Azure services:
399+
400+
- **Azure Blob Storage**
401+
- Create a storage account
402+
- Create a container for PDF storage
403+
- Get the connection string and container name
404+
405+
- **Azure Form Recognizer**
406+
- Create a Form Recognizer resource
407+
- Get the endpoint URL and API key
408+
409+
> **Note:** These Azure resources are required for PDF storage and OCR processing. You'll configure them in the `.env` file during installation.
410+
411+
---
412+
413+
### Installation
414+
415+
1. **Clone the repository**
416+
```bash
417+
git clone https://github.com/datpham0412/invoice-processor.git
418+
cd invoice-processor
419+
```
420+
421+
2. **Create environment file**
422+
423+
Copy or create `InvoiceProcessor.API/.env` with the following configuration:
424+
425+
```env
426+
# Database Connection
427+
CONNECTIONSTRINGS__DefaultConnection=Server=(localdb)\\MSSQLLocalDB;Database=InvoiceProcessorDev;Trusted_Connection=True;MultipleActiveResultSets=true
428+
429+
# Development Settings
430+
DISABLE_HTTPS_REDIRECT=true
431+
432+
AZUREBLOB__ConnectionString=
433+
AZUREBLOB__ContainerName=
434+
FORMRECOGNIZER__Endpoint=
435+
FORMRECOGNIZER__ApiKey=
436+
437+
# JWT Authentication
438+
JWT__Key=your-secret-key-here
439+
JWT__Issuer=matchflow
440+
JWT__Audience=matchflow-users
441+
JWT__ExpiresInMinutes=60
442+
```
443+
444+
---
445+
446+
### Configuration
447+
448+
- The Docker Compose network `invoice-net` connects both services.
449+
- **backend** (host 8080 → container 80) reads your `.env` and runs in Production mode.
450+
- **web** (host 3000 → container 80) uses `VITE_API_URL=http://backend/api`.
451+
452+
> **Note:** Populate the `AZUREBLOB__*` and `FORMRECOGNIZER__*` keys in your `.env` file with the Azure resource details you set up in the Prerequisites section.
453+
454+
---
455+
456+
### Running the App
457+
458+
From the project root:
459+
460+
```bash
461+
docker-compose up --build
462+
```
463+
464+
#### Additional Commands
465+
466+
**Run in background:**
467+
```bash
468+
docker-compose up --build -d
469+
```
470+
471+
**View logs:**
472+
```bash
473+
docker-compose logs -f
474+
```
475+
476+
**Stop services:**
477+
```bash
478+
docker-compose down
479+
```
480+
481+
482+
Once up, the frontend is available at:
483+
484+
> **[http://localhost:3000](http://localhost:3000)**
485+
486+
and the API listens on:
487+
488+
> **[http://localhost:8080](http://localhost:8080)**
489+
490+
---
491+
492+
#### Sample Startup Output
493+
494+
```text
495+
Attaching to backend-1, web-1
496+
web-1 | 2025/07/03 02:36:11 [notice] nginx/1.28.0
497+
backend-1 | info: Now listening on: http://[::]:80
498+
backend-1 | info: Application started. Press Ctrl+C to shut down.
499+
```

0 commit comments

Comments
 (0)