{"id":25856862,"url":"https://github.com/timothyjan/janshopper","last_synced_at":"2025-09-17T23:04:45.815Z","repository":{"id":278439508,"uuid":"935602179","full_name":"TimothyJan/JanShopper","owner":"TimothyJan","description":"Full-stack e-commerce web application using Angular for a responsive front-end, ASP.NET Core for a RESTful API, and SQL Server for database management, featuring user authentication, product CRUD operations, shopping cart functionality, and order tracking.","archived":false,"fork":false,"pushed_at":"2025-03-11T20:26:39.000Z","size":16250,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-26T17:44:16.906Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","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/TimothyJan.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-02-19T17:57:55.000Z","updated_at":"2025-03-11T20:26:43.000Z","dependencies_parsed_at":"2025-02-19T19:39:44.931Z","dependency_job_id":"d4678f6f-1e40-45dd-93d2-364735d69a82","html_url":"https://github.com/TimothyJan/JanShopper","commit_stats":null,"previous_names":["timothyjan/janshopper"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TimothyJan/JanShopper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyJan%2FJanShopper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyJan%2FJanShopper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyJan%2FJanShopper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyJan%2FJanShopper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TimothyJan","download_url":"https://codeload.github.com/TimothyJan/JanShopper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimothyJan%2FJanShopper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275680444,"owners_count":25508570,"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","status":"online","status_checked_at":"2025-09-17T02:00:09.119Z","response_time":84,"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":[],"created_at":"2025-03-01T18:28:16.264Z","updated_at":"2025-09-17T23:04:45.790Z","avatar_url":"https://github.com/TimothyJan.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JanShopper\nFull-stack e-commerce web application using Angular for a responsive front-end, ASP.NET Core for a RESTful API, and SQL Server for database management, featuring user authentication, product CRUD operations, shopping cart functionality, and order tracking.\n\nProcess:\n\u003cul\u003e\n  \u003cli\u003eSQL Server Management Studio\n    \u003cul\u003e\n      \u003cli\u003eConnect to Server\n        \u003cul\u003e\n          \u003cli\u003eServer Type: Database Engine\u003c/li\u003e\n          \u003cli\u003eServer Name: localhost\u003c/li\u003e\n          \u003cli\u003eAuthentication: Windows Authentication\u003c/li\u003e\n          \u003cli\u003eConnect\u003c/li\u003e\n        \u003c/ul\u003e\n      \u003c/li\u003e\n      \u003cli\u003eCreate a new Database\n        \u003cul\u003e\n          \u003cli\u003eIn the \u003cstrong\u003eObject Explorer\u003c/strong\u003e, right-click on Databases and select \u003cstrong\u003eNew Database\u003c/strong\u003e\u003c/li\u003e\n          \u003cli\u003eDatabase Name: JanShopperDb\u003c/li\u003e\n        \u003c/ul\u003e\n      \u003c/li\u003e\n      \u003cli\u003eConfigure a User\n        \u003cul\u003e\n          \u003cli\u003eExpand the \u003cstrong\u003eSecurity\u003c/strong\u003e node.\u003c/li\u003e\n          \u003cli\u003eRight-click \u003cstrong\u003eLogins\u003c/strong\u003e and select \u003cstrong\u003eNew Login\u003c/strong\u003e\u003c/li\u003e\n          \u003cli\u003eIn the \u003cstrong\u003eLogin - New\u003c/strong\u003e dialog:\n            \u003cul\u003e\n              \u003cli\u003eLogin Name: Enter a username\u003c/li\u003e\n              \u003cli\u003eAuthentication: Choose SQL Server Authentication and set a password.\u003c/li\u003e\n            \u003c/ul\u003e\n          \u003c/li\u003e\n          \u003cli\u003eIn the left panel, go to \u003cstrong\u003eUser Mapping\u003c/strong\u003e, check your database (JanShopperDb), and assign the db_owner role.\u003c/li\u003e\n        \u003c/ul\u003e\n      \u003c/li\u003e\n      \u003cli\u003eConfigure the Connection String in appsettings.json\n        \u003cul\u003e\n          \u003cli\u003e\u003ccode\u003e\"DefaultConnection\": \"Server=(localdb)\\\\MSSQLLocalDB;Database=JanShopperDb;User Id=youUserId;Password=yourPassword;Trusted_Connection=True;\"\u003c/code\u003e\u003c/li\u003e\n        \u003c/ul\u003e\n      \u003c/li\u003e\n    \u003c/ul\u003e\n  \u003c/li\u003e\n  \u003cli\u003eCreate ASP.NET Core API\n    \u003cul\u003e\n      \u003cli\u003eAdd Required NuGet Packages\n        \u003cul\u003e\n          \u003cli\u003e\u003ccode\u003eMicrosoft.EntityFrameworkCore\u003c/code\u003e\u003c/li\u003e\n          \u003cli\u003e\u003ccode\u003eMicrosoft.EntityFrameworkCore.SqlServer\u003c/code\u003e\u003c/li\u003e\n          \u003cli\u003e\u003ccode\u003eMicrosoft.EntityFrameworkCore.Tools\u003c/code\u003e\u003c/li\u003e\n          \u003cli\u003eFor password hashing in UserRepository: Install BCrypt.Net: ~\u003ccode\u003eInstall-Package BCrypt.Net-Next\u003c/code\u003e\u003c/li\u003e   \n        \u003c/ul\u003e\n      \u003c/li\u003e\n      \u003cli\u003eCreate Models(User, Category, Product) with data annotations.\u003c/li\u003e\n      \u003cli\u003eCreate DTOs to transfer only the required data between the client and server.\n        \u003cul\u003eUser\n          \u003cli\u003eUserRegistrationDTO for write operations where validation is critical.\u003c/li\u003e\n          \u003cli\u003eUserProfileDTO for read operations where validation is not needed.\u003c/li\u003e\n        \u003c/ul\u003e\n      \u003c/li\u003e\n      \u003cli\u003eCreate Database Context JanShopperDbContext. The DbContext simplifies database interactions, manages entities and their relationships, and ensures data consistency.\u003c/li\u003e\n      \u003cli\u003eCreate Repositories and IRepositories(Interface) for each model with async methods to abstract data access logic, promotes separation of concerns, and makes the code cleaner, more maintainable, and easier to test.\n      \u003c/li\u003e\n      \u003cli\u003eCreate Controllers for each model to handle incoming HTTP requests, process the HTTP requests, and return appropriate responses.\u003c/li\u003e\n      \u003cli\u003eConfigure Program.cs to use connection string to SQL Server.\u003c/li\u003e\n      \u003cli\u003eCreate migrations and apply to the database to create tables. \n        \u003cul\u003e\n          \u003cli\u003e~\u003ccode\u003edotnet ef migrations add InitialCreate\u003c/code\u003e\u003c/li\u003e\n          \u003cli\u003e~\u003ccode\u003edotnet ef database update\u003c/code\u003e\u003c/li\u003e\n        \u003c/ul\u003e\n      \u003c/li\u003e\n      \u003cli\u003eSeed database with dummy data.\n        \u003cul\u003e\n          \u003cli\u003eCreate SeedData.cs.\u003c/li\u003e\n          \u003cli\u003eModify Program.cs to call the \u003ccode\u003eSeedData.Initialize\u003c/code\u003e method during application startup.\u003c/li\u003e\n          \u003cli\u003eAdd migrations and apply to the database to create tables.\n            \u003cul\u003e\n              \u003cli\u003eAdd Migration: ~\u003ccode\u003edotnet ef migrations add SeedDataMigration\u003c/code\u003e\u003c/li\u003e\n              \u003cli\u003eApply Migration: ~\u003ccode\u003edotnet ef database update\u003c/code\u003e\u003c/li\u003e\n            \u003c/ul\u003e\n          \u003c/li\u003e\n          \u003cli\u003eClean and Recreate Database (Development Only)\n            \u003cul\u003e\n              \u003cli\u003e~\u003ccode\u003edotnet ef database drop\u003c/code\u003e\u003c/li\u003e\n              \u003cli\u003e~\u003ccode\u003edotnet ef migrations remove\u003c/code\u003e\u003c/li\u003e\n              \u003cli\u003e~\u003ccode\u003edotnet ef migrations add InitialCreate\u003c/code\u003e\u003c/li\u003e\n              \u003cli\u003e~\u003ccode\u003edotnet ef database update\u003c/code\u003e\u003c/li\u003e\n            \u003c/ul\u003e\n          \u003c/li\u003e\n        \u003c/ul\u003e\n      \u003c/li\u003e\n      \u003cli\u003eTest all methods on Swagger.\n      \u003c/li\u003e\n      \u003cli\u003e\u003c/li\u003e\n    \u003c/ul\u003e\n  \u003c/li\u003e\n\u003c/ul\u003e\n\nDatabase Schema\n\u003cul\u003e\n  \u003cli\u003eUser: \u003ccode\u003eId, UserName, Email, Password\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003eCategory: \u003ccode\u003eId, Name\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003eProduct: \u003ccode\u003eId, Name, Description, Price, Stock, CategoryId\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003eOrder: \u003ccode\u003eId, UserId, OrderDate, TotalAmount, Status\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003eOrderItems: \u003ccode\u003eId, OrderId, ProductId, Quantity, Price\u003c/code\u003e\u003c/li\u003e\n  \u003cli\u003ePayment: \u003ccode\u003eId, OrderId, PaymentDate, Amount, PaymentMethod\u003c/code\u003e\u003c/li\u003e\n\u003c/ul\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimothyjan%2Fjanshopper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimothyjan%2Fjanshopper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimothyjan%2Fjanshopper/lists"}