Frontend Setup:
- Vite + React 18 + TypeScript configuration
- Material-UI v7 integration
- React Query for data fetching
- Zustand for state management
- React Router for routing
Project Configuration:
- package.json with all dependencies (React, MUI, TanStack Query, Zustand, etc.)
- tsconfig.json with path aliases (@/components, @/pages, etc.)
- vite.config.ts with dev server and proxy settings
- Dockerfile and Dockerfile.dev for production and development
- nginx.conf for production deployment
- .env and .gitignore files
- docker-compose.yml for local development
TypeScript Types:
- Complete type definitions for all API models
- User, Keyword, Pipeline, Application types
- Monitoring and system status types
- API response and pagination types
API Client Implementation:
- axios client with interceptors
- Token refresh logic
- Error handling
- Auto token injection
- Complete API service functions:
* users.ts (11 endpoints)
* keywords.ts (8 endpoints)
* pipelines.ts (11 endpoints)
* applications.ts (7 endpoints)
* monitoring.ts (8 endpoints)
State Management:
- authStore with Zustand
- Login/logout functionality
- Token persistence
- Current user management
Pages Implemented:
- Login page with MUI components
- Dashboard page with basic layout
- App.tsx with protected routes
Docker Configuration:
- docker-compose.yml for backend + frontend
- Dockerfile for production build
- Dockerfile.dev for development hot reload
Files Created: 23 files
- Frontend structure: src/{api,pages,stores,types}
- Configuration files: 8 files
- Docker files: 3 files
Next Steps:
- Test frontend in Docker environment
- Implement sidebar navigation
- Create full management pages (Keywords, Pipelines, Users, etc.)
- Connect to backend API and test authentication
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
backend:
|
|
build:
|
|
context: ./backend
|
|
dockerfile: Dockerfile
|
|
container_name: news-engine-console-backend
|
|
ports:
|
|
- "8101:8101"
|
|
environment:
|
|
- MONGODB_URL=mongodb://host.docker.internal:27017
|
|
- DB_NAME=news_engine_console_db
|
|
- JWT_SECRET=your-secret-key-change-this-in-production
|
|
- JWT_ALGORITHM=HS256
|
|
- ACCESS_TOKEN_EXPIRE_MINUTES=30
|
|
- REFRESH_TOKEN_EXPIRE_DAYS=7
|
|
volumes:
|
|
- ./backend:/app
|
|
command: python main.py
|
|
restart: unless-stopped
|
|
networks:
|
|
- news-engine-console-network
|
|
|
|
frontend:
|
|
build:
|
|
context: ./frontend
|
|
dockerfile: Dockerfile.dev
|
|
container_name: news-engine-console-frontend
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
- VITE_API_URL=http://localhost:8101
|
|
volumes:
|
|
- ./frontend:/app
|
|
- /app/node_modules
|
|
command: npm run dev
|
|
depends_on:
|
|
- backend
|
|
restart: unless-stopped
|
|
networks:
|
|
- news-engine-console-network
|
|
|
|
networks:
|
|
news-engine-console-network:
|
|
driver: bridge
|