Skip to content

Adding some developer documentation - #112

Open
xask00 wants to merge 1 commit into
mainfrom
adding-docs
Open

xask00 wants to merge 1 commit into
mainfrom
adding-docs

Conversation

@xask00

@xask00 xask00 commented Aug 24, 2025

Copy link
Copy Markdown
Contributor

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary of Changes

Hello @xask00, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly expands the project's documentation by adding several new markdown files. The new content covers various aspects including different authentication methods, a detailed guide on Google OAuth 2.0 implementation, considerations for application configuration types (global, tenant, team-level), and a comparison of configuration libraries. The overall aim is to provide clearer and more comprehensive guidance for users and developers on how to set up and integrate with the application's features.

Highlights

  • Authentication Methods: New documentation has been added to explain various authentication methods that can be used with the application, including Tailscale Serve, Cloudflare Tunnel, OAuth Proxy, Goauthentik, and Authelia.
  • Configuration Types and Multi-Tenancy: A new document outlines different approaches to configuration, distinguishing between global, tenant-specific, and team-level settings, and discusses considerations for multi-tenancy.
  • Configuration Library Rationale: Documentation has been added to justify the choice of koanf over viper for configuration management, detailing koanf's benefits such as smaller binary size and better extensibility.
  • Google OAuth 2.0 Implementation Guide: A detailed, step-by-step guide for implementing Google OAuth 2.0 has been added, covering the entire flow from client preparation to token exchange and user information retrieval.
  • Langfuse Integration: A new document introduces Langfuse as a potential integration point for the project.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds several new documentation files. The content is a good starting point, but appears to be in a draft state with numerous typos, grammatical errors, and formatting inconsistencies. My review focuses on improving the clarity, accuracy, and professionalism of these documents by correcting these issues and suggesting better structure where needed.

Comment thread docs/config/auth.md
Comment on lines +18 to +24
## OAuth Proxy
https://oauth2-proxy.github.io/oauth2-proxy/


https://goauthentik.io/

https://www.authelia.com/ No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The section for other authentication solutions is a bit sparse and could be more structured. The links for goauthentik and authelia appear under the OAuth Proxy heading, which might be confusing as they are more comprehensive identity providers. Consider restructuring this into a list with brief descriptions for each tool to improve clarity.

