122 lines
2.7 KiB
Markdown
122 lines
2.7 KiB
Markdown
# 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
|
|
|
|
1. Clone the repository:
|
|
```bash
|
|
git clone https://github.com/yourusername/canadian-alternatives.git
|
|
cd canadian-alternatives
|
|
```
|
|
|
|
2. Install dependencies:
|
|
```bash
|
|
npm install
|
|
# or
|
|
yarn install
|
|
```
|
|
|
|
3. Run the development server:
|
|
```bash
|
|
npm run dev
|
|
# or
|
|
yarn dev
|
|
```
|
|
|
|
4. Open [http://localhost:3000](http://localhost:3000) in your browser to see the application.
|
|
|
|
## Database Schema
|
|
|
|
The application uses the following Supabase tables:
|
|
|
|
### Products
|
|
- `id`: string (UUID)
|
|
- `name`: string
|
|
- `description`: string
|
|
- `company`: string
|
|
- `country_of_origin`: string
|
|
- `category`: string
|
|
- `image_url`: string (optional)
|
|
- `created_at`: timestamp
|
|
|
|
### Alternatives
|
|
- `id`: string (UUID)
|
|
- `product_id`: string (references Products.id)
|
|
- `name`: string
|
|
- `description`: string
|
|
- `company`: string
|
|
- `category`: string
|
|
- `image_url`: string (optional)
|
|
- `created_at`: timestamp
|
|
|
|
### Opportunities
|
|
- `id`: string (UUID)
|
|
- `category`: string
|
|
- `description`: string
|
|
- `created_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
|
|
|
|
1. Push your code to a GitHub repository
|
|
2. Import the project in Vercel
|
|
3. Configure environment variables
|
|
4. Deploy
|
|
|
|
### Deploying to a VPS
|
|
|
|
1. Build the application:
|
|
```bash
|
|
npm run build
|
|
```
|
|
|
|
2. Start the production server:
|
|
```bash
|
|
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.
|