A monorepo containing a web application to teach users about import tariffs and a browser extension to help estimate them.
- Website: A Next.js app that explains tariff fundamentals and showcases the browser extension.
- Browser Extension: A simple tool to analyze product pages, suggest HTS codes, and estimate duties.
- Framework: Next.js
- Database: MongoDB (with Mongoose)
- AI: Google Gemini
- Styling: Tailwind CSS
- Package Manager: pnpm
- Node.js (v18 or later)
- pnpm (v8 or later)
git clone https://github.com/Adr1an04/Tariffix.git
cd TariffixInstall all dependencies from the root of the monorepo.
pnpm installCreate a new file named .env in the root of the project. This file is required to store your API keys and database connection string.
Copy the content below into your .env file and replace the placeholder values with your actual credentials.
# Get a key from Google AI Studio (https://makersuite.google.com/app/apikey)
GEMINI_API_KEY="your-google-ai-api-key"
NEXT_PUBLIC_GEMINI_API_KEY="your-google-ai-api-key"
# Get a connection string from MongoDB Atlas
MONGODB_URI="mongodb+srv://<user>:<password>@<cluster-url>/<database-name>?retryWrites=true&w=majority"To run the website in development mode:
pnpm dev:websiteNavigate to http://localhost:3000 to view the application.
First, build the extension's static files.
pnpm build:extensionThis command creates a dist folder inside apps/extension.
- Open your browser and navigate to
chrome://extensions. - Enable Developer mode (usually a toggle in the top-right corner).
- Click Load unpacked.
- Select the
apps/extension/distfolder from this project.
The Tariffix extension will now be available in your browser.