|
|
||
|---|---|---|
| .cursor/rules | ||
| public | ||
| src | ||
| supabase/migrations | ||
| .gitignore | ||
| README.md | ||
| components.json | ||
| database-setup.sql | ||
| eslint.config.mjs | ||
| next.config.ts | ||
| package-lock.json | ||
| package.json | ||
| postcss.config.js | ||
| postcss.config.mjs | ||
| tailwind.config.ts | ||
| tsconfig.json | ||
README.md
Canadian Alternatives
A web application that helps users find Canadian-made alternatives to American products. This project aims to support Canadian businesses and entrepreneurs by promoting locally made products and identifying market opportunities.
Features
- Search for American products and find their Canadian alternatives
- Browse products by category
- View detailed product information and alternatives
- Discover business opportunities for Canadian entrepreneurs
- Submit new business opportunity suggestions
Tech Stack
- Frontend: Next.js 14 (App Router), React, TypeScript
- UI Components: Shadcn UI, Tailwind CSS, Framer Motion
- Database: Supabase
- Form Handling: React Hook Form, Zod
- State Management: React Server Components, URL state with nuqs
Getting Started
Prerequisites
- Node.js 18.17 or later
- npm or yarn
- Supabase account (for database)
Environment Setup
Create a .env.local file in the root directory with the following variables:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
Installation
-
Clone the repository:
git clone https://github.com/yourusername/canadian-alternatives.git cd canadian-alternatives -
Install dependencies:
npm install # or yarn install -
Run the development server:
npm run dev # or yarn dev -
Open http://localhost:3000 in your browser to see the application.
Database Schema
The application uses the following Supabase tables:
Products
id: string (UUID)name: stringdescription: stringcompany: stringcountry_of_origin: stringcategory: stringimage_url: string (optional)created_at: timestamp
Alternatives
id: string (UUID)product_id: string (references Products.id)name: stringdescription: stringcompany: stringcategory: stringimage_url: string (optional)created_at: timestamp
Opportunities
id: string (UUID)category: stringdescription: stringcreated_at: timestamp
Deployment
This application can be deployed to any hosting platform that supports Next.js applications, such as Vercel, Netlify, or a VPS.
Deploying to Vercel
- Push your code to a GitHub repository
- Import the project in Vercel
- Configure environment variables
- Deploy
Deploying to a VPS
-
Build the application:
npm run build -
Start the production server:
npm start
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.