Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
3775683
Implement "Run All" feature for analyzing all studies with matching SNPs
vishakh Oct 14, 2025
bc8568f
Introduce smoother ETA calculation with exponential moving average
vishakh Oct 14, 2025
42a2f35
Add IndexedDB-backed "Run All" implementation for SNP analysis
vishakh Oct 15, 2025
1b91b0b
Enhance caching, deduplication, and result retrieval mechanisms
vishakh Oct 15, 2025
dd1c065
Add SQL.js in-memory database for genetic result storage and querying
vishakh Oct 15, 2025
9de888c
Refactor `LLMCommentaryModal` to optimize result queries and AI integ…
vishakh Oct 15, 2025
c3651f3
Merge pull request #17 from Monadic-DNA/feature/switch_to_prod_nilai
vishakh Oct 20, 2025
0b60d1f
Update NilAI client configuration to use production environment in bo…
vishakh Oct 20, 2025
657ae72
Merge remote-tracking branch 'origin/main' into feature/add_paid_feat…
vishakh Oct 20, 2025
406995e
Fix build errors and type issues after merging main
vishakh Oct 20, 2025
59fea0c
Fix Run All button by calling onAccept callback in initial disclaimer
vishakh Oct 20, 2025
2753bc0
Refactor `LLMCommentaryModal` and `StudyResultReveal` to improve resu…
vishakh Oct 20, 2025
bac42a2
Render `LLMCommentaryModal` using React Portal and center modal align…
vishakh Oct 20, 2025
24f9b05
Add CustomizationContext and UI for personalized analysis
vishakh Oct 20, 2025
c788575
Add two-tier embedding cache and embedding generation service
vishakh Oct 23, 2025
824f007
Dynamically adjust `hnswCandidateLimit` and `rawLimit` for filtering …
vishakh Oct 23, 2025
854e819
Add offset handling and "Load More Results" functionality in study fi…
vishakh Oct 23, 2025
ed78fbf
Added results detail to LLM analysis.
vishakh Oct 23, 2025
00e0eac
Add embeddings APIs and integrate semantic search support
vishakh Oct 23, 2025
cea804f
Add personalized analysis prompts and enhance result relevance handling
vishakh Oct 24, 2025
846bdbd
Enhance GWAS schema, semantic relevance, and add print functionality
vishakh Oct 24, 2025
c3bc982
Improve result filtering and random sampling in LLMCommentaryModal, f…
vishakh Oct 24, 2025
682861c
Add similarity score column and improve result state handling
vishakh Oct 24, 2025
e5f2ecf
Add effect type and replication sample size to GWAS schema, enhance r…
vishakh Oct 24, 2025
1b83e5a
Fixed build issues.
vishakh Oct 24, 2025
e816dc0
Add AI chat feature and enhance development mode utilities
vishakh Oct 27, 2025
1182464
Add AIChatInline component and replace AIChatModal with inline AI cha…
vishakh Oct 27, 2025
4f0014c
Enhance AI chat with follow-up suggestions, print functionality, and …
vishakh Oct 27, 2025
18449c1
Improve first vs. follow-up message handling in AI chat
vishakh Oct 28, 2025
640b19d
Improve premium section with enhanced feature cards and mounted state…
vishakh Oct 28, 2025
72fe321
Cache Nilai client and delegation token for improved performance in A…
vishakh Oct 28, 2025
a3caa63
Add collapsible feature overview for premium section and improve AICh…
vishakh Oct 28, 2025
038d386
Add OpenAI fallback for AIChatInline in development mode
vishakh Oct 28, 2025
9bf6138
Refactor AIChatInline to fetch fresh delegation token for each message
vishakh Oct 29, 2025
ffe925b
Added Dynamic.xyz and eth payments integration.
vishakh Oct 29, 2025
c40fcc2
Nomenclature change.
vishakh Oct 29, 2025
900d0cd
Added discount code functionality.
vishakh Oct 30, 2025
f38ce3d
Switched from Coingecko to Alchemy for prices.
vishakh Oct 30, 2025
9ac3f08
Add PaymentModal and ETH price API integration for premium subscriptions
vishakh Oct 30, 2025
4b93c71
Add promo code step to PaymentModal and enhance subscription flow
vishakh Oct 31, 2025
0c340f4
Add Overview Report Analyzer and Client-Side Report Services
vishakh Nov 3, 2025
fe834d1
Add Overview Report Modal and Enhanced Batch Analysis
vishakh Nov 4, 2025
1404623
Add Overview Report Modal and Enhanced Batch Analysis
vishakh Nov 4, 2025
4fc2f46
Enhance Overview Report Modal with detailed batch analysis and Huggin…
vishakh Nov 4, 2025
93aced3
Migrate genetic overview report generation to centralized AI configur…
vishakh Nov 4, 2025
15d2d7e
Fixed build errors.
vishakh Nov 5, 2025
4c4078a
Optimize Overview Report generation and performance improvements
vishakh Nov 5, 2025
6d1eb7b
Trying to max out the context window for overview report batches.
vishakh Nov 6, 2025
915e891
Now properly maxing out gpt-oss-20b tokens.
vishakh Nov 6, 2025
ff74213
Tweaked the map prompt and added temporary limits for testing.
vishakh Nov 7, 2025
e57bef4
Some more tempotary LLM param tweaks for testing.
vishakh Nov 7, 2025
c6f2d49
More prompt and context size tweaks.
vishakh Nov 7, 2025
ccecc4e
Better formatting of overview reports.
vishakh Nov 7, 2025
3bb77d0
Prompt tweaks
vishakh Nov 9, 2025
5212d07
Improved compile times slightly.
vishakh Nov 9, 2025
e242449
Prompt tweaks
vishakh Nov 9, 2025
8da5b58
Prompt tweaks
vishakh Nov 10, 2025
326db5b
Chnaged the way the map phase works for overview reports.
vishakh Nov 10, 2025
328101f
Tweaked the reduce prompt.
vishakh Nov 10, 2025
8dc060a
Added exact searching for SNPs and genes.
vishakh Nov 10, 2025
8376d70
Added OR / beta indicators back to map prmopt.
vishakh Nov 10, 2025
fd5a420
Fix prompt bugs with OR sizes and map batch size.
vishakh Nov 10, 2025
c108724
Added Stripe payment support.
vishakh Nov 11, 2025
ab7a2c4
Added cancelation.
vishakh Nov 12, 2025
755f190
Removed ETH as payment ccy, added USDT and DAI and also added Polygon.
vishakh Nov 12, 2025
2554093
Support for stablecoin refunds.
vishakh Nov 12, 2025
6cdc37e
Fixed build and linter errors.
vishakh Nov 12, 2025
f45f78b
Fixed stablecoin payments bug.
vishakh Nov 12, 2025
49dc61f
Fixed hot reload issues.
vishakh Nov 12, 2025
4208dab
Filled polyfill issue with alchemy sdk.
vishakh Nov 12, 2025
319afbb
Bugfix: Dynamic network not detected correctly.
vishakh Nov 12, 2025
3cda954
Added balance check to ensure the user has sufficient funds.
vishakh Nov 12, 2025
c048a37
Renamed stuff for accuracy.
vishakh Nov 13, 2025
4342827
Changed default promopts.
vishakh Nov 13, 2025
1d29386
Fixed build and linter errors.
vishakh Nov 13, 2025
0bc445e
Fixed GH build issue
vishakh Nov 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 118 additions & 0 deletions .env.local.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
# Environment Variables for Monadic DNA Explorer
# Copy this file to .env.local and fill in your values

