A monorepo containing a Next.js frontend and FastAPI backend for scientific optimization using Bayesian optimization and active learning, enhanced by LLMs.
sci-llm/
├── frontend/ # Next.js frontend application
│ ├── src/ # Source code
│ │ ├── app/ # Next.js app router pages
│ │ ├── components/ # React components
│ │ ├── lib/ # Utilities and API client
│ │ ├── hooks/ # React hooks
│ │ └── __tests__/ # Frontend tests
│ ├── public/ # Static assets
│ └── package.json # Frontend dependencies
├── backend/ # FastAPI backend application
│ ├── app/ # Main application
│ │ ├── api/ # API routes
│ │ ├── core/ # Core business logic
│ │ ├── schemas/ # Pydantic schemas
│ │ └── utils/ # Utility functions
│ ├── tests/ # Backend tests
│ ├── main.py # Application entry point
│ └── requirements.txt # Python dependencies
├── dataset/ # Sample datasets and configurations
│ ├── data_format_example.csv # Example data format
│ ├── json_example.json # Example configuration
│ └── test_problems.txt # Test problem descriptions
├── active_learning/ # Active learning module
├── pyproject.toml # Python project configuration
└── package.json # Root dependencies
- Node.js 18+ and npm
- Python 3.9+
- Poetry (optional) or pip
-
Install root dependencies:
npm install
-
Set up backend:
cd backend python -m venv venv source venv/bin/activate # On Windows: .\venv\Scripts\activate pip install -r requirements.txt
-
Set up frontend:
cd frontend npm install
-
Create
.env
files:- Backend (.env):
OPENAI_API_KEY=your_key_here
- Frontend (.env.local):
NEXT_PUBLIC_API_URL=http://localhost:8000
- Backend (.env):
Run both frontend and backend in development mode:
npm run dev
Or run them separately:
- Frontend only:
npm run frontend
- Backend only:
npm run backend
- Modern Next.js frontend with TypeScript and Tailwind CSS
- FastAPI backend with async support
- Active Learning and Bayesian Optimization
- LLM integration for configuration generation
- Real-time data visualization
- Type-safe API communication
- Backend:
cd backend && pytest
- Frontend:
cd frontend && npm test
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request