- Navigate to backend directory:
cd backend- Create and activate virtual environment:
# On macOS/Linux:
# Option A: Use installation script (recommended)
./install.sh
# Option B: Manual installation
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
# On Windows:
python -m venv venv
venv\Scripts\activate
pip install --upgrade pip setuptools wheel
pip install -r requirements.txtNote: If you encounter Python 3.13 compatibility issues, use Python 3.11 or 3.12:
# Check if Python 3.11 is available
python3.11 --version
# Create venv with Python 3.11 (more stable)
python3.11 -m venv venv
source venv/bin/activate
pip install --upgrade pip setuptools wheel
pip install -r requirements.txt- Install dependencies:
pip install -r requirements.txt- Optional: Set up environment variables
Create a
.envfile in thebackenddirectory:
OPENAI_API_KEY=your_openai_api_key_here
AWS_ACCESS_KEY_ID=optional
AWS_SECRET_ACCESS_KEY=optional
AWS_REGION=us-east-1
Note: The application works without OpenAI API key (uses mock LLM), but for full functionality, add your OpenAI API key.
- Start the backend server:
# Option 1: Use the startup script
./run.sh
# Option 2: Manual start
uvicorn main:app --reload --port 8000The API will be available at:
- API: http://localhost:8000
- API Docs: http://localhost:8000/docs
- Health Check: http://localhost:8000/health
- Open a new terminal and navigate to frontend directory:
cd frontend- Install dependencies:
npm install- Start the development server:
# Option 1: Use the startup script
./run.sh
# Option 2: Manual start
npm run devThe frontend will be available at:
- Frontend: http://localhost:3000
-
Check backend is running:
- Visit http://localhost:8000/docs
- You should see the FastAPI documentation
-
Check frontend is running:
- Visit http://localhost:3000
- You should see the Protein Architect interface
-
Test the application:
- Fill in the protein design form
- Click "Generate Protein"
- Explore the 3D visualization and manufacturing views
curl -X POST "http://localhost:8000/generate_protein" \
-H "Content-Type: application/json" \
-d '{
"target_name": "Test Protein",
"max_length": 150,
"max_cysteines": 5
}'curl -X POST "http://localhost:8000/refine_protein" \
-H "Content-Type: application/json" \
-d '{
"sequence": "MKTAYIAKQRQISFVKSHFSRQLEERLGLIEVQAPILSRVGDGTQDNLSGAEKAVQVKVKALPDAQFEVVHSLAKWKRQTLGQHDFSAGEGLYTHMKALRPDEDRLSPLHSVYVDQWDWERVMGDGERQFSTLKSTVEAIWAGIKATEAAVSEEFGLAPFLPDQIHFVHSQELLSRYPDLDAKGRERAIAKDLGAVFLVGIGGKLSDGHRHDVRAPDYDDWSTPSELGHAGLNGDILVWNPVLEDAFELSSMGIRVDADTLKHQLALTGDEDRLELEWHQALLRGEMPQTIGGGIGQSRLTMLLLQLPHIGQVQAGVWPAAVRESVPSLL",
"refinement_prompt": "Reduce predicted immunogenicity by 20%"
}'Problem: ModuleNotFoundError: No module named 'fastapi'
- Solution: Make sure virtual environment is activated and dependencies are installed
Problem: Port 8000 already in use
- Solution: Change port in
uvicorncommand:uvicorn main:app --reload --port 8001
Problem: CORS errors
- Solution: Check that frontend URL is in
allow_originsinmain.py
Problem: Cannot find module errors
- Solution: Run
npm installagain
Problem: Frontend can't connect to backend
- Solution:
- Check backend is running on port 8000
- Check browser console for CORS errors
- Verify
vite.config.jsproxy settings
Problem: 3D visualization not showing
- Solution:
- Check browser console for Three.js errors
- Make sure WebGL is enabled in your browser
- Try a different browser (Chrome/Firefox recommended)
GenLab/
├── backend/
│ ├── main.py # FastAPI application
│ ├── requirements.txt # Python dependencies
│ ├── services/
│ │ ├── protein_generator.py # Protein sequence generation
│ │ ├── oracle.py # Expressibility Oracle
│ │ ├── aws_sagemaker.py # AWS SageMaker integration (mock)
│ │ ├── manufacturing_agent.py # Manufacturing protocol generation
│ │ └── llm_agent.py # LLM-powered refinement
│ └── run.sh # Startup script
│
├── frontend/
│ ├── src/
│ │ ├── App.jsx # Main app component
│ │ ├── components/
│ │ │ ├── ProteinDesignForm.jsx
│ │ │ ├── ProteinVisualization.jsx
│ │ │ ├── ManufacturingView.jsx
│ │ │ └── RefinementDialog.jsx
│ │ └── main.jsx
│ ├── package.json
│ └── run.sh # Startup script
│
└── README.md
- Protein Design: Generate novel protein sequences with constraints
- 3D Visualization: Interactive protein structure viewer
- Manufacturing Protocol: Automatic generation of production recipes
- Cost Optimization: Real-time cost penalty calculations
- LLM Refinement: Natural language protein design refinement
- AWS Integration: SageMaker endpoint integration (mock)
- Start with a simple example: Use "Anti-TNF-alpha Antibody" as target name
- Show the 3D visualization: Rotate and zoom to demonstrate interactivity
- Demonstrate refinement: Use "Reduce immunogenicity by 20%" as refinement prompt
- Highlight AWS integration: Show the SageMaker prediction source in API response
- Explain the closed-loop: Show how cost penalties guide design optimization
- Mock Mode: The application works in mock mode without API keys
- AWS SageMaker: Currently uses mock implementation for hackathon
- LLM Agent: Falls back to mock if OpenAI API key is not provided
- 3D Visualization: Uses simplified representation (production would use AlphaFold)
For issues or questions during the hackathon, check:
- Backend logs in terminal
- Frontend console in browser
- API documentation at http://localhost:8000/docs
Good luck with your hackathon! 🚀