FastAPI backend for the MeetAI Fivetran Challenge project. This backend processes meeting data, performs analytics, and provides APIs for the frontend application.
- Meeting Management: Create, read, update, and delete meetings
- Participant Tracking: Manage meeting participants and their data
- Sentiment Analysis: Store and analyze sentiment data from meetings
- Analytics Dashboard: Comprehensive analytics and insights
- Workforce Metrics: Track department-wise performance metrics
- Data Connectors: Manage Fivetran and custom data connectors
- Python 3.8+
- PostgreSQL database
- pip package manager
- Navigate to the backend directory:
cd backend- Install dependencies:
pip install -r requirements.txt-
Configure environment variables:
- Copy
.env.exampleto.env(if exists) or use the existing.envfile - Update database credentials as needed
- Copy
-
Start the server:
python main.pyThe API will be available at http://localhost:8000
Once the server is running, you can access:
- Interactive API docs: http://localhost:8000/docs
- ReDoc documentation: http://localhost:8000/redoc
GET /meetings- List all meetingsPOST /meetings- Create a new meetingGET /meetings/{id}- Get specific meetingPUT /meetings/{id}- Update meetingDELETE /meetings/{id}- Delete meetingGET /participants- List participantsPOST /participants- Add participantGET /connectors- List data connectorsPOST /connectors- Create data connectorGET /sentiment- Get sentiment dataPOST /sentiment- Add sentiment data
GET /dashboard- Get dashboard dataGET /meetings/{id}/analytics- Get meeting analyticsPOST /meetings/{id}/analytics- Create meeting analyticsGET /sentiment/trends- Get sentiment trendsGET /workforce/metrics- Get workforce metricsPOST /workforce/metrics- Add workforce metricGET /summary- Get analytics summary
- Meeting: Core meeting information
- Participant: Meeting participants
- MeetingAnalytics: Analytics data for meetings
- SentimentData: Sentiment analysis results
- DataConnector: Fivetran connector configurations
- WorkforceMetrics: Department performance metrics
DATABASE_URL=postgresql://username:password@host:port/database
DB_HOST=your_db_host
DB_PORT=5432
DB_NAME=your_db_name
DB_USER=your_db_user
DB_PASSWORD=your_db_password
SECRET_KEY=your_secret_key
ALGORITHM=HS256
ACCESS_TOKEN_EXPIRE_MINUTES=30
The backend is configured with CORS to allow requests from the frontend development servers (ports 3000 and 5173).
For production deployment, update the CORS origins in main.py to match your production frontend URL.
The backend connects to the provided PostgreSQL database:
- Host: 35.226.158.237
- Database: postgres
- Username: fivetran
- Password: (URL-encoded in DATABASE_URL)
The database tables are automatically created when the application starts.