diff --git a/README.md b/README.md
index 81247eb..c186229 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,16 @@
# Trivia-Forge
-Trivia game generator
+
+### About:
+Trivia Forge is a web-based trivia game generator that leverages the ChatGPT API to generate trivia questions, choices, hints, and answers. Users can create their own accounts, allowing them to save and access previously created games.
+
+
+
+### Deployment URL:
+https://trivia-forge.onrender.com
+
+
+
+### Screenshots:
+![Home Page](https://yxdrsdfocuonvorowgaa.supabase.co/storage/v1/object/sign/readme.md/homepage.PNG?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJyZWFkbWUubWQvaG9tZXBhZ2UuUE5HIiwiaWF0IjoxNzE3MzM3ODI5LCJleHAiOjMzMjIxODAxODI5fQ.xZmcZMzwmbCg2d4KAUV2Rljn7gKNONawS_h4Hdy0gas&t=2024-06-02T14%3A17%3A09.538Z)\
+\
+![Game Play](https://yxdrsdfocuonvorowgaa.supabase.co/storage/v1/object/sign/readme.md/gameplay.PNG?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJyZWFkbWUubWQvZ2FtZXBsYXkuUE5HIiwiaWF0IjoxNzE3MzM4MDMxLCJleHAiOjMzMjIxODAyMDMxfQ.fVkeGYVkkaKZfHFC6EC7jtiwsEwODnaIx6enHhmouG8&t=2024-06-02T14%3A20%3A31.742Z)
diff --git a/trivia-forge/backend/endpoints/category.py b/trivia-forge/backend/endpoints/category.py
index 11b003c..147ffd8 100644
--- a/trivia-forge/backend/endpoints/category.py
+++ b/trivia-forge/backend/endpoints/category.py
@@ -1,13 +1,14 @@
+import os
+from dotenv import load_dotenv
from flask import Blueprint, request, jsonify
from supabase import create_client, Client
-from dotenv import dotenv_values
+load_dotenv()
bp = Blueprint('category', __name__, url_prefix='/categories')
-config = dotenv_values("./.env")
-url: str = config.get('SUPABASE_URL')
-key: str = config.get('SUPABASE_KEY')
+url: str = os.environ.get("SUPABASE_URL")
+key: str = os.environ.get("SUPABASE_KEY")
supabase: Client = create_client(url, key)
diff --git a/trivia-forge/backend/endpoints/choice.py b/trivia-forge/backend/endpoints/choice.py
index 3b6896c..f9a36db 100644
--- a/trivia-forge/backend/endpoints/choice.py
+++ b/trivia-forge/backend/endpoints/choice.py
@@ -1,13 +1,14 @@
+import os
+from dotenv import load_dotenv
from flask import Blueprint, request, jsonify
from supabase import create_client, Client
-from dotenv import dotenv_values
+load_dotenv()
bp = Blueprint('choice', __name__, url_prefix='/choices')
-config = dotenv_values("./.env")
-url: str = config.get('SUPABASE_URL')
-key: str = config.get('SUPABASE_KEY')
+url: str = os.environ.get("SUPABASE_URL")
+key: str = os.environ.get("SUPABASE_KEY")
supabase: Client = create_client(url, key)
diff --git a/trivia-forge/backend/endpoints/game.py b/trivia-forge/backend/endpoints/game.py
index 46a92e1..b5a77ee 100644
--- a/trivia-forge/backend/endpoints/game.py
+++ b/trivia-forge/backend/endpoints/game.py
@@ -1,14 +1,14 @@
+import os
+from dotenv import load_dotenv
from flask import Blueprint, request, jsonify
from supabase import create_client, Client
-from dotenv import dotenv_values
-
+load_dotenv()
bp = Blueprint('game', __name__, url_prefix='/games')
-config = dotenv_values("./.env")
-url: str = config.get('SUPABASE_URL')
-key: str = config.get('SUPABASE_KEY')
+url: str = os.environ.get("SUPABASE_URL")
+key: str = os.environ.get("SUPABASE_KEY")
supabase: Client = create_client(url, key)
diff --git a/trivia-forge/backend/endpoints/home.py b/trivia-forge/backend/endpoints/home.py
index af82a78..2d46c17 100644
--- a/trivia-forge/backend/endpoints/home.py
+++ b/trivia-forge/backend/endpoints/home.py
@@ -6,4 +6,4 @@
@bp.get('')
def get_home():
- return 'Welcome to Trivia Forge!'
+ return 'Trivia Forge API'
diff --git a/trivia-forge/backend/endpoints/question.py b/trivia-forge/backend/endpoints/question.py
index c4eaf18..56b91ab 100644
--- a/trivia-forge/backend/endpoints/question.py
+++ b/trivia-forge/backend/endpoints/question.py
@@ -1,13 +1,14 @@
+import os
+from dotenv import load_dotenv
from flask import Blueprint, request, jsonify
from supabase import create_client, Client
-from dotenv import dotenv_values
+load_dotenv()
bp = Blueprint('question', __name__, url_prefix='/questions')
-config = dotenv_values("./.env")
-url: str = config.get('SUPABASE_URL')
-key: str = config.get('SUPABASE_KEY')
+url: str = os.environ.get("SUPABASE_URL")
+key: str = os.environ.get("SUPABASE_KEY")
supabase: Client = create_client(url, key)
diff --git a/trivia-forge/backend/endpoints/user.py b/trivia-forge/backend/endpoints/user.py
index 54a8c04..233c147 100644
--- a/trivia-forge/backend/endpoints/user.py
+++ b/trivia-forge/backend/endpoints/user.py
@@ -1,14 +1,14 @@
+import os
+from dotenv import load_dotenv
from flask import Blueprint, request, jsonify
from supabase import create_client, Client
-from dotenv import dotenv_values
-
+load_dotenv()
bp = Blueprint('user', __name__, url_prefix='/users')
-config = dotenv_values("./.env")
-url: str = config.get('SUPABASE_URL')
-key: str = config.get('SUPABASE_KEY')
+url: str = os.environ.get("SUPABASE_URL")
+key: str = os.environ.get("SUPABASE_KEY")
supabase: Client = create_client(url, key)
diff --git a/trivia-forge/backend/main.py b/trivia-forge/backend/main.py
index cc58b01..53a34be 100644
--- a/trivia-forge/backend/main.py
+++ b/trivia-forge/backend/main.py
@@ -1,7 +1,13 @@
-from flask import Flask, request, jsonify
+import os
+from dotenv import load_dotenv
+from flask import Flask
from endpoints import home, user, game, category, question, choice
from flask_cors import CORS
+load_dotenv()
+
+host = os.environ.get("HOST")
+
app = Flask(__name__)
CORS(app)
@@ -15,4 +21,4 @@
if __name__ == '__main__':
- app.run(debug=True)
+ app.run(host=host, port=5000, debug=True)
diff --git a/trivia-forge/backend/poetry.lock b/trivia-forge/backend/poetry.lock
index 55f1a30..5eca96f 100644
--- a/trivia-forge/backend/poetry.lock
+++ b/trivia-forge/backend/poetry.lock
@@ -130,6 +130,20 @@ Werkzeug = ">=3.0.0"
async = ["asgiref (>=3.2)"]
dotenv = ["python-dotenv"]
+[[package]]
+name = "flask-cors"
+version = "4.0.1"
+description = "A Flask extension adding a decorator for CORS support"
+optional = false
+python-versions = "*"
+files = [
+ {file = "Flask_Cors-4.0.1-py2.py3-none-any.whl", hash = "sha256:f2a704e4458665580c074b714c4627dd5a306b333deb9074d0b1794dfa2fb677"},
+ {file = "flask_cors-4.0.1.tar.gz", hash = "sha256:eeb69b342142fdbf4766ad99357a7f3876a2ceb77689dc10ff912aac06c389e4"},
+]
+
+[package.dependencies]
+Flask = ">=0.9"
+
[[package]]
name = "gotrue"
version = "2.4.2"
@@ -145,6 +159,27 @@ files = [
httpx = ">=0.23,<0.28"
pydantic = ">=1.10,<3"
+[[package]]
+name = "gunicorn"
+version = "22.0.0"
+description = "WSGI HTTP Server for UNIX"
+optional = false
+python-versions = ">=3.7"
+files = [
+ {file = "gunicorn-22.0.0-py3-none-any.whl", hash = "sha256:350679f91b24062c86e386e198a15438d53a7a8207235a78ba1b53df4c4378d9"},
+ {file = "gunicorn-22.0.0.tar.gz", hash = "sha256:4a0b436239ff76fb33f11c07a16482c521a7e09c1ce3cc293c2330afe01bec63"},
+]
+
+[package.dependencies]
+packaging = "*"
+
+[package.extras]
+eventlet = ["eventlet (>=0.24.1,!=0.36.0)"]
+gevent = ["gevent (>=1.4.0)"]
+setproctitle = ["setproctitle"]
+testing = ["coverage", "eventlet", "gevent", "pytest", "pytest-cov"]
+tornado = ["tornado (>=0.2)"]
+
[[package]]
name = "h11"
version = "0.14.0"
@@ -690,4 +725,4 @@ watchdog = ["watchdog (>=2.3)"]
[metadata]
lock-version = "2.0"
python-versions = "^3.10"
-content-hash = "df578e2e22fa0edd5c4a55049e7a8ea9277a5e4330438c29be603fc7a4c9b278"
+content-hash = "ba7787ac15ba772c330b79f6288422264f796377e46c8687f9325194f7c33382"
diff --git a/trivia-forge/backend/pyproject.toml b/trivia-forge/backend/pyproject.toml
index 3627ae6..c2aa474 100644
--- a/trivia-forge/backend/pyproject.toml
+++ b/trivia-forge/backend/pyproject.toml
@@ -10,6 +10,8 @@ python = "^3.10"
supabase = "^2.4.3"
flask = "^3.0.3"
python-dotenv = "^1.0.1"
+flask-cors = "^4.0.1"
+gunicorn = "^22.0.0"
[build-system]
diff --git a/trivia-forge/frontend/src/App.jsx b/trivia-forge/frontend/src/App.jsx
index ca716e8..a2238a2 100644
--- a/trivia-forge/frontend/src/App.jsx
+++ b/trivia-forge/frontend/src/App.jsx
@@ -11,12 +11,9 @@ import SignUpPage from './pages/signUpPage';
import React from 'react';
import 'bootstrap/dist/css/bootstrap.min.css';
-let signedIn = false;
function App() {
- const [count, setCount] = useState(0)
return (
-