Suggested change
## OAuth Proxy
https://oauth2-proxy.github.io/oauth2-proxy/
https://goauthentik.io/
https://www.authelia.com/
## Other Authentication Solutions
- **[OAuth2 Proxy](https://oauth2-proxy.github.io/oauth2-proxy/)**: A reverse proxy and static file server that provides authentication using various providers.
- **[Authentik](https://goauthentik.io/)**: A flexible, open-source Identity Provider.
- **[Authelia](https://www.authelia.com/)**: An open-source authentication and authorization server offering Single Sign-On (SSO) and 2-factor authentication.

Comment thread docs/config/config.md
Comment on lines +17 to +22
# Global Deploment Level Configuration
DB_

# Tenant Namespaced Config
OPENAI_API_KEY
OPENI_API_URL

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

This document contains a couple of typos. 'Deploment' should be 'Deployment', and 'OPENI_API_URL' seems to be a typo for 'OPENAI_API_URL'.

Suggested change
# Global Deploment Level Configuration
DB_
# Tenant Namespaced Config
OPENAI_API_KEY
OPENI_API_URL
# Global Deployment Level Configuration
DB_
# Tenant Namespaced Config
OPENAI_API_KEY
OPENAI_API_URL

Comment thread docs/config/why koanf.md
Comment on lines +7 to +11
1. forces lower case keys ( can be set in configured to become case sensitive)
2. increases binary size by 10 MB at least compare to koanf and plain json
3. not designed to be extended easily
4. large 3rd part dependencies
5. Get() returns refs which can be modified which modified underlying configuration

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The list of reasons for choosing koanf has some grammatical errors that affect clarity. I've suggested some corrections to make the points clearer and more professional.

Suggested change
1. forces lower case keys ( can be set in configured to become case sensitive)
2. increases binary size by 10 MB at least compare to koanf and plain json
3. not designed to be extended easily
4. large 3rd part dependencies
5. Get() returns refs which can be modified which modified underlying configuration
1. Viper forces keys to be lowercase by default (this can be configured to be case-sensitive).
2. It increases binary size by at least 10 MB compared to koanf and plain JSON.
3. It is not designed to be easily extended.
4. It has large third-party dependencies.
5. `Get()` returns references that can be modified, which in turn modifies the underlying configuration.

Comment thread docs/integrations.md
@@ -0,0 +1 @@
https://langfuse.com/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

A bare link doesn't provide much context. It would be more helpful to add a title and a brief description of what Langfuse is and why it's listed as an integration.

Suggested change
https://langfuse.com/
# Integrations
- [Langfuse](https://langfuse.com/): An open-source LLM engineering platform for tracing, debugging, and analytics.

Comment thread docs/oauth.md
Comment on lines +1 to +9
# Step 1 prepaase json
{
clientid
redirect_uri
respons_type
scope
access_type
state
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There are a few typos in this section ('prepaase' -> 'prepare', 'respons_type' -> 'response_type', 'clientid' -> 'client_id'). I've suggested corrections for clarity and consistency with OAuth 2.0 conventions.

Suggested change
# Step 1 prepaase json
{
clientid
redirect_uri
respons_type
scope
access_type
state
}
# Step 1: Prepare request parameters
{
client_id
redirect_uri
response_type
scope
access_type
state
}

Comment thread docs/oauth.md
Comment on lines +11 to +23
# Step 2 Reirect to Google oAuth 2.0
```
https://accounts.google.com/o/oauth2/v2/auth?
///scope=https%3A//www.googleapis.com/auth/drive.metadata.readonly%20https%3A//www.googleapis.com/auth/calendar.readonly&
// for login only need this ->
scope=openid%20email&
access_type=offline&
include_granted_scopes=true&
response_type=code&
state=state_parameter_passthrough_value&
redirect_uri=https%3A//oauth2.example.com/code&
client_id=client_id
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There's a typo ('Reirect' -> 'Redirect'). The example URL in the code block is also a bit confusing with the commented-out lines and extra line breaks. It would be clearer to present a clean, complete example URL on a single line.

Suggested change
# Step 2 Reirect to Google oAuth 2.0
```
https://accounts.google.com/o/oauth2/v2/auth?
///scope=https%3A//www.googleapis.com/auth/drive.metadata.readonly%20https%3A//www.googleapis.com/auth/calendar.readonly&
// for login only need this ->
scope=openid%20email&
access_type=offline&
include_granted_scopes=true&
response_type=code&
state=state_parameter_passthrough_value&
redirect_uri=https%3A//oauth2.example.com/code&
client_id=client_id
```
# Step 2: Redirect to Google OAuth 2.0

https://accounts.google.com/o/oauth2/v2/auth?scope=openid%20email&access_type=offline&include_granted_scopes=true&response_type=code&state=state_parameter_passthrough_value&redirect_uri=https%3A//oauth2.example.com/code&client_id=client_id

Comment thread docs/oauth.md
Comment on lines +47 to +55
{
"access_token": "1/fFAGRNJru1FTz70BzhT3Zg",
"expires_in": 3920,
"id_token": "A JWT signed by google"
"token_type": "Bearer",
// for login scope: "..smaller.."
//"scope": "https://www.googleapis.com/auth/drive.metadata.readonly https://www.googleapis.com/auth/calendar.readonly",
"refresh_token": "1//xEoDL4iW3cxlI7yDbSRFYNG01kVKM2C-259HOF2aQbI"
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The example JSON response contains comments and commented-out lines, which makes it invalid JSON. For clarity and correctness, it's better to provide a valid JSON example and explain the fields in the surrounding text if needed.

Suggested change
{
"access_token": "1/fFAGRNJru1FTz70BzhT3Zg",
"expires_in": 3920,
"id_token": "A JWT signed by google"
"token_type": "Bearer",
// for login scope: "..smaller.."
//"scope": "https://www.googleapis.com/auth/drive.metadata.readonly https://www.googleapis.com/auth/calendar.readonly",
"refresh_token": "1//xEoDL4iW3cxlI7yDbSRFYNG01kVKM2C-259HOF2aQbI"
}
{
"access_token": "1/fFAGRNJru1FTz70BzhT3Zg",
"expires_in": 3920,
"id_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6...",
"token_type": "Bearer",
"scope": "openid email https://www.googleapis.com/auth/userinfo.email",
"refresh_token": "1//xEoDL4iW3cxlI7yDbSRFYNG01kVKM2C-259HOF2aQbI"
}

Comment thread docs/oauth.md
https://developers.google.com/identity/openid-connect/openid-connect


# Step 8 Recommeed by google if user does not exist in db create it now

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There is a typo here. 'Recommeed' should be 'Recommended'. I've also suggested minor capitalization and punctuation improvements for the heading.

Suggested change
# Step 8 Recommeed by google if user does not exist in db create it now
# Step 8: Recommended by Google: if user does not exist in db, create it now

@xask00 xask00 changed the title adding docs Adding some developer documentation Aug 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant