Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Build the backend Docker image
run: docker build -t backend-image ./backend

- name: Build the frontend Docker image
run: docker build -t frontend-image ./frontend
37 changes: 37 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# Node
node_modules/
dist/
npm-debug.log
yarn-error.log

# IDEs
.idea/
.vscode/
*.swp
*.swo

# Environment variables
.env
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,26 @@
# Intelligent-Document-Processing
# Intelligent Document Processing

This project is an intelligent document processing system that can handle various document types, extract information, and provide insights.

## Project Structure

The project is organized into two main components:

- `backend/`: A FastAPI application that provides the core document processing logic and API.
- `frontend/`: A React application that provides the user interface for interacting with the system.

## Getting Started

To run the application locally, you need to have Docker and Docker Compose installed.

1. Clone the repository.

2. Run the application using Docker Compose:
```sh
docker-compose up --build
```

This will start the backend and frontend services.

- The backend will be available at `http://localhost:8000`.
- The frontend will be available at `http://localhost:5173`.
11 changes: 11 additions & 0 deletions backend/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Docker
Dockerfile

# Dependencies
.env
.venv
venv
__pycache__
*.pyc
.git
.gitignore
21 changes: 21 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Use an official Python runtime as a parent image
FROM python:3.10-slim

# Set the working directory in the container
WORKDIR /app

# Install poetry
RUN pip install poetry

# Copy the dependency files to the working directory
COPY pyproject.toml poetry.lock* /app/

# Install any needed packages specified in pyproject.toml
RUN poetry config virtualenvs.create false && \
poetry install --no-root --without dev

# Copy the rest of the application code to the working directory
COPY ./app /app/app

# Command to run the application
CMD ["poetry", "run", "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
Empty file added backend/app/__init__.py
Empty file.
21 changes: 21 additions & 0 deletions backend/app/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware

app = FastAPI()

origins = [
"http://localhost:5173",
"http://127.0.0.1:5173",
]

app.add_middleware(
CORSMiddleware,
allow_origins=origins,
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)

@app.get("/")
def read_root():
return {"Hello": "World"}
Loading