# =============================================================================
# NILLION API - Required for AI features (nilAI provider)
# =============================================================================
# Get your API key from: https://nillion.com
# NOTE: This is only needed for the nilAI provider. Ollama and HuggingFace
# providers are configured in the UI (Menu Bar > AI Settings).
NILLION_API_KEY=your_api_key_here

# =============================================================================
# DATABASE - PostgreSQL (optional, for vector similarity search)
# =============================================================================
# If not provided, app will fall back to in-memory storage
# POSTGRES_URL=postgresql://user:password@localhost:5432/gwasifier

# =============================================================================
# AUTHENTICATION - Dynamic.xyz (for wallet connection)
# =============================================================================
NEXT_PUBLIC_DYNAMIC_ENVIRONMENT_ID=your_dynamic_environment_id_here

# =============================================================================
# BLOCKCHAIN PAYMENTS - Alchemy indexer API
# =============================================================================
# Get your API key from: https://www.alchemy.com/
ALCHEMY_API_KEY=your_alchemy_api_key

# EVM payment wallet address (same address used across all EVM chains)
# This is where users send their stablecoin payments on Ethereum, Base, Arbitrum, Optimism, Polygon
# NEXT_PUBLIC_ prefix is required because it's displayed in the browser UI
# Format: 0x... (42 characters, EVM address)
# Note: For future non-EVM chains (Solana, Monad, etc.), add separate variables like:
# NEXT_PUBLIC_SOLANA_PAYMENT_WALLET_ADDRESS, NEXT_PUBLIC_MONAD_PAYMENT_WALLET_ADDRESS
NEXT_PUBLIC_EVM_PAYMENT_WALLET_ADDRESS=0x0000000000000000000000000000000000000000

# Stablecoin contract addresses (standard addresses, don't change unless deploying new token)

