Commit graph

6 commits

Author SHA1 Message Date
michael
05a81d075a Change Redis host port to 6399 to avoid port conflict
Port 6380 was also in use. Using 6399 instead.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 17:03:55 -06:00
michael
7f1bc76123 Change Redis host port from 6379 to 6380 to avoid port conflict
Existing Redis instance was using port 6379, causing Docker container
startup failures. Changed host-exposed port to 6380 while keeping
internal container port at 6379.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 17:02:48 -06:00
michael
c66d498d04 configured app to run on custom port with apache reverse proxy, wrote deploy.sh script 2026-02-02 16:56:48 -06:00
SamoilenkoVadym
ddaa963bc2 Fix crypto error by disabling MSAL when Azure AD is not configured
Problem:
- MSAL library was causing crypto errors in browser
- Black screen on load due to MSAL initialization failure
- Error: crypto module not available in browser environment

Solution:
- Made MSAL initialization conditional based on Azure AD configuration
- Only initialize MSAL if REACT_APP_AZURE_CLIENT_ID is properly configured
- Allow simple login to work without MSAL for testing purposes
- Gracefully handle both MSAL and simple login modes

Changes:
- frontend/src/context/AuthContext.tsx:
  * Check if Azure AD is configured before initializing MSAL
  * Set msalInstance to null when Azure is not configured
  * Updated all MSAL calls to check for null before use
  * Simple login works independently of MSAL

- frontend/package.json:
  * Added crypto polyfills as devDependencies (for future use)
  * Packages: crypto-browserify, buffer, stream-browserify, etc.

- frontend/src/styles/theme.css:
  * Added login form styles (login-container, login-card, form-group, etc.)

Benefits:
- No more crypto errors in browser
- Simple login works without Azure AD configuration
- Easy testing with test accounts (admin/user)
- Production Azure AD login still supported when configured
- Graceful fallback for environments without Azure setup

Testing:
- Frontend compiles successfully without crypto errors
- All services running: backend, frontend, postgres, redis
- Simple login working with test accounts
- No black screen on load

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-28 10:56:54 +00:00
SamoilenkoVadym
e100f83cb6 Enable frontend in Docker Compose and add deployment documentation
Changes:
- Uncommented frontend service in docker-compose.yml
- Updated README.md with complete setup instructions for both backend and frontend
- Added DEPLOYMENT.md with comprehensive production deployment guide

Docker Compose:
- Frontend now included in docker-compose up
- All services (postgres, redis, backend, frontend) start together
- Frontend runs on port 3000 with hot reload in development mode

README Updates:
- Added frontend .env setup instructions
- Listed all required environment variables for both services
- Updated "Access the application" section with frontend URL
- Clarified that database tables are created automatically on first run

DEPLOYMENT.md (new):
- Complete production deployment guide
- Server setup with Docker installation
- Production environment configuration
- Nginx reverse proxy setup with SSL/TLS
- Let's Encrypt SSL certificate instructions
- Database backup and restore procedures
- Monitoring and logging setup
- Security checklist
- Performance optimization tips
- Scaling strategies for high-traffic scenarios
- Troubleshooting guide

Now users can:
1. Run `docker-compose up --build` to start all services
2. Access frontend at http://localhost:3000
3. Access backend API at http://localhost:8000
4. Follow DEPLOYMENT.md for production deployment

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-27 21:54:47 +00:00
SamoilenkoVadym
a8151fbe66 Add comprehensive backend test suite and Phase 1 foundation
Backend Tests:
- Add pytest configuration with async support (conftest.py)
- Add model tests: User, Conversation, Message, TokenUsage, Session, UserMemory
- Add configuration tests: Settings validation and environment variables
- Add API tests: Health endpoint and future endpoint stubs
- Add database tests: Connection, transactions, query execution

Phase 1 Foundation:
- FastAPI application structure with main.py
- SQLAlchemy async models for all entities
- Alembic migrations setup
- Configuration management via Pydantic Settings
- Logging system (English only)
- Docker multi-stage builds for backend
- Docker Compose orchestration (PostgreSQL, Redis, backend)
- Frontend React + TypeScript structure
- Dark & Gold theme CSS implementation
- Environment configuration examples

All code and comments in English as per requirements.
Tests cover model relationships, cascade deletes, and constraints.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-27 14:24:59 +00:00