{"id":49731154,"url":"https://github.com/paulkabzz/multivendor-ecommerce","last_synced_at":"2026-05-09T06:18:51.586Z","repository":{"id":293917244,"uuid":"985491304","full_name":"paulkabzz/multivendor-ecommerce","owner":"paulkabzz","description":"A full-stack multivendor e-commerce platform built with React, TypeScript, PostgreSQL, and Azure Functions. Will support vendor registration, product management, and secure checkout.","archived":false,"fork":false,"pushed_at":"2025-11-21T08:33:24.000Z","size":47457,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-05T21:35:51.799Z","etag":null,"topics":["ecommerce","postgresql","serverless","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paulkabzz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-05-17T21:54:55.000Z","updated_at":"2026-01-13T16:09:10.000Z","dependencies_parsed_at":"2025-07-17T21:51:00.544Z","dependency_job_id":null,"html_url":"https://github.com/paulkabzz/multivendor-ecommerce","commit_stats":null,"previous_names":["paulkabzz/multivendor-ecommerce","theamazingspooderman/multivendor-ecommerce"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/paulkabzz/multivendor-ecommerce","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulkabzz%2Fmultivendor-ecommerce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulkabzz%2Fmultivendor-ecommerce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulkabzz%2Fmultivendor-ecommerce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulkabzz%2Fmultivendor-ecommerce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paulkabzz","download_url":"https://codeload.github.com/paulkabzz/multivendor-ecommerce/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulkabzz%2Fmultivendor-ecommerce/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32809223,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ecommerce","postgresql","serverless","typescript"],"created_at":"2026-05-09T06:18:50.831Z","updated_at":"2026-05-09T06:18:51.568Z","avatar_url":"https://github.com/paulkabzz.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Multivendor Ecommerce Store\n\nA full-stack multivendor ecommerce platform built with modern technologies for scalability and performance.\n\n## Tech Stack\n\n**Frontend:**\n- React.js with TypeScript\n- Vite for development and build tooling\n\n**Backend:**\n- Azure Functions\n- Node.js with TypeScript\n- Prisma ORM\n\n**Database:**\n- PostgreSQL\n- Docker containerisation\n- Flyway for database migrations\n\n## Prerequisites\n\nBefore running the application, ensure you have these installed:\n\n- [Docker Desktop](https://www.docker.com/products/docker-desktop/)\n- [Node.js](https://nodejs.org/en/download) (v16 or higher recommended)\n- Git\n\n## Getting Started\n\n### 1. Clone the Repository\n\n```bash\ngit clone https://github.com/paulkabzz/multivendor-ecommerce.git .\n```\n\n### 2. Database Setup\n\n#### Create Environment File\n\nCreate `.env` in the `docker/` directory with the following content:\n```env\nPOSTGRES_USER=ecommerce_user\nPOSTGRES_PASSWORD=your_secure_password_here\nPOSTGRES_DB=ecommerce\n```\n\n**⚠️ Important:** Replace `your_secure_password_here` with a strong password of your choice.\n\n#### Start the PostgreSQL Container\n```bash\nmake psql\n```\n\nThis command starts the PostgreSQL container with your specified configuration.\n\n#### Verify Container is Running\n```bash\ndocker ps\n```\nLook for your PostgreSQL container in the output and note the container name.\n\n### 3. Database Configuration\n\n#### Connect to PostgreSQL\n```bash\ndocker exec -it \u003ccontainer_name\u003e psql -U ecommerce_user -d ecommerce\n```\n\n**Note:** Replace `\u003ccontainer_name\u003e` with the actual container name from the previous step.\n\n#### Set Default Schema\nOnce connected to PostgreSQL, run:\n```sql\nALTER ROLE ecommerce_user SET search_path TO ecommerce;\n```\n\nExit PostgreSQL:\n```sql\n\\q\n```\n\n### 4. Database Migration Setup\n\n#### Create Flyway Password File\nIn the `database` directory, create a file named `priv`:\n\n```bash\ncd database\necho \"export FLYWAY_PASSWORD=your_secure_password_here\" \u003e priv\n```\n\n**Note:** Use the same password from your Docker `.env` file.\n\n#### Run Database Migrations\n\n**⚠️ Note:** When using `make` commands, make sure you are in the same directory as the `Makefile`\n```bash\nmake migrate\n```\n\n#### Generate Prisma Schema\n```bash\nmake prisma\n```\n\n### 5. Verify Database Setup\n\nConnect to the database again:\n```bash\ndocker exec -it \u003ccontainer_name\u003e psql -U ecommerce_user -d ecommerce\n```\n\nList all tables to verify setup:\n```sql\n\\dt\n```\n\nYou should see the ecommerce tables listed. Exit when done:\n```sql\n\\q\n```\n\n## API Setup\n\n### 1. Navigate to API Directory\n```bash\ncd api\n```\n\n### 2. Install Dependencies\n```bash\nnpm install\n```\n\n### 3. Configure Environment Variables\nCreate a `.env` file in the `api` directory:\n\n```env\nDATABASE_URL=\"postgresql://ecommerce_user:your_secure_password_here@localhost:5433/ecommerce?schema=ecommerce\"\nJWT_SECRET=your_jwt_secret_here\nGMAIL_USER=your_gmail@gmail.com\nGMAIL_APP_PASSWORD=your_gmail_app_password\n```\n\n#### Generate JWT Secret\n```bash\nnode -e \"console.log(require('crypto').randomBytes(32).toString('hex'))\"\n```\n\nCopy the generated string and use it as your `JWT_SECRET`.\n\n#### Gmail Setup (for email notifications)\n- Enable 2-factor authentication on your Gmail account\n- Generate an App Password in your Google Account settings\n- Use your Gmail address for `GMAIL_USER`\n- Use the generated App Password for `GMAIL_APP_PASSWORD`\n\n\n### 4.  Appwrite Cloud Setup\n\nIf you’re a student, you can get the **\\$15/month Appwrite Cloud tier for free** using the [GitHub Student Developer Pack](https://education.github.com/pack):\n\n#### Claiming the Free Student Tier\n\n1. Go to [education.github.com/pack](https://education.github.com/pack).\n2. Click **“Get Student Benefits”** and log in or create a GitHub account.\n3. Verify your student status using your university email or student ID.\n4. Once approved:\n\n   * Search for the **Appwrite** offer under the benefits.\n   * Click to redeem the offer (you’ll either receive a promo code or an automatic upgrade).\n   * Alternatively, just sign in to [Appwrite Cloud](https://cloud.appwrite.io/) with your GitHub account that is linked to the student pack.\n\n\n\n### 🗂 Creating Buckets in Appwrite Cloud\n\nAfter setting up your account and project:\n\n1. **Go to the [Appwrite Console](https://cloud.appwrite.io/console)**.\n2. Select your existing project or create a new one (under GitHub Student Organization if you're using the free tier as a student).\n3. From the left sidebar, go to **Storage → Buckets**.\n4. Click **“Create Bucket”** and create these buckets:\n\n   * `products`\n   * `departments`\n   * `user_avatar`\n   * `store_avatar`\n5. After creating each bucket:\n\n   * Click the bucket name to open its settings.\n   * Under **Permissions**, click **“Add Role”**, select **Any**, and check the **Read** permission (this enables public read access).\n   * Scroll down to **Allowed File Extensions** and add:\n\n     * `jpg`, `png`, `svg`\n     * *(Optional, but recommended)*: `jpeg`, `webp`, `gif`, etc.\n\n\n\n### 🔑 Setting Up Environment Variables\n\nOnce your buckets are created, gather the following details from the Appwrite Console and add them to your `.env` file inside the `api` directory:\n\n```env\nAPPWRITE_ENDPOINT=\nAPPWRITE_PROJECT_ID=\nAPPWRITE_API_KEY=\nAPPWRITE_USER_AVATAR_BUCKET_ID=\nAPPWRITE_VENDOR_AVATAR_BUCKET_ID=\nAPPWRITE_PRODUCTS_BUCKET_ID=\nAPPWRITE_DEPARTMENT_BUCKET_ID=\n```\n\n#### Where to Find Each Variable:\n\n| Variable               | How to Find It                                                                                       |\n| ---------------------- | ---------------------------------------------------------------------------------------------------- |\n| `APPWRITE_ENDPOINT`    | Go to **Project → Settings → API credentials → API Endpoint**                                                          |\n| `APPWRITE_PROJECT_ID`  | Go to **Project → Settings → API credentials → Project ID**                                                  |\n| `APPWRITE_API_KEY`     | Go to **Project → Overview → API Keys → Create API Key** with required permissions (e.g. Storage: Read + Write) |\n| `APPWRITE_*_BUCKET_ID` | Go to **Storage → Buckets**, click a bucket, and copy the **Bucket ID** from the top of the page     |\n\n\n\n### 5. Start the Azure App.\n```bash\nnpm run start\n```\n\n## Frontend Setup\n\n### 1. Open New Terminal\nKeep the API server running and open a new terminal window.\n\n### 2. Navigate to Client Directory\n```bash\ncd client\n```\n\n### 3. Install Dependencies\n```bash\nnpm install\n```\n\n### 5. Start Development Server\n```bash\nnpm run dev\n```\n\nYou should see output similar to:\n```\n➜  client git:(develop) npm run dev\n\n\u003e client@0.0.0 dev\n\u003e vite\n\n\n  VITE v6.3.5  ready in 214 ms\n\n  ➜  Local:   http://localhost:5173/\n  ➜  Network: use --host to expose\n  ➜  press h + enter to show help\n```\n\n### 5. Access the Application\nOpen your browser and navigate to `http://localhost:5173/`\n\n## 📝 Writing SQL and Migrations\n\nWhen making changes to the database schema, follow these steps:\n\n### 1. Create Migration File\nCreate a new file in the `migrations` folder following Flyway's naming convention:\n\n```\nV\u003cversion_number\u003e__description_of_changes.sql\n```\n\n**Example:** `V7__create_blog_table.sql`\n- Version: 7\n- Description: Creating a blog table\n\n### 2. Write Your SQL\nAdd your SQL commands to the migration file:\n\n```sql\n-- V7__create_blog_table.sql\nCREATE TABLE IF NOT EXISTS Blog (\n    blog_id UUID UNIQUE NOT NULL PRIMARY KEY DEFAULT uuid_generate_v4(),\n    title VARCHAR(255) NOT NULL,\n    content TEXT,\n    user_id UUID,\n    FOREIGN KEY(user_id) REFERENCES Users(user_id),\n    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,\n    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP\n);\n```\n\n### 3. Apply Migration\nRun the migration to update your database:\n\n```bash\nmake migrate\n```\n\nThis command will:\n- Execute your new migration\n- Update the database schema\n- Create the new version in Flyway's schema history\n\n### 4. Update Prisma Schema\nAfter applying the migration, regenerate the Prisma schema:\n\n```bash\nmake prisma\n```\n\nThis ensures your Prisma client stays in sync with the database schema.\n\n### Migration Best Practices\n- Always test migrations on a development database first\n- Use descriptive names for your migration files\n- Include rollback instructions in comments when applicable\n- Never modify existing migration files once they're applied\n\n## Database Management Tools\n\n### Command Line (psql)\n```bash\ndocker exec -it \u003ccontainer_name\u003e psql -U ecommerce_user -d ecommerce\n```\n\n### GUI Options\n\n#### DBeaver\nClick the **Create New Database Connection** button, choose **PostgreSQL** and connect using the following:\n- **Host:** localhost\n- **Port:** 5433\n- **Database:** ecommerce\n- **Username:** ecommerce_user\n- **Password:** [your password from `.env`]\n\n#### Prisma Studio\nFrom the `/api` directory:\n```bash\nnpx prisma studio\n```\n\n## Docker Container Management\n\n### View Running Containers\n```bash\ndocker ps\n```\n\n### Stop Container\n```bash\ndocker stop \u003ccontainer_name\u003e\n```\n\n### Start Existing Container\n```bash\ndocker start \u003ccontainer_name\u003e\n```\n\n### Remove Container (⚠️ This deletes all data)\n```bash\ndocker rm \u003ccontainer_name\u003e\n```\n\n### View Container Logs\n```bash\ndocker logs \u003ccontainer_name\u003e\n```\n\n## 🔍 Troubleshooting\n\n### Common Issues\n\n#### Port Already in Use\nIf port 5433 is already in use:\n```bash\n# Find process using the port\nlsof -i :5433\n\n# Kill the process\nkill -9 \u003cPID\u003e\n```\n\n#### Container Won't Start\n```bash\n# Check Docker logs\ndocker logs \u003ccontainer_name\u003e\n\n# Remove and recreate container\ndocker rm \u003ccontainer_name\u003e\nmake psql\n```\n\n#### Database Connection Issues\n1. Verify container is running: `docker ps`\n2. Check environment variables in both `.env` files\n3. Ensure passwords match between Docker and API configurations\n\n#### Prisma Issues\n```bash\n# Reset Prisma client\ncd api\nnpx prisma generate\n\n# Reset database (⚠️ destroys data)\nnpx prisma db push --force-reset\n```\n\n## Development Notes\n\n- The database runs on port `5433` to avoid conflicts with local PostgreSQL installations\n- Both frontend and backend support hot reloading during development\n- Database schema changes should be managed through Flyway migrations\n- Always use the `ecommerce` schema for database operations\n\n\n## Support\n\nIf you encounter any issues or need help getting the application running, please:\n\n1. Check the troubleshooting section above\n2. Search existing issues in the repository\n3. Create a new issue with detailed information about the problem\n4. Contact the me via email\n\n---","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulkabzz%2Fmultivendor-ecommerce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulkabzz%2Fmultivendor-ecommerce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulkabzz%2Fmultivendor-ecommerce/lists"}