This project provides a seamless way to connect with and retrieve data from popular services like HubSpot, Notion, and Airtable using OAuth 2.0. It leverages a modern, decoupled architecture with a FastAPI backend and a React-powered frontend, ensuring a robust and user-friendly experience.
The architecture is designed for clarity and maintainability:
├── backend/
│ ├── integrations/ # Service-specific OAuth and data retrieval logic
│ │ ├── airtable.py
│ │ ├── notion.py
│ │ ├── hubspot.py
│ │ └── integration_item.py # Base class for integrations
│ ├── routes/ # API endpoint definitions
│ │ └── logs.py # Centralized logging route
│ ├── config.py # Application configuration
│ ├── logger.py # Custom logging setup
│ ├── main.py # FastAPI application entry point
│ ├── redis_client.py # Redis interaction layer
│ └── requirements.txt # Backend dependencies
└── frontend/
├── public/ # Static assets
└── src/ # React application source
├── integrations/ # UI components for each integration
│ ├── airtable.js
│ ├── notion.js
│ └── hubspot.js
├── services/ # Reusable utility functions
│ └── logger.js # Frontend logging service
├── App.js # Root component
├── data-form.js # Component for displaying and submitting data
└── integration-form.js # Component for selecting integrations
-
Environment Setup:
cd backend python3 -m venv venv source venv/bin/activate # or venv\Scripts\activate on Windows pip install -r requirements.txt
-
Redis: Ensure Redis is running:
redis-server
-
Launch the API:
uvicorn main:app --reload
(Accessible at
http://localhost:8000)
-
Dependencies:
cd frontend npm install -
Start Development Server:
npm start
(Accessible at
http://localhost:3000)
- Simplified OAuth: Streamlined OAuth 2.0 flows for HubSpot, Notion, and Airtable.
- Unified Logging: Comprehensive logging across both frontend and backend for easy debugging and monitoring.
- State Management: Redis utilized for secure and efficient OAuth state handling.
- Robust Error Handling: Proactive error management at both the client and server levels.
- Performance Monitoring: Built-in mechanisms for API call tracking.
- User Activity Logging: Detailed logs of user interactions.
The API documentation is available at http://localhost:8000/docs when the backend is running.
POST /integrations/{service}/authorize: Initiate the OAuth authentication process.GET /integrations/{service}/oauth2callback: Handle the OAuth callback.POST /integrations/{service}/credentials: Retrieve stored credentials.POST /integrations/{service}/load: Fetch data from the connected service.
- Backend: Logs are organized in
backend/logs/with separate files for application, errors, and integration-specific logs. - Frontend: Development logs are visible in the browser console. Production logs are forwarded to the backend.
- Frontend: Error boundaries and Axios interceptors for robust error handling.
- Backend: Exception handlers and detailed log entries.
- OAuth: State verification and token management safeguards.
- CORS configuration to control cross-origin requests.
- OAuth state token validation.
- Redis for secure token storage with expiration.
- Environment variable configuration to protect sensitive data.
This project is released under the MIT License. Refer to the LICENSE file for full details.