The "Start application" workflow is responsible for building and running the Knowledge Graph System, which consists of a React frontend and FastAPI backend.
- Main workflow: "1 - Start Application"
- Sub-workflows:
- "1.1 - Build Frontend Service": Handles frontend build process
- "1.2 - Start Backend Server": Starts the Python backend
The workflow first handles the frontend setup:
cd frontend && npm install && npm run build- Installs Node.js dependencies
- Builds the React application using Vite
- Output is generated in
frontend/dist/
After frontend build completes, the workflow starts the Python backend:
python main.py- Initializes FastAPI server
- Serves both the API endpoints and the built frontend static files
- Uses uvicorn with auto-reload enabled
- Runs on port 5000 (accessible externally on port 80)
- Frontend dev server (when running separately): Port 3000
- Backend API: Port 5000 (mapped to 80 for external access)
- WebSocket connections: Port 5000
- Additional debug port: 8080
The following environment variables are automatically configured:
PYTHONPATH="."- Database connection string (via
DATABASE_URL)
- Automatic restart on file changes
- Concurrent frontend/backend development support
- Static file serving from
frontend/dist - Integrated database connection management
-
Workflow Configuration Issue:
- Main workflow refers to incorrect sub-workflow names
- Should use "1.1 - Build Frontend Service" and "1.2 - Start Backend Server"
- Current references to "1" and "2" prevent proper execution
-
Frontend Build Errors:
- TypeScript errors in test files blocking the build:
- Missing
ClusterResulttype in@shared/schema - Incomplete test data objects (missing required metadata)
- Unused imports in test files
- Missing
- These errors prevent the frontend build step from completing
- TypeScript errors in test files blocking the build:
If the application doesn't start:
- Check if frontend build completed successfully in
frontend/dist/ - Verify Python dependencies are installed
- Check console logs for any startup errors
- Ensure database connection is available
- Verify workflow names match exactly in .replit configuration
- The workflow is configured in the
.replitfile - Frontend changes require rebuilding for production
- Backend changes trigger automatic reload via uvicorn
- Access the application via the provided Replit URL
- The run button is configured to execute this workflow automatically
Until the issues are resolved:
- Use
run.shscript for manual startup - Consider temporarily disabling TypeScript checks during build
- Fix test data to match required types
- Ensure all referenced types are properly exported from schema