Skip to content

Commit

Permalink
adding index and privacy policy
Browse files Browse the repository at this point in the history
  • Loading branch information
zkhan93 committed Aug 20, 2023
1 parent ab099e3 commit f5b8a58
Show file tree
Hide file tree
Showing 5 changed files with 184 additions and 0 deletions.
8 changes: 8 additions & 0 deletions web/app/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import logging

from fastapi import FastAPI, Depends
from fastapi.responses import RedirectResponse
from starlette.middleware.sessions import SessionMiddleware
from fastapi.middleware.cors import CORSMiddleware
from app.auth import check_api_key
Expand All @@ -12,6 +13,7 @@
def create_app(config: Settings) -> FastAPI:
from .auth import auth as auth_app
from .core import core as core_app
from .frontend import frontend as frontend_app

app = FastAPI(title="Youtube Helper",description="a description")
app.add_middleware(SessionMiddleware, secret_key=config.secret_key)
Expand All @@ -22,6 +24,12 @@ def create_app(config: Settings) -> FastAPI:
allow_methods=["*"],
allow_headers=["*"],
)

app.include_router(
frontend_app,
tags=["Frontend"],
prefix="",
)
app.include_router(
auth_app,
tags=["Authentication"],
Expand Down
18 changes: 18 additions & 0 deletions web/app/frontend.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import logging

from fastapi import APIRouter
from fastapi.responses import HTMLResponse


logger = logging.getLogger(__name__)


frontend = APIRouter()

@frontend.get("/")
async def index():
return HTMLResponse(open("./html/index.html", "r").read())

@frontend.get("/privacy")
async def privacy():
return HTMLResponse(open("./html/privacy_policy.html", "r").read())
Empty file removed web/app/templates/index.html
Empty file.
90 changes: 90 additions & 0 deletions web/html/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Youtube Upload Helper</title>
<style>
body {
font-family: 'Arial', sans-serif;
background-color: #f4f4f4;
margin: 0;
padding: 0;
}

.container {
max-width: 800px;
margin: 50px auto;
padding: 20px;
background-color: #fff;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

h1, h2, p {
margin: 0 0 20px 0;
}

h1 {
text-align: center;
color: #333;
}

h2 {
color: #555;
}

p {
color: #666;
}

a {
color: #007BFF;
text-decoration: none;
}

a:hover {
text-decoration: underline;
}

code {
background-color: #f8f8f8;
padding: 5px;
border-radius: 3px;
font-family: 'Courier New', monospace;
}
</style>
</head>
<body>

<div class="container">
<h1>Youtube Upload Helper API</h1>
<h2>About the API</h2>
<p>
The Youtube Upload Helper is a self-hosted application designed to provide a simple API for uploading videos to YouTube.
Especially useful for systems where video files are automatically generated, this tool facilitates the automated process of uploading them to YouTube.
</p>

<h2>How to Use</h2>
<p>
1. Ensure the application is properly set up on your server or platform.<br>
2. Authenticate with your Google account, granting the necessary permissions.<br>
3. Make a POST request to the API endpoint with the following parameters:
<ul>
<li><code>video_file</code>: The video file you wish to upload.</li>
<li><code>title</code>: The title of the video.</li>
<li><code>description</code>: A description for the video.</li>
<li><code>tags</code>: Any tags associated with the video.</li>
</ul>
4. The API will return a response once the video is uploaded successfully.<br>
5. You can check all the available API endpoints <a href="/docs">here</a>.
</p>

<p>
For more details on privacy and data handling, please refer to our <a href="/privacy">Privacy Policy</a>.
</p>
</div>

</body>
</html>
68 changes: 68 additions & 0 deletions web/html/privacy_policy.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Privacy Policy for Youtube Upload Helper</title>
<style>
body {
font-family: Arial, sans-serif;
padding: 20px;
max-width: 800px;
margin: auto;
}
h2, h3 {
color: #333;
}
</style>
</head>
<body>

<h2>Privacy Policy for Youtube Upload Helper</h2>
<hr>
<p><b>Last Updated:</b> 2023-08-20</p>
<hr>

<h3>1. Introduction</h3>
<p>Welcome to "Youtube Upload Helper" (referred to as "we", "our", or "us"). Your privacy is of utmost importance to us. This Privacy Policy outlines the type of information we collect and how we use this information when you use our self-hosted application to manage your YouTube videos via Google's YouTube v3 API.</p>

<h3>2. Information We Collect</h3>
<p>Given the nature of our service, we only collect the minimum amount of data necessary to facilitate the upload of your videos to YouTube. Specifically:</p>
<ul>
<li><b>Google Account Authentication Data:</b> To enable the upload functionality, we require permissions to access your YouTube account. This includes the OAuth token provided by Google after successful authentication.</li>
</ul>

<h3>3. How We Use Your Information</h3>
<ul>
<li><b>To facilitate uploads:</b> We use the authentication data to interact with the YouTube v3 API on your behalf, enabling the upload of videos as per your request.</li>
</ul>

<h3>4. Data Storage and Security</h3>
<ul>
<li><b>Self-hosted nature:</b> The application is self-hosted, meaning all processes and data remain on your server or platform.</li>
<li><b>No persistent data storage:</b> We do not store any of your data persistently. After the upload session is complete, any temporary data used for the operation is deleted.</li>
<li><b>Security measures:</b> We implement industry-standard security measures to ensure that the temporary data used during the upload session is protected from unauthorized access.</li>
</ul>

<h3>5. Data Sharing and Third Parties</h3>
<ul>
<li><b>Google's YouTube v3 API:</b> Your data is shared with Google's YouTube v3 API solely for the purpose of uploading videos. We do not share your data with any other third-party entities.</li>
</ul>

<h3>6. User Rights and Control</h3>
<ul>
<li><b>Revoking Access:</b> You have the right to revoke our access to your YouTube account at any time through your Google Account settings.</li>
</ul>

<h3>7. Changes to This Privacy Policy</h3>
<p>From time to time, we may update this Privacy Policy. If we make any material changes, we will notify users through an updated version of the policy. We encourage you to review this policy regularly to stay informed about how we protect your data.</p>

<h3>8. Contact Us</h3>
<p>If you have questions or concerns about this Privacy Policy or our data practices, please contact us at zkhan1093[at]gmail.com.</p>

<hr>
<p>By using "Youtube Upload Helper", you agree to the terms outlined in this Privacy Policy.</p>

</body>
</html>

0 comments on commit f5b8a58

Please sign in to comment.