{"id":27928448,"url":"https://github.com/jaymalli/oshop","last_synced_at":"2026-04-14T00:04:33.947Z","repository":{"id":291385371,"uuid":"977459439","full_name":"JayMalli/Oshop","owner":"JayMalli","description":"eCommerce website with features like product listing, add/delete products (admin), shopping cart, and checkout process.","archived":false,"fork":false,"pushed_at":"2025-05-04T09:21:32.000Z","size":388,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-13T06:07:09.240Z","etag":null,"topics":["angular","dotnet","ecommerce","sql","webapi-core"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/JayMalli.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,"zenodo":null}},"created_at":"2025-05-04T09:03:13.000Z","updated_at":"2025-05-04T09:24:29.000Z","dependencies_parsed_at":"2025-05-04T10:28:17.447Z","dependency_job_id":"8d9fbc57-8feb-414b-b71b-bb6efc96fa56","html_url":"https://github.com/JayMalli/Oshop","commit_stats":null,"previous_names":["jaymalli/oshop"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JayMalli/Oshop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayMalli%2FOshop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayMalli%2FOshop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayMalli%2FOshop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayMalli%2FOshop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JayMalli","download_url":"https://codeload.github.com/JayMalli/Oshop/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JayMalli%2FOshop/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259592262,"owners_count":22881267,"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":["angular","dotnet","ecommerce","sql","webapi-core"],"created_at":"2025-05-07T02:07:15.961Z","updated_at":"2026-04-14T00:04:33.916Z","avatar_url":"https://github.com/JayMalli.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Oshop Project Setup Guide\n\nBuilt a personal eCommerce website with features like product listing, add/delete products (admin), shopping cart, and checkout process. Implemented a user-friendly UI and dynamic cart management to simulate a real shopping experience.\n\n---\n\n## Prerequisites\n\nBefore setting up the project, ensure you have the following installed on your system:\n\n### General Requirements\n- **Node.js** (v16 or higher) - [Download Node.js](https://nodejs.org/)\n- **Yarn** (v1.22 or higher) - Install via `npm install -g yarn`\n- **.NET SDK** (v6.0 or higher) - [Download .NET SDK](https://dotnet.microsoft.com/download)\n- **SQL Server** (Express or higher) - [Download SQL Server](https://www.microsoft.com/en-us/sql-server/sql-server-downloads)\n\n### Optional Tools\n- **Visual Studio Code** (for frontend development) - [Download VS Code](https://code.visualstudio.com/)\n- **Visual Studio 2022** (for backend development) - [Download Visual Studio](https://visualstudio.microsoft.com/)\n  - Ensure the **ASP.NET and web development** workload is installed.\n\n---\n\n## Project Structure\n\nThe project is organized as follows:\n\n```\nOshop/\n├── frontend/       # Angular frontend application\n├── WebAPI/         # ASP.NET Core Web API backend\n```\n\n---\n\n## Setup Instructions\n\n### 1. Clone the Repository\n\n```bash\ngit clone \u003crepository-url\u003e\ncd Oshop\n```\n\n---\n\n### 2. Backend Setup (WebAPI)\n\n#### 2.1 Navigate to the Backend Directory\n\n```bash\ncd WebAPI\n```\n\n#### 2.2 Install Dependencies\n\nRun the following command to restore NuGet packages:\n\n```bash\ndotnet restore\n```\n\n#### 2.3 Update Configuration Files\n\nReplace the placeholders in the following files:\n\n1. **`appsettings.json`**:\n   - Replace `\u003cREPLACE WITH YOUR SQL DB CONNECTION STRING\u003e` with your SQL Server connection string.\n\n   ```json\n   {\n     \"ConnectionStrings\": {\n       \"DefaultConnection\": \"\u003cYOUR_SQL_CONNECTION_STRING\u003e\"\n     },\n     \"AppSettings\": {\n       \"Key\": \"This is secret key!\"\n     }\n   }\n   ```\n\n2. **`appsettings.Development.json`**:\n   - Update the `DefaultConnection` string to match your local SQL Server setup.\n\n   Example:\n   ```json\n   {\n     \"ConnectionStrings\": {\n       \"DefaultConnection\": \"Server=localhost\\\\SQLEXPRESS;Database=oshop;Trusted_Connection=true;TrustServerCertificate=True\"\n     }\n   }\n   ```\n\n#### 2.4 Apply Migrations and Seed Database\n\nRun the following commands to apply migrations and seed the database:\n\n```bash\ndotnet ef database update\n```\n\n\u003e **Note**: Ensure the database server is running and accessible.\n\n#### 2.5 Run the Backend Server\n\nStart the WebAPI server:\n\n```bash\ndotnet run\n```\n\nThe API will be available at:\n- **HTTPS**: `https://localhost:7063`\n- **HTTP**: `http://localhost:5062`\n\nYou can access the Swagger UI at `https://localhost:7063/swagger`.\n\n---\n\n### 3. Frontend Setup (Angular)\n\n#### 3.1 Navigate to the Frontend Directory\n\n```bash\ncd ../frontend\n```\n\n#### 3.2 Install Dependencies\n\nRun the following command to install the required npm packages:\n\n```bash\nyarn install\n```\n\n#### 3.3 Update Configuration Files\n\n1. **`src/environments/environment.ts`**:\n   - Replace the `apiUrl` with the backend API URL (e.g., `https://localhost:7063`).\n\n   Example:\n   ```typescript\n   export const environment = {\n     production: false,\n     apiUrl: 'https://localhost:7063/api'\n   };\n   ```\n\n2. **`firebase.json`** (if applicable):\n   - Update Firebase configuration if Firebase is used for hosting or authentication.\n\n#### 3.4 Run the Frontend Server\n\nStart the Angular development server:\n\n```bash\nyarn start\n```\n\nThe frontend will be available at:\n- **http://localhost:4200**\n\n---\n\n## Additional Notes\n\n### Backend Dependencies\n\nThe backend uses the following NuGet packages:\n- **Entity Framework Core** for database access:\n  - `Microsoft.EntityFrameworkCore`\n  - `Microsoft.EntityFrameworkCore.SqlServer`\n  - `Microsoft.EntityFrameworkCore.Design`\n- **Authentication and Authorization**:\n  - `Microsoft.AspNetCore.Authentication.JwtBearer`\n  - `Microsoft.IdentityModel.Tokens`\n- **Swagger** for API documentation:\n  - `Swashbuckle.AspNetCore`\n- **Newtonsoft.Json** for JSON serialization.\n\n### Frontend Dependencies\n\nThe frontend uses the following npm packages:\n- **Angular CLI** for development.\n- **RxJS** for reactive programming.\n- **Bootstrap** for styling (if applicable).\n\n---\n\n## Troubleshooting\n\n### Common Issues\n\n1. **Database Connection Error**:\n   - Ensure the SQL Server is running and the connection string is correct in `appsettings.json`.\n\n2. **CORS Issues**:\n   - If the frontend cannot access the backend API, ensure CORS is configured in the WebAPI project.\n\n   Example CORS configuration in `Program.cs`:\n   ```csharp\n   builder.Services.AddCors(options =\u003e\n   {\n       options.AddPolicy(\"CorsPolicy\", policy =\u003e\n       {\n           policy.AllowAnyHeader()\n                 .AllowAnyMethod()\n                 .WithOrigins(\"http://localhost:4200\");\n       });\n   });\n\n   app.UseCors(\"CorsPolicy\");\n   ```\n\n3. **SSL Certificate Issues**:\n   - If you encounter SSL certificate errors, trust the development certificate:\n     ```bash\n     dotnet dev-certs https --trust\n     ```\n\n4. **Angular Build Errors**:\n   - Ensure the correct Node.js and Angular CLI versions are installed.\n\n---\n\n## Deployment\n\n### Backend Deployment\n\n1. Publish the WebAPI project:\n   ```bash\n   dotnet publish -c Release -o ./publish\n   ```\n2. Deploy the published files to a hosting environment (e.g., IIS, Azure, AWS).\n\n### Frontend Deployment\n\n1. Build the Angular project:\n   ```bash\n   yarn build --prod\n   ```\n2. Deploy the contents of the `dist/` folder to a web server (e.g., Firebase Hosting, AWS S3, or Azure Static Web Apps).\n\n---\n\n## Conclusion\n\nYou have successfully set up the **Oshop** project. If you encounter any issues, refer to the troubleshooting section or consult the project documentation. Happy coding! 🎉","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaymalli%2Foshop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaymalli%2Foshop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaymalli%2Foshop/lists"}