This project demonstrates a scalable, modular integration hub using Python FastAPI, designed to seamlessly incorporate multiple advanced features like Zoho Single Sign-On (SSO) (OAuth 2.0 & OpenID Connect), Zoho WorkDrive APIs, RAG (Retrieval-Augmented Generation), chatbot integrations, and future enterprise APIs β all under one unified architecture.
β Refactored using FastAPI routers for clean, maintainable, and scalable code β perfect for continuously evolving multi-feature use cases!
- β Login with Zoho SSO (OAuth 2.0 + OpenID Connect)
- π Decode
id_token
(JWT) to extract user profile info (name, email, Zoho User ID) - ποΈ Access personal WorkDrive folders (My Folders)
- π₯ Access team folders (Team Folders)
- π§ Future support for RAG (retrieval-augmented generation) modules
- π€ Extendable chatbot integrations (LLMs, agent-based bots, etc.)
- πΌ Maintain user sessions with FastAPI (in-memory or future scalable storage)
- π§© Highly modular router-based structure for adding any number of APIs cleanly
your_project/
βββ main.py # Main FastAPI app entry point
βββ config.py # Central configuration (env vars, API base URLs)
βββ .env # Environment variables (client ID, secret, etc.)
βββ requirements.txt # Python dependencies
βββ README.md # Project documentation (this file)
βββ templates/
β βββ login.html # Login page template
βββ routers/
β βββ __init__.py
β βββ zoho/
β β βββ __init__.py
β β βββ auth.py # Auth routes (login, callback, logout)
β β βββ folders.py # WorkDrive folder routes
β β βββ zoho_client.py # Zoho API helpers
β βββ rag/
β β βββ __init__.py
β β βββ rag_routes.py # Retrieval-augmented generation logic
β β βββ rag_utils.py
β βββ chatbot/
β β βββ __init__.py
β β βββ chatbot_routes.py # Chatbot endpoints
β β βββ chatbot_utils.py
β βββ otherapi/
β βββ __init__.py
β βββ routes.py
β βββ utils.py
βββ constants/
β βββ __init__.py
β βββ response_messages.py # Centralized response messages
β βββ status_codes.py # HTTP status codes
βββ utils/
βββ __init__.py
βββ shared.py # Shared helpers
βββ zoho_folder_helpers.py # Zoho api file itration common function
βββ zoho_client.py
βββ helpers.py
- routers/zoho/ β Zoho SSO and WorkDrive logic.
- routers/rag/ β RAG-based modules (e.g., vector DB queries, knowledge retrieval).
- routers/chatbot/ β AI chatbot integrations and agent logic.
- routers/otherapi/ β additional APIs (placeholder for future integrations).
- constants/ β central definitions for response messages and status codes.
- utils/ β shared helpers and utilities across modules.
1οΈβ£ User clicks Login with Zoho button.
2οΈβ£ Redirected to Zoho OAuth page.
3οΈβ£ User authenticates and grants consent.
4οΈβ£ App exchanges code for tokens (access_token
, id_token
).
5οΈβ£ id_token
is decoded to get user profile.
6οΈβ£ Session stored (initially in-memory, can be upgraded later).
7οΈβ£ User gains access to features like:
- β My Folders
- β Team folders
- π¬ Future: RAG-powered knowledge queries
- π€ Future: Chatbot interactions 8οΈβ£ User can logout anytime.
- π JWT signature validation for production.
- ποΈ Expand WorkDrive to include file upload and management.
- π€ Integrate advanced AI agent workflows.
- π Add RAG for contextual enterprise Q&A.
- π Integrate more SaaS or internal business APIs.
git clone https://github.com/vishwajitvm/FastAPI-Integrations-Hub.git
cd FastAPI-Integrations-Hub
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
Create a .env
file in the root directory and paste:
FLASK_SECRET_KEY=your_secret_key_here
ZOHO_CLIENT_ID=your_zoho_client_id_here
ZOHO_CLIENT_SECRET=your_zoho_client_secret_here
ZOHO_REDIRECT_URI=http://localhost:8000/callback
β οΈ Match your Zoho app redirect URI exactly.
uvicorn main:app --host 127.0.0.1 --port 8000 --reload
Then open http://localhost:8000/ in your browser.
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Create .env and paste credentials
uvicorn main:app --host 127.0.0.1 --port 8000 --reload
.
FastAPI automatically provides interactive and static API documentation out of the box!
http://localhost:8000/docs
-
Interactive interface to explore and test your endpoints directly.
-
Supports authentication flows, parameters, and request bodies.
-
Ideal for developers and API testers.
http://localhost:8000/redoc
-
Clean, well-structured static documentation view.
-
Great for sharing with business or non-technical stakeholders to explain available APIs.
-
Provides easy navigation and human-readable endpoint summaries.
.
No extra setup is needed β both docs are auto-generated from your FastAPI routers and docstrings.
You can customize descriptions, summaries, and request/response schemas directly in your router files using standard FastAPI annotations.
Created by Vishwait VM β vishwajitmall0@gmail.com
Feel free to reach out for questions, suggestions, or collaborations! π