A modern, AI-powered shopping assistant that helps you find the best prices for products in your local area. Linganisha combines intelligent product search, real-time price comparison, and an interactive AI chat to make your shopping experience smarter and more efficient.
- Search for products across multiple stores in your location
- Real-time price comparison from local retailers
- Automatic currency conversion to your local currency
- Detailed product information including units and measurements
- Create and manage shopping lists with ease
- Track quantities and units for each item
- Auto-search for prices and alternatives
- View detailed product information and pricing
- Track shopping progress with completion stats
- Chat with Linga, your personal shopping assistant
- Get product recommendations and price insights
- Add items to your shopping list directly from chat
- Ask questions about your shopping list and prices
- Personalized experience with name recognition and location awareness
- Track user activity and engagement
- View user statistics by location and device
- Monitor search trends and popular products
- Secure authentication with password management
- Cross-device access from anywhere
- Automatic location detection
- Local store identification and caching
- Currency conversion based on location
- Geofenced search results
- Frontend: Next.js 16, React 19, TypeScript
- Styling: Tailwind CSS v4, shadcn/ui components
- Backend: Next.js API Routes, Server Actions
- Database: Supabase (PostgreSQL)
- AI: Vercel AI SDK with OpenAI/Anthropic models
- Search: SerpAPI for product search
- Authentication: Supabase Auth
- Deployment: Vercel
- Node.js 18+ and npm/yarn
- Supabase account
- SerpAPI key for product search
- OpenAI or Anthropic API key for AI features
-
Clone the repository ```bash git clone https://github.com/yourusername/linganisha.git cd linganisha ```
-
Install dependencies ```bash npm install ```
-
Set up environment variables ```bash cp .env.example .env.local ```
Fill in your credentials in
.env.local: ```envNEXT_PUBLIC_SUPABASE_URL=your_supabase_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
SERP_API_KEY=your_serp_api_key
OPENAI_API_KEY=your_openai_key
ANTHROPIC_API_KEY=your_anthropic_key ```
-
Set up the database
- Run the SQL scripts in your Supabase dashboard:
scripts/create-app-users-table.sqlscripts/create-search-count-function.sqlscripts/create-admin-user.sql
- Run the SQL scripts in your Supabase dashboard:
-
Start the development server ```bash npm run dev ```
-
Open your browser Navigate to
http://localhost:3000
``` linganisha/ βββ app/ β βββ api/ β β βββ search/route.ts # Product search API β β βββ chat/route.ts # AI chat API β βββ admin/ β β βββ login/page.tsx # Admin login β β βββ dashboard/page.tsx # Admin dashboard β βββ page.tsx # Main app page β βββ layout.tsx # Root layout β βββ globals.css # Global styles βββ components/ β βββ admin-dashboard.tsx # Admin dashboard component β βββ admin-login-form.tsx # Admin login form β βββ ui/ # shadcn/ui components βββ lib/ β βββ supabase/ β β βββ client.ts # Supabase client β β βββ server.ts # Supabase server β βββ user-tracking.ts # User activity tracking β βββ admin-actions.ts # Admin actions βββ scripts/ β βββ create-app-users-table.sql β βββ create-search-count-function.sql β βββ create-admin-user.sql βββ public/ βββ images/ # App assets ```
Request: ```json { "query": "milk 1 liter", "location": "Nairobi, Kenya", "deviceId": "device-123" } ```
Response: ```json { "results": [ { "title": "KCC Milk 1 Liter", "price": 150, "currency": "KES", "store": "Carrefour", "quantity": "1 liter", "url": "https://..." } ], "searchCount": 1 } ```
Request: ```json { "messages": [ { "role": "user", "content": "Add 2 liters of milk to my list" } ], "context": { "userName": "John", "location": "Nairobi, Kenya", "deviceId": "device-123", "shoppingList": [], "searchResults": [] } } ```
Response: ```json { "content": "I've added 2 liters of milk to your shopping list!", "actions": [ { "type": "ADD_ITEM", "item": "Milk", "quantity": 2, "unit": "liter" } ] } ```
```sql
- id (UUID, Primary Key)
- device_id (TEXT, Unique)
- user_name (TEXT)
- location (TEXT)
- search_count (INTEGER)
- last_active (TIMESTAMP)
- created_at (TIMESTAMP)
- updated_at (TIMESTAMP) ```
```sql
- id (UUID, Primary Key)
- email (TEXT)
- full_name (TEXT)
- created_at (TIMESTAMP)
- updated_at (TIMESTAMP) ```
Access the admin dashboard at /admin/login
Default Credentials:
- Email:
[email protected] - Password:
linganisha2024(change this immediately after first login)
Features:
- View all users and their activity
- Monitor search statistics
- Track user engagement by location
- Change admin password
- Secure cross-device access
- All API keys are stored in environment variables
- Sensitive data is never committed to git (see
.gitignore) - Supabase Row Level Security (RLS) policies protect user data
- Admin dashboard requires authentication
- Password changes are securely handled through Supabase Auth
See .env.example for all required environment variables. Never commit .env.local to git.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support, email [email protected] or open an issue on GitHub.
- Built with v0.app
- Powered by Vercel AI SDK
- Database by Supabase
- Search by SerpAPI
- UI Components from shadcn/ui
Automatically synced with v0.app deployments