Drug Development Platform Frontend π§¬ΒΆ
Overview π―ΒΆ
Frontend for the Drug Development Platform, built with Next.js and React. Features a modern UI for molecular analysis, literature search, and clinical trial monitoring.
Key Features πΒΆ
- π¬ Molecular Analysis: Interactive 3D molecule viewer using 3Dmol.js
 - π Literature Search: AI-powered scientific literature analysis
 - π Clinical Trial Analysis: Data visualization and analysis tools
 - π¨ Theme Support: Light/dark mode with next-themes
 - π― Responsive Design: Mobile-first approach using Tailwind CSS
 
Tech Stack π»ΒΆ
- π Next.js: React framework for production
 - π¨ Tailwind CSS: Utility-first CSS framework
 - π Recharts: Composable charting library
 - π― Radix UI: Accessible component primitives
 - π Zustand: State management
 - π Lucide: Beautiful icons
 - π§ͺ 3Dmol.js: Molecular visualization
 
Getting Started πΒΆ
-  
Clone and Install Dependencies:
 -  
Environment Setup: Create a
.env.localfile: -  
Development Server:
Visit http://localhost:3000 -  
Build for Production:
 
Project Structure πΒΆ
frontend/
βββ src/
β   βββ app/                 # Next.js app router
β   βββ components/         
β   β   βββ ui/             # Reusable UI components
β   β   βββ molecule-viewer  # 3D molecule visualization
β   βββ lib/
β   β   βββ store/          # Zustand state management
β   β   βββ utils/          # Utility functions
β   βββ styles/             # Global styles
βββ public/                 # Static assets
βββ package.json           # Dependencies and scripts
Key Components π§ΒΆ
Molecule ViewerΒΆ
Literature SearchΒΆ
<LiteratureSearch
  onSearch={async (query) => {
    const results = await searchLiterature(query);
    // Handle results...
  }}
/>
Clinical Trial AnalysisΒΆ
<TrialAnalysis
  data={trialData}
  onAnalyze={async (data) => {
    const analysis = await analyzeTrialData(data);
    // Handle analysis...
  }}
/>
API Integration πΒΆ
The frontend communicates with the backend through RESTful endpoints:
// Example API call
const searchLiterature = async (query: string) => {
  const response = await fetch(`${API_URL}/agents/literature-search`, {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({ query })
  });
  return response.json();
};
State Management πΒΆ
Using Zustand for global state management:
const useDrugDiscoveryStore = create((set) => ({
  literatureResults: null,
  moleculeAnalysis: null,
  trialAnalysis: null,
  // ... actions and state updates
}));
Contributing π€ΒΆ
- Fork the repository
 - Create a feature branch
 - Submit a Pull Request
 
Learn More πΒΆ
- Next.js Documentation
 - Tailwind CSS Documentation
 - Radix UI Documentation
 - 3Dmol.js Documentation
 - Zustand Documentation
 
Security πΒΆ
- All API calls use HTTPS
 - Environment variables for sensitive data
 - CSP headers for security
 - Input sanitization and validation
 
Deployment with Azure Developer CLI (azd) πΒΆ
-  
Install Azure Developer CLI:
 -  
Login to Azure:
 -  
Deploy from Root Directory: From the root of "3-e2e-drug-discovery-sample/", run:
 
This will: - Create Azure Static Web App for the frontend - Configure environment variables - Deploy the frontend application - Output the public URL for your site
After deployment: - Access your site at the provided Static Web App URL - The backend API URL will be automatically configured
License πΒΆ
This project is licensed under the MIT License - see the LICENSE file for details.