diff --git a/README.md b/README.md index 2d88cb6..e459cb5 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,8 @@ # Hiring Pair Programming Excercise - ## Application Description This is a simple application for fair housing market prediction. The mission is to allow users to list houses, and allow them to easily view and compare all houses in the platform. Currently, users can only post houses, indicate if they are the owner, and view all houses listed in the platform. ### Stack -For simplification purposes, this is only a backend application built using FastAPI. \ No newline at end of file +For simplification purposes, this is only a backend application built using FastAPI. diff --git a/backend/Makefile b/backend/Makefile new file mode 100644 index 0000000..bff6668 --- /dev/null +++ b/backend/Makefile @@ -0,0 +1,20 @@ +# Variables +APP_NAME=app/main.py +VENV_DIR=venv +REQ_FILE=requirements.txt + +# Create virtual environment +venv: + python3 -m venv $(VENV_DIR) + +# Install dependencies +install: venv + $(VENV_DIR)/bin/pip install -r $(REQ_FILE) + +# Run the application +start: install + $(VENV_DIR)/bin/python $(APP_NAME) + +# Clean up +clean: + rm -rf $(VENV_DIR) \ No newline at end of file diff --git a/backend/app/__init__.py b/backend/app/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/backend/app/core/__init__.py b/backend/app/core/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/backend/app/dtos/__init__.py b/backend/app/dtos/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/backend/app/models/__init__.py b/backend/app/models/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/backend/app/models/owner.py b/backend/app/models/owner.py index fb034a2..079a3f4 100644 --- a/backend/app/models/owner.py +++ b/backend/app/models/owner.py @@ -5,3 +5,4 @@ class Owner(SQLModel, table=True): id: int = Field(default_factory=uuid4, primary_key=True) name: str email: str + # TODO add houses diff --git a/backend/app/repositories/__init__.py b/backend/app/repositories/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/backend/app/routers/__init__.py b/backend/app/routers/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/backend/app/services/__init__.py b/backend/app/services/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/backend/pyproject.toml b/backend/pyproject.toml deleted file mode 100644 index f23ec3a..0000000 --- a/backend/pyproject.toml +++ /dev/null @@ -1,12 +0,0 @@ -[build-system] -requires = ["setuptools", "wheel"] -build-backend = "setuptools.build_meta" - -[project] -name = "axiomatic-backend" -version = "0.1.0" -dependencies = [ - "fastapi", - "pydantic", - "uvicorn", -] \ No newline at end of file diff --git a/backend/requirements.txt b/backend/requirements.txt new file mode 100644 index 0000000..0d5f412 --- /dev/null +++ b/backend/requirements.txt @@ -0,0 +1,4 @@ +fastapi +uvicorn +sqlmodel +pydantic \ No newline at end of file