Chat GPT API with SQL Database - Better-Us AI
Problem / Motivation
I developed Better-Us AI — a web-based application designed to help users improve communication in personal relationships. The system integrates OpenAI’s GPT API to analyze user-submitted messages and suggest improved phrasing based on psychological communication principles. My goal was to apply modern backend development techniques while integrating AI-powered language models into a scalable, secure, and database-driven web platform.
This project allowed me to expand my skills into cloud deployment, full-stack API design, user authentication, and relational database management, while also exploring applied NLP use cases.
System Architecture
- Frontend: Built using React for user interaction, form submissions, and profile management.
- Backend API: FastAPI framework used to handle RESTful endpoints, GPT API calls, and business logic.
- User Authentication: Secure login and session management handled via Clerk authentication platform.
- Database: PostgreSQL relational database used to store user profiles, communication preferences, and chat history.
- AI Integration: OpenAI GPT API utilized for real-time message analysis, rewriting, and coaching suggestions.
- Deployment: Hosted on AWS with scalable architecture to handle concurrent users and persistent storage.
Key Technical Challenges
- Designing efficient database schemas for dynamic user profile data.
- Securing API endpoints while integrating third-party authentication flows.
- Handling asynchronous GPT API calls and ensuring consistent user experience.
- Managing state across multiple user sessions and preserving data consistency.
- Deploying backend and frontend components to AWS with proper configuration for scaling and stability.
Future Work & Expansion
- Add support for partner-linked profiles for relationship-specific communication adjustments.
- Implement natural language processing (NLP) models for sentiment analysis and emotion detection.
- Expand AI coaching models to support multiple languages and cultural contexts.
- Add subscription-based features using Stripe integration for monetization.
- Build analytics dashboard for users to track communication improvement over time.
Technologies Used
FastAPI, React, OpenAI GPT API, PostgreSQL, Clerk Authentication, AWS Deployment, SQL Database Design, REST APIs, Full-Stack Web Development