diff --git a/backend/__init__.py b/backend/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/auth.py b/backend/auth.py similarity index 98% rename from auth.py rename to backend/auth.py index 7b13f3c..c7eead7 100644 --- a/auth.py +++ b/backend/auth.py @@ -1,6 +1,4 @@ import datetime -import json -import os from typing import Any, Union import bcrypt @@ -9,7 +7,7 @@ from fastapi import Depends, HTTPException, status from fastapi.security import HTTPBearer from jwt.exceptions import InvalidTokenError -import queries +import backend.queries as queries ACCESS_TOKEN_EXPIRE_MINUTES = 30 # 30 minutes ALGORITHM = "HS256" diff --git a/crypto.py b/backend/crypto.py similarity index 100% rename from crypto.py rename to backend/crypto.py diff --git a/main.py b/backend/main.py similarity index 92% rename from main.py rename to backend/main.py index 5a4e28c..e4094ca 100644 --- a/main.py +++ b/backend/main.py @@ -6,12 +6,12 @@ from fastapi import Depends, FastAPI, HTTPException, status from fastapi.encoders import jsonable_encoder from fastapi.middleware.cors import CORSMiddleware -import queries -from auth import Hasher, create_access_token, get_current_user -from crypto import (deserialize_into_bytes, fernet_decrypt, fernet_encrypt, - generate_random_encryption_key, generate_user_passkey, - serialize_bytes) -from models import Key, Secret, User, UserLogin +import backend.queries as queries +from backend.auth import Hasher, create_access_token, get_current_user +from backend.crypto import (deserialize_into_bytes, fernet_decrypt, + fernet_encrypt, generate_random_encryption_key, + generate_user_passkey, serialize_bytes) +from backend.models import Key, Secret, User, UserLogin app = FastAPI() diff --git a/migration.py b/backend/migration.py similarity index 100% rename from migration.py rename to backend/migration.py diff --git a/models.py b/backend/models.py similarity index 100% rename from models.py rename to backend/models.py diff --git a/queries.py b/backend/queries.py similarity index 100% rename from queries.py rename to backend/queries.py