An app for users to find availability of medicine in nearby pharmacies and for pharmacies to manage their inventory.
Deployed at: VitaMap Demonstartion Video: VitaMap Demo
-
Clone the repository:
git clone https://github.com/akasr/vitamap.git cd vitamap -
Install dependencies:
pnpm i
-
Configure environment variables:
-
Create or update the
.envfile with the following:# Database configuration POSTGRES_URL=postgres://<username>:<password>@<host>/<database>?connect_timeout=15&sslmode=require # JWT configuration JWT_SECRET=<your-secure-random-string>
-
For the JWT_SECRET, generate a secure random string using:
# macOS/Linux openssl rand -base64 32 # Windows users can generate a secret at: # https://generate-secret.vercel.app/32
-
-
Configure Prisma:
- Ensure you have a PostgreSQL database running.
- Update the
.envfile with your database connection string. Example:POSTGRES_URL=postgres://<username>:<password>@<host>/<database>?connect_timeout=15&sslmode=require
- Generate the Prisma client:
pnpm prisma generate --schema=db/prisma/schema.prisma
-
Run database migrations:
pnpm prisma migrate dev --schema=db/prisma/schema.prisma
-
Configure Chatbot Installation Chatbot README
-
Start the development server:
pnpm dev
-
Pharmacy Registration:
- Pharmacies can sign up and log in using email and password.
- Passwords are securely hashed using bcrypt.
-
Inventory Management:
- Pharmacies can add, update, and delete inventory items.
-
Responsive UI:
- Built with Tailwind CSS and ShadCN for a modern and responsive design.
-
Medicine Search:
- Users can search for medicines and view availability in nearby pharmacies.
- Medicine examples such as Cetirizine, Paracetamol, etc.
-
Interactive Map:
- Integrated with Leaflet to display pharmacies on a map.
-
Chatbot
- RAG(Retrieval-Augmented Generation) chatbot using OpenAI for embeddings and response generation and Pinecone as the vector database to enable accurate, context-aware answers from custom knowledge sources.
- Pharmacies can curretnly provide their location manually or with by providing current location
- Search medicine returns all the medicine in the database matching irrespctive of pharmacy's location from user's location.
- Inconsistent UI
- Limited Map Interactivity
- Chatbot web service is not integrated with the app. Need of local configuration.
- Autocomplete and suggestion based on search input
- Filter of returned pharmacies based on distance, currently open, prescription required.
- Display alternative medicines if the searched one is not available.
- Provide insights to the Pharmacies regarding their inventory.
- Ad Promotion
@hookform/resolvers: Resolver utilities for React Hook Form.@prisma/client: Prisma client for database interaction.@radix-ui/react-alert-dialog: Radix UI component for alert dialogs.@radix-ui/react-checkbox: Radix UI component for checkboxes.@radix-ui/react-dialog: Radix UI component for dialogs.@radix-ui/react-label: Radix UI component for labels.@radix-ui/react-navigation-menu: Radix UI component for navigation menus.@radix-ui/react-select: Radix UI component for select inputs.@radix-ui/react-slider: Radix UI component for sliders.@radix-ui/react-slot: Radix UI component for slots.@radix-ui/react-tooltip: Radix UI component for tooltips.bcryptjs: Library for hashing passwords.class-variance-authority: Utility for managing class names.clsx: Utility for conditionally joining class names.cmdk: Command menu component.cookie: HTTP cookie parsing and serialization.framer-motion: Animation library for React.jose: JavaScript Object Signing and Encryption library for JWT.leaflet: JavaScript library for interactive maps.lucide-react: React components for Lucide icons.next: React framework for server-side rendering and static site generation.react: Library for building user interfaces.react-dom: React package for working with the DOM.react-hook-form: Library for managing forms in React.react-icons: Icon library for React.react-leaflet: React components for Leaflet maps.react-slick: React carousel component.react-tsparticles: Particles animation library for React.slick-carousel: Carousel/slider component.tailwind-animate: Animation utilities for Tailwind CSS.tailwind-merge: Utility for merging Tailwind CSS classes.tailwindcss-animate: Animation plugin for Tailwind CSS.tsparticles: Particles animation library.zod: TypeScript-first schema validation library.
@eslint/eslintrc: ESLint configuration utilities.@tailwindcss/postcss: Tailwind CSS PostCSS plugin.@types/leaflet: TypeScript definitions for Leaflet.@types/node: TypeScript definitions for Node.js.@types/react: TypeScript definitions for React.@types/react-dom: TypeScript definitions for React DOM.@types/react-slick: TypeScript definitions for React Slick.autoprefixer: PostCSS plugin to parse CSS and add vendor prefixes.eslint: Linting tool for code quality.eslint-config-next: ESLint configuration for Next.js.postcss: Tool for transforming CSS with JavaScript plugins.prisma: ORM for database schema and migrations.tailwindcss: Utility-first CSS framework.typescript: TypeScript support for type safety.