-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathbackend_design.txt
28 lines (21 loc) · 1.1 KB
/
backend_design.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
The backend will be a Python Flask server that handles API requests and interacts with Airtable. It will use the following libraries:
- Flask: for creating the web server
- requests: for making HTTP requests to the Airtable API
- pandas: for data manipulation and CSV export
- plotly: for creating interactive plots
- dash: for creating the interactive dashboard
Key components:
1. AirtableManager class:
- Handles authentication and API calls to Airtable
- Methods: get_table_data(), update_table_data(), sync_data()
2. Flask routes:
- /api/init: Initialize connection with Airtable (POST)
- /api/get_data: Fetch data from Airtable (GET)
- /api/update_data: Update data in Airtable (POST)
- /api/export_csv: Export data to CSV (GET)
- /api/refresh: Refresh data from Airtable (GET)
3. Dash app integration:
- Create Dash app instance
- Define layout with DataTable and buttons
- Callbacks for updating table, exporting CSV, and refreshing data
The server will handle API requests from the frontend, manage the Airtable connection, and serve the Dash app for data visualization and editing.