System Requirements
Minimum Requirements
- Node.js: v18.0.0 or higher (v20+ recommended)
- RAM: 512 MB minimum, 1 GB recommended
- Disk Space: 500 MB for dependencies and build artifacts
- Operating System: Linux, macOS, or Windows with WSL2
Package Manager
OmniSearches uses npm as its primary package manager. While other managers may work, npm is officially supported and tested.You can check your Node.js and npm versions:
API Keys Setup
OmniSearches requires two free API keys to function:Google Gemini API Key
Visit Google AI Studio
Navigate to Google AI Studio and sign in with your Google account.
Create API Key
Click “Get API Key” and create a new key for your project. The free tier includes generous limits:
- 15 requests per minute
- 1 million tokens per minute
- 1,500 requests per day
OpenRouter API Key
Visit OpenRouter
Go to OpenRouter and create a free account.
Generate key
Navigate to the API Keys section and create a new key. OpenRouter provides free access to Deepseek R1 Distill Llama 70B.
Installation Methods
Method 1: Local Development (Recommended)
Install dependencies
- Frontend: React 18.3, Vite 5.4, TailwindCSS, shadcn/ui components
- Backend: Express 4.21, Google Generative AI SDK, OpenAI SDK
- TypeScript: Full type safety across the stack
Start development server
tsx to run the TypeScript server directly without compilation. The server includes:- Hot module replacement (HMR) for frontend
- Automatic server restart on backend changes
- Full TypeScript support
Method 2: Production Build
For production deployment:Build the application
- Installs production dependencies
- Builds the React frontend with Vite (output:
dist/public) - Bundles the Express backend with esbuild (output:
dist/index.js)
The build process uses:
- Vite for frontend bundling with optimizations
- esbuild for fast backend compilation
- ESM format for modern JavaScript modules
Environment Variables Reference
Required Variables
Your Google API key with access to Gemini 2.0 Flash API. Get it from Google AI Studio.
OpenRouter API key for Deepseek reasoning model. Obtain from OpenRouter.
OpenRouter API base URL. Default:
https://openrouter.ai/api/v1Reasoning model identifier. Default:
deepseek/deepseek-r1-distill-llama-70b:freeOptional Variables
Port number for the HTTP server. The application will listen on
0.0.0.0:[PORT].Environment mode. Values:
development or production. Affects:- Vite dev server vs static serving
- Logging verbosity
- Error handling detail
Project Structure
Understanding the project layout:Available Scripts
Technology Stack Details
Frontend Technologies
- React 18.3.1: Modern React with hooks and concurrent features
- Vite 5.4.9: Fast build tool and dev server
- TypeScript 5.6.3: Type-safe JavaScript
- TailwindCSS 3.4: Utility-first CSS framework
- shadcn/ui: Beautiful, accessible component library
- Radix UI: Unstyled, accessible component primitives
- Wouter: Lightweight routing (3.3.5)
- React Query: Data fetching and state management
- Framer Motion: Animation library
- Lucide React: Icon library
- React Markdown: Render markdown responses
Backend Technologies
- Express.js 4.21.2: Web framework
- TypeScript: Type-safe server code
- Google Generative AI 0.21.0: Gemini API SDK
- OpenAI SDK 4.85.2: Compatible with OpenRouter
- tsx 4.19.1: TypeScript execution for development
- esbuild 0.25.0: Fast bundler for production
- dotenv 16.4.7: Environment variable management
- Marked 15.0.4: Markdown parsing
- Axios 1.7.9: HTTP client
Verification & Testing
Test Development Setup
Test API endpoints
Open a new terminal and test the health endpoint:You should receive a JSON response with an IP address.
Perform test search
In your browser at
http://localhost:3000:- Enter a simple query like “test”
- Verify you receive AI-generated results
- Check that sources appear with links
- Confirm related questions are generated
Test Production Build
Troubleshooting
Installation Issues
npm install fails with peer dependency errors
npm install fails with peer dependency errors
Try using the legacy peer deps flag:
TypeScript compilation errors
TypeScript compilation errors
Ensure you’re using TypeScript 5.6.3:If different, reinstall:
Node version incompatibility
Node version incompatibility
Runtime Issues
Environment variables not loading
Environment variables not loading
Verify your
.env file:- Is it in the root directory (not
client/orserver/)? - Are there any extra spaces around the
=signs? - Are values in quotes if they contain special characters?
Google API authentication fails
Google API authentication fails
Common causes:
- API key is invalid or expired
- Gemini API is not enabled for your project
- Quota limits exceeded
- Check API key is active
- Verify Gemini 2.0 Flash is enabled
- Review usage quotas
OpenRouter/Deepseek errors
OpenRouter/Deepseek errors
Issues to check:
- API key format is correct
- Model identifier is exact:
deepseek/deepseek-r1-distill-llama-70b:free - API URL is correct:
https://openrouter.ai/api/v1
Port already in use
Port already in use
Find and kill the process using port 3000:Linux/macOS:Windows:Or use a different port:
Build fails with memory errors
Build fails with memory errors
Increase Node.js memory limit:
Performance Issues
Slow search responses
Slow search responses
Factors affecting speed:
- Network latency to Google/OpenRouter APIs
- Search mode (Exhaustive is slower than Concise)
- Reasoning mode adds overhead
- Using Concise mode for simple queries
- Disabling reasoning for faster results
- Checking your internet connection
High memory usage in development
High memory usage in development
Development mode uses more memory due to:
- Vite dev server with HMR
- Source maps
- Development dependencies
Security Best Practices
API Key Protection
-
Never commit
.envfiles- Already configured in
.gitignore - Use environment variables in production
- Already configured in
-
Use different keys for development and production
- Create separate API keys for each environment
- Rotate keys periodically
-
Implement rate limiting in production
- Add Express rate limiting middleware
- Monitor API usage quotas
Production Hardening
Next Steps
Architecture Guide
Understand how OmniSearches works internally
API Reference
Explore the REST API endpoints and responses
Configuration
Advanced configuration and customization
Deployment
Deploy to Railway, Vercel, or your own infrastructure
Getting Help
If you need assistance:- GitHub Issues: Report bugs or request features
- Discussions: Join the community on GitHub Discussions
- Documentation: Browse other sections of this documentation
- Source Code: Review the source at github.com/kiwigaze/OmniSearches