A ChatGPT-like interface built with Next.js frontend and C# Web API backend, using Azure OpenAI and Semantic Kernel.
This application currently has NO USER AUTHENTICATION or USER ISOLATION implemented.
- All users can see ALL chat sessions from ALL users
- Chat data is shared globally across all application users
- This is suitable for development/testing only - NOT for production use
See the Security Considerations section below for details on implementing proper user isolation.
- Frontend: Next.js with TypeScript and Tailwind CSS
- Backend: ASP.NET Core Web API with Semantic Kernel
- Database: SQL Server for chat history and sessions
- AI Service: Azure OpenAI with GPT models
- Authentication: Azure AD (optional)
voidbitzchat/
├── backend/ # ASP.NET Core Web API
│ ├── Controllers/ # API controllers
│ ├── Data/ # Entity Framework DbContext
│ ├── Models/ # Data models and DTOs
│ ├── Services/ # Business logic services
│ ├── Migrations/ # EF Core migrations
│ └── Program.cs # Application entry point
├── frontend/ # Next.js React application
│ ├── app/ # Next.js app router pages
│ ├── components/ # React components
│ ├── lib/ # Utility functions and API client
│ └── types/ # TypeScript type definitions
└── .vscode/ # VS Code configuration
- Real-time chat interface similar to ChatGPT
- Custom Chat Naming: Create chats with meaningful, custom titles
- Chat Management: Rename existing chats, create, view, switch between sessions
- Model Deployment Settings: Dynamic configuration of Azure OpenAI model deployments
- Add, edit, and delete model deployments through the UI
- Test connections to verify deployment configurations
- Set default models for new chat sessions
- Referential integrity protection (deployments in use cannot be deleted)
- Complete chat history persistence with user-defined organization
- Context isolation between sessions
- Semantic Kernel integration for advanced AI capabilities
- Comprehensive logging and monitoring
⚠️ NO USER AUTHENTICATION - All data is currently shared between all users
- .NET 8 SDK
- Node.js 18+
- Azure subscription with OpenAI service
- SQL Server (local or Azure)
- .NET 8 SDK
- Node.js 18+
- Azure subscription with OpenAI service
- SQL Server (local or Azure)
-
Clone the repository
git clone <repository-url> cd voidbitzchat
-
Backend Setup
cd backend dotnet restore dotnet ef database update dotnet runBackend will be available at
https://localhost:7061andhttp://localhost:5027 -
Frontend Setup (in a new terminal)
cd frontend npm install npm run devFrontend will be available at
http://localhost:3000 -
Configure Azure OpenAI
- Navigate to
/settingsin the application or - Update
backend/appsettings.Development.jsonwith your Azure OpenAI credentials - Set
AzureOpenAI:Endpoint,AzureOpenAI:DeploymentName, andAzureOpenAI:ApiKey
Recommended: Use the Settings page in the application to manage model deployments dynamically without code changes.
- Navigate to
Use the "Start Full Stack" task from VS Code's Command Palette (Ctrl+Shift+P → Tasks: Run Task) to run both frontend and backend simultaneously.
- Click the Settings icon in the sidebar footer
- Add New Deployment: Click "Add New Deployment" and provide:
- Deployment name (for identification)
- Azure OpenAI endpoint URL
- Model deployment name
- API key
- Set as default (optional)
- Test Connection: Click "Test" to verify the deployment works
- Edit/Delete: Modify existing deployments (cannot delete if referenced by chat sessions)
- Click the "New Chat" button in the sidebar
- Enter a meaningful title for your conversation (e.g., "Planning Weekend Trip", "Code Review Discussion")
- Click "Create Chat" to start your conversation
- Hover over any chat session in the sidebar
- Click the pencil icon that appears
- Enter a new title and click "Save"
- All chats are automatically saved with your custom titles
- Chat sessions are ordered by most recent activity
- Each chat maintains its own conversation context and history
The application currently lacks proper user authentication and isolation:
- Shared Data: All users see the same chat sessions
- No Authentication: No login system implemented
- Global Access: Any user can view, modify, or delete any chat session
Before deploying to production, you MUST implement one of these user isolation strategies:
-
Session-based Identification (Simple)
- Use browser sessions to identify users
- Suitable for anonymous usage
-
Cookie-based User IDs (Recommended for MVP)
- Generate persistent user IDs stored in secure cookies
- No login required, but provides user isolation
-
Full Authentication (Production Ready)
- Implement JWT-based authentication
- User registration and login system
- Role-based access control
The backend is already prepared for user isolation:
ChatSession.UserIdfield exists in the database- Repository methods accept
userIdparameters - Controller has
GetUserId()method (currently returnsnull)
To implement user isolation, you only need to modify the GetUserId() method in ChatController.cs.
This is a development/demo application. See DEVELOPMENT.md for implementation details and security considerations.
For detailed setup instructions, see DEVELOPMENT.md.
For comprehensive model deployment settings documentation, see MODEL_DEPLOYMENT_SETTINGS.md.