A full-stack application that helps social workers manage client information and get AI-powered assistance, with proper client data integration.
- π§βπΌ Complete client data integration with AI responses
- π€ Intelligent context-aware suggestions
- πΎ SQL database storage for all interactions
- π Real-time AI responses with client context
- π‘οΈ Error handling and user feedback
- Backend:
- Node.js π’
- Express.js π
- OpenAI API π§ (GPT-3.5-turbo)
- MSSQL ποΈ
- CORS π
- Frontend:
- HTML5 π
- CSS3 π¨
- JavaScript π¨ (ES6)
- Node.js (v14+)
- npm (v6+)
- SQL Server instance
- OpenAI API key
-
Clone the repository:
git clone https://github.com/yourusername/social-worker-assistant.git cd social-worker-assistant -
Backend setup:
cd backend npm install -
Environment configuration: Create
.envfile in backend folder with:PORT=3000 DB_USER=your_db_username DB_PASSWORD=your_db_password DB_SERVER=your_server_address DB_DATABASE=your_db_name OPENAI_API_KEY=your_openai_key
-
Database setup: Ensure your SQL Server has a table with this structure:
CREATE TABLE Clients ( id INT IDENTITY(1,1) PRIMARY KEY, name NVARCHAR(100), surname NVARCHAR(100), age INT, location NVARCHAR(100), issue NVARCHAR(255), response NVARCHAR(MAX), created_at DATETIME DEFAULT GETDATE() )
-
Start the backend server:
cd backend node src/server.js -
Open in browser: http://localhost:3000
-
View Client Dashboard:
- Automatically loads client information
- Displays name, age, location, and primary issue
-
Send Messages:
- Type your message in the text area
- Click "Send to AI"
- Client context is automatically included
-
View Responses:
- AI responses appear in the response section
- Formatted with proper line breaks
- Includes contextual advice based on client data