How srikrushnap/angular-ecommerce works
Project type and purpose
• This is a single-page application (SPA) built in Angular that simulates an e-commerce portal.
• It supports three user roles: Admin (manages users), Seller (lists products/services), Buyer (browses and purchases).
• It uses a JSON-Server as a mock backend for all REST API calls.
File structure
• Top-level folders:
• src/app: contains all Angular feature modules (admin, customer, product, shared, core, user-profile, home, contact-us).
• e2e: end-to-end tests (Protractor).
• mock-api-data.json + json-server: mock REST endpoints.
• Key Angular artifacts:
• app-routing.module.ts: root router configuration.
• core module: global interceptors and API service.
• shared module: shared components (header, footer, error page), directives, and common services (auth-guard, login/signup).
• admin module: admin login, dashboard, user CRUD via AdminService.
• customer module: separate buyer and seller feature submodules and CustomerService.
• product module: product CRUD via ProductService.
• user-profile module: profile management.
• Configuration files: angular.json, tsconfig, karma.conf.js, tslint.json.
README for additional insights
• The project is started with ng serve (frontend) and json-server --watch mock-api-data.json (mock backend).
• Frontend listens on port 4200; mock API on port 3000.
• No real database or backend code—everything goes through JSON-Server.