{"id":15175397,"url":"https://github.com/iammshahbaz/destechnico","last_synced_at":"2026-01-04T06:49:03.605Z","repository":{"id":255229507,"uuid":"848927047","full_name":"iammshahbaz/destechnico","owner":"iammshahbaz","description":"Simple ecommerce website Backened","archived":false,"fork":false,"pushed_at":"2024-09-09T13:40:16.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-31T18:28:37.606Z","etag":null,"topics":["express","nodejs","postgresql","sql"],"latest_commit_sha":null,"homepage":"https://destechnico-vpa9.onrender.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iammshahbaz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-08-28T16:56:16.000Z","updated_at":"2024-09-09T13:40:20.000Z","dependencies_parsed_at":"2024-09-09T16:24:42.852Z","dependency_job_id":null,"html_url":"https://github.com/iammshahbaz/destechnico","commit_stats":{"total_commits":9,"total_committers":2,"mean_commits":4.5,"dds":0.2222222222222222,"last_synced_commit":"f17d59c835977c8409d62f0d6df62840e93962aa"},"previous_names":["iammshahbaz/destechnico"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iammshahbaz%2Fdestechnico","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iammshahbaz%2Fdestechnico/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iammshahbaz%2Fdestechnico/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iammshahbaz%2Fdestechnico/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iammshahbaz","download_url":"https://codeload.github.com/iammshahbaz/destechnico/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238310363,"owners_count":19450845,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["express","nodejs","postgresql","sql"],"created_at":"2024-09-27T12:23:43.585Z","updated_at":"2025-10-26T10:31:34.529Z","avatar_url":"https://github.com/iammshahbaz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple E-Commerce Application \n\nThis is a simple e-commerce application REST API built with Node.js, Express.js, and PostgreSQL. It provides user authentication and supports different functionalities for sellers and buyers.\n\n## Features\n\n- **User Authentication**: Sign up and login functionality for both sellers and buyers.\n- **Seller Functionality**: \n  - Add, edit, and delete products.\n- **Buyer Functionality**: \n  - Search for products by name or category.\n  - Add and remove products from the cart.\n\n## Tech Stack\n\n- **Node.js**: JavaScript runtime.\n- **Express.js**: Web framework for Node.js.\n- **PostgreSQL**: Relational database management system.\n- **Libraries**: Additional packages for tasks like authentication, validation, and database interaction.\n\n## Getting Started\n\n### Prerequisites\n\n- **Node.js**: Make sure you have Node.js installed.\n- **PostgreSQL**: Ensure that PostgreSQL is installed and running.\n\n### Installation\n\n1. Clone the repository:\n    ```bash\n    git clone https://github.com/yourusername/your-repo-name.git\n    ```\n2. Navigate into the project directory:\n    ```bash\n    cd your-repo-name\n    ```\n3. Install the dependencies:\n    ```bash\n    npm install\n    ```\n4. Create a `.env` file in the root directory and add the following environment variables:\n    ```bash\n    DB_HOST=localhost\n    DB_PORT=5432\n    DB_USER=postgres\n    DB_PASSWORD=shahbaz\n    DB_NAME=ecommerce\n    JWT_SECRET=shahbaz\n    ```\n\n5. Set up the PostgreSQL database by creating the necessary tables. You can use a migration tool like `pg-migrate` or manually execute SQL commands.\n\n### Database Setup\n\nCreate the following tables in your PostgreSQL database:\n\n```sql\nCREATE TABLE users (\n    id SERIAL PRIMARY KEY,\n    name VARCHAR(255) NOT NULL,\n    email VARCHAR(255) UNIQUE NOT NULL,\n    password VARCHAR(255) NOT NULL,\n    role VARCHAR(50) CHECK (role IN ('seller', 'buyer')) NOT NULL\n);\n\nCREATE TABLE products (\n    id SERIAL PRIMARY KEY,\n    name VARCHAR(255) NOT NULL,\n    description TEXT,\n    price DECIMAL(10, 2) NOT NULL,\n    category VARCHAR(50) NOT NULL,\n    seller_id INTEGER REFERENCES users(id) ON DELETE CASCADE\n);\n\nCREATE TABLE cart (\n    id SERIAL PRIMARY KEY,\n    buyer_id INTEGER REFERENCES users(id) ON DELETE CASCADE,\n    product_id INTEGER REFERENCES products(id) ON DELETE CASCADE,\n    quantity INTEGER NOT NULL\n);\n## API Endpoints\n\n### User Endpoints\n\n- **Sign Up**: `POST /api/users/signup`\n- **Login**: `POST /api/users/login`\n\n### Seller Endpoints\n\n- **Add Product**: `POST /api/seller/products`\n- **Edit Product**: `PUT /api/seller/products/:id`\n- **Delete Product**: `DELETE /api/seller/products/:id`\n\n### Buyer Endpoints\n\n- **Search Products**: `GET /api/buyer/products`\n- **Add to Cart**: `POST /api/buyer/cart`\n- **Remove from Cart**: `DELETE /api/buyer/cart/:id`\n\n## Start the development server:\n- npm run server\n\n## Testing the API\n\nYou can use tools like [ThunderClient](https://www.thunderclient.com/) or [Postman](https://www.postman.com/) to test the API endpoints.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiammshahbaz%2Fdestechnico","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiammshahbaz%2Fdestechnico","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiammshahbaz%2Fdestechnico/lists"}