Repository: purchase-store-app
A production-ready Full Stack Purchase Store (Angular frontend + .NET backend) used at PerkMinds. This README gives quick setup, structure, and run instructions for a fresh start (clean history) repository.
- Frontend: Angular app (UI, Material, Bootstrap, NgBootstrap) —
src/app/components/*(user + admin areas) - Backend: ASP.NET Core Web API (PurchaseStore.API) — serves endpoints and static product images
- Database: SQL Server database schema + seed (FoodApp.sql)
- Image storage: Project expects product images under a served folder (configured to
/images/products/)
| Layer | Technology |
|---|---|
| Frontend | Angular (project uses Angular 14 in this repo), Angular Material, ng-bootstrap, RxJS, SCSS |
| Backend | .NET (TargetFramework: net8.0), Entity Framework Core |
| Database | SQL Server (MSSQL) |
| Dev tools | Node.js 16+ (project used Node v16 in dev logs), npm, Angular CLI, dotnet SDK |
⚠️ NOTE: This repo was prepared from an existing worktree and configured for a fresh start commit. Adjust Node/.NET versions to match your environment if needed.
RepoRoot/
├─ frontend/ (Angular app root, previously under Intern2025/Angular)
│ ├─ src/
│ │ ├─ app/
│ │ │ ├─ components/
│ │ │ │ ├─ admin/...
│ │ │ │ └─ user/...
│ │ │ └─ services, material.module.ts, ...
│ │ └─ assets/
│ └─ package.json
├─ backend/ (PurchaseStore.API)
│ ├─ PurchaseStore.API.csproj
│ ├─ Program.cs
│ └─ appsettings.json
├─ sql/
│ └─ FoodApp.sql
└─ README.md
Follow these steps from a clean folder. These commands assume you have created a GitHub repo (e.g. https://github.com/rathi-java/purchase-store-app.git).
cd frontend
# install deps
npm install
# serve (dev)
ng serve --open
# default dev URL: http://localhost:4200If you see engine warnings (jwt-decode wants Node >= 18): either upgrade Node to 18+ or keep Node 16 and accept the warning — the app built and served on Node 16 in dev logs.
cd backend
# restore & build
dotnet restore
dotnet build
# run using launch settings (development)
dotnet run
# or set custom urls and run:
# set ASPNETCORE_URLS="https://localhost:7299;http://localhost:5099"
# dotnet run --no-launch-profileOpen Swagger (if enabled) once the API starts: http://localhost:7173/swagger/index.html (port may vary per launchSettings)
- Use SQL Server Management Studio or sqlcmd to run the SQL file.
- Example: import the
FoodApp.sqlfile into your local SQL Server instance.
If you have the SQL file locally inside repo: sql/FoodApp.sql or the uploaded path: /mnt/data/FoodApp.sql (adjust to your environment).
Example (sqlcmd):
sqlcmd -S <SERVER_NAME> -i ./sql/FoodApp.sqlIf your connection string uses
Integrated Security=True, make sure SQL Server user has access. Updateappsettings.jsonConnectionStrings:Db_Connectionaccordingly.
appsettings.jsoncontainsJwtsettings (Key, Issuer, Audience) andConnectionStrings:Db_Connection.- Logging via Serilog writes to
D:\Logs\log-.txtby default — change path if needed. - Static images: backend expects to serve product images under
/images/products/<filename>; ensure a static files middleware serves that directory or copy images to thewwwroot/images/productsfolder.
- Create folder (example used during dev):
X:\Repo\image\productsorbackend/wwwroot/images/products - Copy product images to the folder
- Configure the API to serve static files (in Program.cs add
app.UseStaticFiles();and map folder if required) - Frontend
getImageSrc()expects backend URLhttp://localhost:7173/images/products/<filename>
- App routing loads
UserModuleon default path''andAdminModuleon/admin. - The user homepage route is
/homeinside theUserModule(i.e./home). If you want root/to display the user home instead of redirecting to/home, updateUserRoutingModuleor the app-level redirect.
- Frontend lint/test/build:
ng build/ng test - Backend build/run:
dotnet build/dotnet run - Fresh Git start (if you want to replace history locally): see the project setup script used when initializing this repository.
- If Angular complains about missing
Matmodules, ensureMaterialModuleexports the required components or import Material modules inUserModule. - If API gives
ERR_SSL_PROTOCOL_ERRORon frontend requests, run backend in HTTPS with a trusted dev cert:dotnet dev-certs https --trustand ensureenvironment.apimatches the API origin. - If images are stored as Windows absolute paths in DB (e.g.
X:\Repo\image\products\pizza1.png), map only filenames to an images folder that the API serves.
Gourav Rathi — Full Stack Developer GitHub: rathi-java
MIT