# USDC contracts
USDC_CONTRACT_ETHEREUM=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
USDC_CONTRACT_BASE=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
USDC_CONTRACT_ARBITRUM=0xaf88d065e77c8cC2239327C5EDb3A432268e5831
USDC_CONTRACT_OPTIMISM=0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85
USDC_CONTRACT_POLYGON=0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359

NEXT_PUBLIC_USDC_CONTRACT_ETHEREUM=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
NEXT_PUBLIC_USDC_CONTRACT_BASE=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
NEXT_PUBLIC_USDC_CONTRACT_ARBITRUM=0xaf88d065e77c8cC2239327C5EDb3A432268e5831
NEXT_PUBLIC_USDC_CONTRACT_OPTIMISM=0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85
NEXT_PUBLIC_USDC_CONTRACT_POLYGON=0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359

# USDT contracts
USDT_CONTRACT_ETHEREUM=0xdAC17F958D2ee523a2206206994597C13D831ec7
USDT_CONTRACT_BASE=0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2
USDT_CONTRACT_ARBITRUM=0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9
USDT_CONTRACT_OPTIMISM=0x94b008aA00579c1307B0EF2c499aD98a8ce58e58
USDT_CONTRACT_POLYGON=0xc2132D05D31c914a87C6611C10748AEb04B58e8F

NEXT_PUBLIC_USDT_CONTRACT_ETHEREUM=0xdAC17F958D2ee523a2206206994597C13D831ec7
NEXT_PUBLIC_USDT_CONTRACT_BASE=0xfde4C96c8593536E31F229EA8f37b2ADa2699bb2
NEXT_PUBLIC_USDT_CONTRACT_ARBITRUM=0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9
NEXT_PUBLIC_USDT_CONTRACT_OPTIMISM=0x94b008aA00579c1307B0EF2c499aD98a8ce58e58
NEXT_PUBLIC_USDT_CONTRACT_POLYGON=0xc2132D05D31c914a87C6611C10748AEb04B58e8F

# DAI contracts
DAI_CONTRACT_ETHEREUM=0x6B175474E89094C44Da98b954EedeAC495271d0F
DAI_CONTRACT_BASE=0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb
DAI_CONTRACT_ARBITRUM=0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1
DAI_CONTRACT_OPTIMISM=0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1
DAI_CONTRACT_POLYGON=0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063

NEXT_PUBLIC_DAI_CONTRACT_ETHEREUM=0x6B175474E89094C44Da98b954EedeAC495271d0F
NEXT_PUBLIC_DAI_CONTRACT_BASE=0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb
NEXT_PUBLIC_DAI_CONTRACT_ARBITRUM=0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1
NEXT_PUBLIC_DAI_CONTRACT_OPTIMISM=0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1
NEXT_PUBLIC_DAI_CONTRACT_POLYGON=0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063

# =============================================================================
# STRIPE PAYMENTS - Credit/Debit Card Payments
# =============================================================================
# Get your API keys from: https://dashboard.stripe.com/apikeys
# Use test keys for development (sk_test_..., pk_test_...)
# Use live keys for production (sk_live_..., pk_live_...)

# Server-side secret key (NEVER expose in client code)
STRIPE_SECRET_KEY=sk_test_your_stripe_secret_key

# Client-side publishable key (safe to expose in browser)
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_your_stripe_publishable_key

# Stripe price ID for monthly subscription ($4.99/month recurring)
# Get this from: https://dashboard.stripe.com/products (click your product → copy Price ID)
# Format: price_... (NOT prod_...)
STRIPE_PRICE_ID=price_your_price_id_here

# NOTE: Subscriptions are verified via direct Stripe API queries
# No webhook configuration or database storage required

# =============================================================================
# STABLECOIN PRICING
# =============================================================================
# All stablecoins (USDC, USDT, DAI) are assumed to be pegged 1:1 with USD
# No historical price lookups needed

# =============================================================================
# SUBSCRIPTION SETTINGS
# =============================================================================
# Subscription price (used for calculating days purchased)
MONTHLY_SUBSCRIPTION_PRICE=4.99

# Subscription cache duration in hours (default: 1 hour)
# How long to cache subscription status in localStorage before re-checking blockchain
NEXT_PUBLIC_SUBSCRIPTION_CACHE_HOURS=1

# =============================================================================
# ANALYTICS (optional)
# =============================================================================
# NEXT_PUBLIC_PLAUSIBLE_DOMAIN=your_domain.com
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ yarn-error.log*
/.idea/
/localdata/gwas_catalog.sqlite
/localdata/gwas_catalog_v1.0.2-associations_e115_r2025-09-15.tsv
/localdata/gwas_catalog_v1.0.2-associations_e115_r2025-09-15.tsv.gz
/venv/
/embeddings_backup.npz
Loading
Loading